First, you need to have Python installed, version 3 or higher. If you don't have it, simply install it through Python installation page
Then install discord.py which is required for running your bot :
pip install discord-py
- First go to Discord Developer Portal
- Then click on "New application" on the top right corner, and give it a name (the name doesn't really matter)
- Go to OAuth2
- Check
botandapplications.commands - Scroll to
BOT PERMISSIONS - Check
Administrator - Copy the generated URL and paste it on your browser
- Add the bot to your server. RECOMMENDED : you can create a new server for it, and make it a Community server (which will be required to claim the badge)
- Go back to Discord Developer Portal, and go to
Bot - Uncheck
PUBLIC BOTand check all Intents (PRESENCE INTENT,SERVER MEMBERS INTENTMESSAGE CONTENT INTENT)
- Press
Reset Tokenbutton and copy your bot token (⚠️ do NOT share it with anyone) - Finally go to
bot.pyfile and paste it inside the parenthesis ofbot.run("YOUR TOKEN")
After using the /hello command, you'll have to wait at least 24 hours to be able to claim your badge at Active Developer Badge.
Important
The /hello command may not be available immediately after starting the bot. It could take up to an hour to become accessible.
Tout d'abord, vous devez avoir Python 3 (ou une version supérieur) d'installé. Si vous ne l'avez pas, installez-le simplement via la page d'installation de Python.
Ensuite, installez discord.py qui est nécessaire pour faire fonctionner votre bot :
pip install discord-py
- Allez d'abord sur le Portail des développeurs Discord
- Cliquez ensuite sur "Nouvelle application" en haut à droite, et donnez-lui un nom (le nom n'a pas vraiment d'importance)
- Allez dans OAuth2
- Cochez
botetapplications.commands - Faites défiler jusqu'à
BOT PERMISSIONS - Cochez
Administrateur - Copiez l'URL générée et collez-la dans votre navigateur
- Ajoutez le bot à votre serveur. RECOMMANDÉ : vous pouvez créer un nouveau serveur pour cela, et en faire un serveur Communautaire (ce qui sera nécessaire pour réclamer le badge)
- Retournez au Portail des développeurs Discord, et allez dans
Bot - Décochez
PUBLIC BOTet cochez toutes les Intents (PRESENCE INTENT,SERVER MEMBERS INTENT,MESSAGE CONTENT INTENT)
- Appuyez sur le bouton
Réinitialiser le jetonet copiez votre jeton de bot (⚠️ ne le partagez PAS avec qui que ce soit) - Enfin, allez dans le fichier
bot.pyet collez-le dans les parenthèses debot.run("VOTRE JETON")
Après avoir utilisé la commande /hello, vous devrez attendre au moins 24 heures pour pouvoir réclamer votre badge sur Badge de développeur actif.
Important
La commande /hello peut ne pas être disponible immédiatement après le démarrage du bot. Cela peut prendre jusqu'à une heure pour devenir accessible.