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
| 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. |
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 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")) { |
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
| node : the term node is not recongnized as a cmdlet function, or script file or operable program +CategoryInfo +FullQualifiedErrorId | |
| +ObjectNotFound (node:String) [], CommandNotFoundException |
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 Discord = require('discord.js'); | |
| const bot = new Discord.Client(); | |
| const token = 's7TQeHozFTfZM6afbZjUsiqCU0cFbYZp'; | |
| bot.on('ready', () => | |
| console.log('This bot is active'); | |
| }) | |
| bot.login(token); |