Showing results for tags 'node.js'. - Extra Life Community Hub Jump to content

Search the Community

Showing results for tags 'node.js'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

  • Extra Life News
    • Extra Life Updates
    • Best Practices
    • Community Content
    • Why I Extra Life
    • Fundraising
    • Contests
  • Gaming News
  • Features
  • Podcast

Discussions

  • Extra Life Discussions
    • General Extra Life Discussion
    • Local Extra Lifers
    • Fundraising Ideas
    • Live Streaming Tips & Tricks
    • Official Extra Life Stream Team Discussion
    • Extra Life JSON Code Discussion & Sharing
    • Extra Life United
    • Extra Life Q & A
  • Articles & Extra Life Announcements
    • Announcements
  • Official Extra Life Guilds
    • Guild information and Discussion
    • Canada
    • Northeastern US
    • Southeastern US
    • Central US
    • Western US
  • Gaming Discussions
  • Other Stuff
  • Denver Extra Life Guild's Recent Posts

Calendars

  • Extra Life Community Calendar
  • Extra Life Stream Team
  • Akron Guild
  • Albany Guild
  • Albuquerque Guild
  • Anchorage Guild
  • Atlanta Guild
  • Austin Guild
  • Bakersfield Guild
  • Baltimore Guild
  • Birmingham Guild
  • Boston Guild
  • Burlington Guild
  • Buffalo Guild
  • Calgary, AB Guild
  • Morgantown Guild
  • Charlottesville Guild
  • Chicago Guild
  • Cincinnati Guild
  • Cleveland Guild
  • Columbia, MO Guild
  • Columbus, OH Guild
  • Dallas Guild
  • Dayton Guild
  • Denver Guild
  • Des Moines Guild
  • Detroit Guild
  • Edmonton, AB Guild
  • Fargo-Valley City Guild
  • Fresno Guild
  • Ft. Worth Guild
  • Gainesville-Tallahassee Guild
  • Grand Rapids Guild
  • Halifax, NS Guild
  • Hamilton, ON Guild
  • Hartford Guild
  • Hershey Guild
  • Hudson Valley Guild
  • Houston Guild
  • Indianapolis Guild
  • Jacksonville Guild
  • Kansas City Guild
  • Knoxville Guild
  • Lansing Guild
  • London, ON Guild
  • Los Angeles Guild
  • Milwaukee / Madison Guild
  • Minneapolis / Twin Cities Guild
  • Montreal / Quebec City Guild
  • Nashville Guild
  • Newark Guild
  • NYC & Long Island Guild
  • Oakland / San Francisco Guild
  • Omaha Guild
  • Orange County Guild
  • Orlando Guild
  • Ottawa, ON Guild
  • Philadelphia Guild
  • Phoenix Guild
  • Pittsburgh Guild
  • Portland, OR Guild
  • Portland, ME Guild
  • Raleigh-Durham Guild
  • Richmond Guild
  • Sacramento Guild
  • Salt Lake City Guild
  • San Antonio Guild
  • San Diego Guild
  • San Juan, PR Guild
  • Saskatchewan Guild
  • Seattle Guild
  • Spokane Guild
  • Springfield-Champaign, IL Guild
  • Springfield, MA Guild
  • St. Louis Guild
  • Syracuse Guild
  • Tampa / St. Petersburg Guild
  • Toronto, ON Guild
  • Vancouver, BC Guild
  • Washington DC Guild
  • Winnipeg, MB Guild
  • Denver Extra Life Guild's Events
  • Extra Life Akron's Events

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Hospital


Location


Why I "Extra Life"


Interests


Twitter


Instagram


Twitch


Mixer


Discord


Blizzard Battletag


Nintendo ID


PSN ID


Steam


Origin


Xbox Gamertag

Found 2 results

  1. Hello Extra Lifers and welcome again. We will continue to build our custom Discord bot. This is the final chapter of this short tutorial. You can find the first two chapters here: Part 1 Part 2 Alright on the first two chapters we created our custom bot and prepared the environment in our PC to start coding our bot. As I explained at the beginning, I'm not explaining Javascript language and Node.js , I'm assuming you have a basic knowledge about development. - Go to your Discord bot folder and create a new one "commands" - Download the files bot.js, config.json, auth.json, bot.js on your main bot folder and extralife.js. inside commands folder recently created. Github repository Do you remember your bot's token (part 1)?, go to Discord Developer portal again and copy it from bot tab. Your bot will login with this token on Discord. DON'T SHARE YOUR TOKEN!. THIS IS LIKE YOUR PASSWORD. - Go to auth.json file and edit with notepad or any similar software. - Paste your token between the double quotes "token": "YOUR TOKEN HERE" and save. Node.js will run with the script bot.js, this script will read the auth.json file where your token is. If you did everything correctly would be able to login. - Open a command prompt on Windows. Run-> type cmd or start-> Windows System->Command prompt - Go to your bot folder from command prompt and run this command: "node bot.js" . You should get an output like this: The first message is a confirmation the script is reading the all scripts from commands folder, the important is "logged in as ExtraLife4kids bot example#xxxx" message, this is a confirmation that your bot is logged on Discord. It will be online on your Discord server too. Your bot is online and listening for commands. Type !extralife to get help. Excellent the bot is answering!. You can use the commands info, team, participant, etc. Extra Lifers this is the end of this short tutorial, if you want to customize your commands or add more feel free to do it on the extralife.js script. You can do a lot of stuff learning node.js and Javascript. If you need to stop your bot press crtl + v on keyboard. Your bot is running local on your computer, each time you turn off your PC or close the command prompt window, your bot will be offline. If this tutorial was useful for you, let me know and I will tell you how you can run your bot 24*7 for your Discord server. Questions or doubts reach me, glad to help you. The purpose of this tutorial is to continue with the Extra Life campaign spreading the word via Discord this time. If you enjoy, please share for the kids!!!! See you soon. Besos!
  2. Hello and welcome again. We will continue to build our custom bot. We saw how to start building the bot with Discord API on first part of this tutorial, we’re going to install node.js before coding your bot. The first part of this tutorial is here: PART 2 First, what’s node.js?. Simple and quick explanation: The node.js run-time environment includes all you need to execute java programs written in Java Script. Our bot will be written in JS, Discord and web applications are built with JS too. Node.js is open source, you can work with it on Linux, Mac or Windows OS. It’s a standard. Node.js’ package ecosystem, npm, is the largest ecosystem of open source libraries in the world. We will use npm to download the Extra Life (to get Extra Life info) and Discord.js (to work with Discord) packages. If you get experience you can get more packages for other cool stuff. Let’s start. First step Install Node.js in your computer. I won't explain how to install because depends of each operating system but the process is simple like installing any other software: https://nodejs.org/en/download/ I’m demonstrating this example on Window System. It’s similar on Linux and Mac. Create a folder for your Discord bot, mine is “Discordbot” Long version explanation (shorter will added later): Open a command prompt on Windows. Run-> type cmd or start-> Windows System->Command prompt Go to your bot folder and run the command “npm init -y” to initialize your Project. This will create a package.json file. No worries, this is like a configuration file to read dependencies, scripts, descriptions, etc. Let’s continue by installing the Discord.js library. This library will allow you to interact with Discord API. Remember you built your bot with the Discord API on part 1. Run the command “npm install --save discord.js”. You will see the following output. No worries for the warnings. Now you have the discord.js library on your computer. Let’s move by installing the Extra Life library to interact with the Extra Life API. Run the command “npm i extra-life-api”. The output is the following. You have the Discord API on your computer too. Let’s do a brief check list. Bot application created on Discord portal (Done) Project initiated (Done) Node.js installed (Done) Discord.js library installed (Done) Extra Life library installed (Done) Alright You got your application bot created and the environment to start coding your bot is ready. Next chapter I will explain how to start to login and run your bot. It will read your Extra Life commands. If you enjoy this, please share!
×
×
  • Create New...