Skip to content

Instantly share code, notes, and snippets.

@DarkMindsMakeTheBestArt
Created April 21, 2020 13:58
Show Gist options
  • Select an option

  • Save DarkMindsMakeTheBestArt/4fbe21d29670e984905c2b981ee25835 to your computer and use it in GitHub Desktop.

Select an option

Save DarkMindsMakeTheBestArt/4fbe21d29670e984905c2b981ee25835 to your computer and use it in GitHub Desktop.
Installation guide
1. Use command prompt (windows) and cd to your folder in which your files are stored for the bot, for example cd desktop once there, cd into designated folder.
2. Use npm init and then npm install discord.js --save, your moduels called node_moduels will appear, your installation was succesful.
3. Use the code above.
4. Add the rest of whatever code you want/need.
const Discord = require("discord.js");
const client = new Discord.Client();
client.on("ready", () => {
console.log("I am ready!");
});
client.on("message", (message) => {
if (message.content.startsWith("Hello there")) {
message.channel.send("General Kenobi!");
}
});
client.login("super secret token");
const PREFIX = '*';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment