A small personal project to learn how to make a Discord bot using Discord JS and for use in my personal discord server for friends and myself.
- !iam (rolename): allows a user to assign themselves a role if it exists
- !iamnot (rolename): allows a user to remove a role from themselves if it exists
- !spamping (@someone): messages the @user with 10 @ pings
- !convertmiles (number): converts km to m and displays answer in the chat
- !count: gets current amount of users
- !uptime: how long the bot has currently been running
- !ping: sends a small packet to the server as well as discord api to see its response time
- !opgg (name): responds with the corresponding op.gg link of that name
- !livegame (name): reponse with the corresponding op.gg live game of that name
- !ban (@user): bans a user that has been @'d in the message
- !kick (@user): kicks a user that has been @'d in the message
- !delete (int): Deletes messages between 2 to 100
- !say (string): allows the administrator to speak as the
- Install node JS
- Add your discord API token to auth.json
- Add the bot to your server
- (optional) add a picture when the bot is being added to the server
- Navigate to where the file folder is, and shift + right click "open command window here"
- Enter "npm discord.js" and "npm weather.js" to install dependencies
- To run bot enter "node bot.js"
Learned how to do the backbone of the bot from: https://gist.github.com/eslachance/3349734a98d30011bb202f47342601d3.js