Patricio_tv - Extra Life Community Hub Jump to content

Patricio_tv

Members
  • Content Count

    42
  • Joined

  • Last visited

Community Reputation

21 Excellent

1 Follower

About Patricio_tv

  • Rank
    Experienced Member

Extra Life

  • Hospital
    Boston Children's Hospital

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  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!
  3. Extra Life has grown up last years. Today we got overlays, Extra Life helpers and donations alerts on Streamlabs and Streamelements but what about Discord? nothing that I know. I didn’t find a good way to check my participant or team information directly from my Discord server, I needed to visit the official web site every time I needed to check the info. I started to think a way to get common Extra Life info directly from Discord using simple commands, faster and easy, why? because Extra Life is on Twitch, Twitch is integrated with Discord and some Discord communities are strong and supporting Extra Life, it’s good way to post information about your Extra Life campaign, your donors, your goals, your Extra Life marathon, the Extra Life stream team schedule and more for you members. Possibilities are many. What did I need to do that? A custom bot and a way to get the information. I’m going to share this short tutorial to build your custom bot and use the new Extra Life API to build your own commands. This API was released some weeks ago. Requirements: - A Discord account - Basic development knowledge about Node.js and Javascript. https://nodejs.org/en/download/ - The Extra Life API: https://www.npmjs.com/package/extra-life-api Note: I always suggest to use a test environment. There is not risk about security issues because you’re using a Discord API, Extra Life API and you’re setting your bot permissions. You can add and remove your bot anytime. This is not an Extra Life official bot, I'm explaining how you can build one yourself. The Extra Life bot name and logo are friendly examples for this tutorial. Please if you want to use them ask for approval to staff team or team leaders. The first part of this tutorial is show you how you can build your Discord Application (your bot), you will find different ways to do this on internet, use whatever best suits for you. You will add your bot to your Discord Server, later you will be able to build your Extra Life commands as your preference. Here we go: PART 1 I'm assuming you already have a Discord account, if not create it please. Go to Discord Developer Portal and select applications: https://discordapp.com/developers/applications/ Click on new Application Write a name and create General info tab: Upload a picture, complete the description (optional) and save the changes. Go to bot tab and click on add bot. After confirmation your bot will have visibility with Discord. After bot creation. You will see a confirmation a new options available. Now your bot has a token, this works like a password so take care of it. You can regenerate it any time in case your security is compromised. This token will allow you to connect your bot with Discord when you start to build your commands. Go to oauth tab. We’re using a bot application so our scope is “bot” and set your permissions. on the permissions you set like any other bot (Dyno, Mee6, couchbot, etc). I’m using few here permissions because I don’t want the bot manage channels, roles, kick members or these kind of administration actions. The bot just use commands to get Extra Life information. If you want to give your bot more permissions for administrations purposes is up to you. The red number are your permissions, it will change each time you add or remove permissions, you can calculate this number on bot tab too. https://discordapp.com/api/oauth2/authorize?client_id=597566571417960488&permissions=75776&scope=bot Copy the link and paste it on your browser. See what happens. If you did all correctly, you will authorize your new bot to join your Discord server with the permissions you set before. It’s clear, isn't it? Now choose your Discord server and set authorize. You receive the following confirmation. Go to your Discord Server and check if the bot is joined. It should be there offline. Alright your bot is joined and offline. Why offline? because you used the Discord API to build your bot but it still wasn’t developed to listen messages, read commands and reply. What did you learn here? Use the Discord API to build your bot. Understand how permissions work and are set. Understand how bot invitations work. Understand how your bot joins on your Discord server. Next chapter I’m going to explain how you should install Node.js to start coding your bot. You will use your bot token to login on Discord, it will be online and ready to listen for messages. If you enjoyed this content, please share it!!!
  4. Hey everyone!. I want to share this useful API that I found on internet. If you have a custom bot and you want to get Extra Life info directly from your Discord server without checking the web site. Install this API and you can create custom commands to get information. WARNING: I'm assuming you have a basic knowledge about development. 🤯 Requirements: -You need to install node.js on your PC or server first. Download it here: https://nodejs.org/en/download/ The installation instructions to install the Extra Life API is here: https://www.npmjs.com/package/extra-life-api If you don't want to read, just go to your bot folder and run this command: " npm i extra-life-api", you should see an output like this: Ignore the warnings Once the installation is completed, you are able to create your custom Extra Life commands for your Disord bot. We got just 4 methods for now to get information: getUserInfo, getUserDonations, getTeamInfo, getTeamRoster and getTeamDonations . All the information about how to use them and what information we can get is on the web site. I will add later how you can build your Extra Life bot or add these functionalities to your current custom bot. I leave you some basic examples what kind of things you can do to start. A big thank you to @Alex Muench for sharing and all the developers who worked on it. If you like this work consider to donate: https://www.extra-life.org/index.cfm?fuseaction=donorDrive.participant&participantID=362008 Let me know if you need help or anything. Besos muah!
  5. Hi Mike, hope you're good today. I like the idea let's see @herobyclicking can answer you!. See you around!
  6. Well a good chair is something important if you will play during a long session. Previous year I had a simple chair and when I played a lot, I had an important pain in my back. This year I'm using a DX racer chair and there's much difference. I know they're expensive but health is first. Don't forget your stretching exercises, break, etc. Good luck!
  7. Hi guys, I would like to know more about Boston community. This is my second year supporting Boston Children's Hospital, I'm streaming on Extra Life channel and my personal.
  8. @BowieMoonen Hey there, nice to meet you. You don't need to stream if you aren't streamer. I do OFFLINE Extra Life events, for example: I announce a game day when I'm going to play a video games for Extra Life and I invite people to play with me during the event, I use discord as a gaming room. They join there and we play together, I talk about Extra Life, what we're doing for the kids and I invite to support. Hope it helps you
  9. Good advice, getting donations is difficult but we're doing something really important. Consistency is the secret, we can find people doesn't want to participate and is ok. We need to continue finding others Extra Lifers. #FTK
  10. Una reunión de Gamers Caritativos por los niños. REGISTRARSE Gamers de todas partes han tomado al mundo por sorpresa devolviendo a aquellos que más lo necesitan. A través de Extra Life, decenas de miles de jugadores han recaudado más de $ 40 millones para niños enfermos y lesionados que fueron atendidos en Children's Miracle Network Hospitals. ¡Los Gamers están salvando vidas!. ¡Únete a nosotros en Coronado Springs Resort en Walt Disney World junto con otros gamers Caritativos como tú en Extra Life United! ACTIVIDADES Calendario COMO LLEGAR FAQs * Los primeros 150 personas registradas obtienen 1 pase GRATIS para el Disney World Park Hopper (valor de $160)! *
  11. Hi Puerto Rico, My name is Patricio, from Buenos Aires, Argentina. I would like to invite you to watch Extra Life channel each Tuesday at 7 pm EST in SPANISH or each Friday at 9 pm EST in ENGLISH. I hope to see you there!. Regards. Hola Puerto Rico, Mi nombre es Patricio, soy de Buenos Aires, Argentina. Me gustaría invitarlos a ver el Canal de Extra Life todos los Martes a las 7 PM EST en ESPAÑOL o los viernes a las 9 pm EST en INGLÉS. Espero verlos ahí. Fuerte abrazo!
  12. I think that @herobyclicking or @allthewayj can answer you about that.
×
×
  • Create New...