-
-
Save Raraph84/cff3ff908a1f2692b9a8452d2f49c2bf to your computer and use it in GitHub Desktop.
Discord Badge Bot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Client } = require("discord.js"); | |
const bot = new Client({ intents: ["Guilds"] }); | |
console.log("Connexion au bot..."); | |
bot.login("TON TOKEN") | |
.then(() => console.log("Connecté au bot !")) | |
.catch((error) => console.log("Impossible de se connecter au bot - " + error)); | |
bot.on("ready", async () => { | |
await bot.application.commands.set([ | |
{ | |
name: "ping", | |
description: "Pong!" | |
} | |
]); | |
console.log("Le bot est prêt !"); | |
}); | |
bot.on("interactionCreate", (interaction) => { | |
if (!interaction.isCommand()) return; | |
if (interaction.commandName === "ping") | |
interaction.reply("Pong!"); | |
}); |
Good code
Good code
Good code
good code
good code
good code
good code
Good code
Good Code
Good Code
These are batch coded programs, one used to start your discord bot and the other to install discord.js :
https://github.com/Alexarde/discord-bot/releases/tag/discord-bot
These 2 programs must be placed at the root of your discord bot folder in order to function correctly
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good Coder