Skip to content

Instantly share code, notes, and snippets.

View allysonwonderland's full-sized avatar
🦊

Ally allysonwonderland

🦊
  • Florida
View GitHub Profile
@andry5ury4
andry5ury4 / index.js
Created October 21, 2020 10:30
Simple, complete example of a bot in Discord.js
// Load up the discord.js library
const Discord = require("discord.js");
// This is your client. Some people call it `bot`, some people call it `self`,
// some might call it `cootchie`. Either way, when you see `client.something`, or `bot.something`,
// this is what we're refering to. Your client.
const client = new Discord.Client();
// Here we load the config.json file that contains our token and our prefix values.
const config = require("./config.json");
@ValentinNeaga
ValentinNeaga / Reaction Role.js
Last active September 24, 2022 14:59
Discord.js V12 - ReactionRole | Add a role using reactions.
/*
NOTE: This gist is no longer supported and won't get updated.
Please refer to https://github.com/JakyeRU/discord.js-examples for the latest version.
If you have any issues/suggestions you can open an issue/pull request there.
*/
client.on("message", async message => {
// Checking if the message author is a bot.
// Discord all events!
// A quick and dirty fleshing out of the discord.js event listeners (not tested at all!)
// listed here -> https://discord.js.org/#/docs/main/stable/class/Client
// Learn from this, do not just copy it mofo!
//
// Saved to -> https://gist.github.com/koad/316b265a91d933fd1b62dddfcc3ff584
// Last Updated -> Halloween 2022
/*