This is my first Discord bot made using Discord.js.
- Kicking users
- Banning users
- Ping command
- Eval command
- Purge
- Say command (says what you tell it to say)
- Stats
- Stopping the bot using a command
- Testing command (Testing, testing, 1 2 3)
- Change settings command
- Embed command (basic, using RichEmbed)
- Deleted message logs
- Invite link filter
- Web Dashboard
- Music Commands (Code from: https://github.com/iCrawl/Music-Bot)
- Change of database
First of all, clone this repository.
This bot requires Node.js v8+ (and npm) to run.
Also, please make a channel for mod logs in your Discord server.
Once you have that done, edit the config.js.example
file and then rename the file to config.js
. Make sure the callback URL specified is in the format of {{http|https}}{{domain_name}}/callback
(Examples: https://dashoard.bot-website.com/callback
OR https://dashboard.bot-website.com/callback
OR https://localhost:33445/callback
). This should be the public URL (proxied URL (by something like Nginx) is recommended).
/* eslint-disable */
var config = { // NOTE: DO NOT LEAVE ANYTHING BLANK
// ALL settings are strings. Do NOT just use true or false, use these in strings such as 'true' or 'false'. This is due to how some code works when changing the settings
ownerID: '123456789012345678', // Your ID here
token: 'Mxfxawx-token021kxxmkalpr-m', // Your bot token here
status: 'dnd', // Bot status [online/idle/invisible/dnd]
debug: 'false', // This is used to output some debug info if needed. The token will be in the console and other information could be in the console
playingGame: '{{prefix}}help | {{guilds}} guilds | v{{version}}', // The game you want the bot to play. {{prefix}} is replaced with the default prefix below, {{guilds}} is replaced with the guild count and {{version}} is replaced with the bot version. Leave blank to disable
purgeLogFormat: '\n Message ID: {{mID}} | Message Timestamp: {{mTS}} | Content: {{mC}} \n', // {{mID}}: Message ID; {{mTS}} Message Timestamp; {{mC}}: Message Content;
eightBallResponses: ['Yes', 'No', 'Certainly', 'My sources say yes', 'Try again later', 'Without a doubt', 'Better not to tell you now'], // An array of responses for the 8ball command
cleverbotToken: 'CC-3824abc', // API Token for CleverBot
googleAPIToken: 'AI-241scsc', // Used for link shortener and music features. You need to have these APIs enabled.
logTimeFormat: 'D MMM YYYY HH:mm:ss ZZ',
musicEnabled: 'true',
defaultSettings: {
prefix: '!',
modLogChannel: 'mod-log',
modRole: 'Moderator',
adminRole: 'Admin',
welcomeChannel: 'general',
welcomeMessage: 'Welcome {{user}}!',
welcomeEnabled: 'false',
inviteFilterEnabled: 'false',
inviteWhitelist: ['discord-testers', 'discord-developers'], // This can be changed, these are just defaults as an example
facepalms: 'false', // If enabled, the bot will reply with the facepalm emoji whenever a message contains 'facepalm'
swearFilter: 'false',
swearWords: ['damn'], // An array of swear words. These should be lowercase. (of course, I have not included much for certain reasons...)
logDeletes: 'true',
logNewMember: 'true',
logMemberLeave: 'true',
logCommandUsage: 'true',
logPurge: 'true',
sendHelp: 'channel' // Available options: channel, dm
},
dashboard: {
enabled: 'true', // This setting controls whether the dashboard is enabled or not.
oauthSecret: '0eFle4ArGsecret0sa', // The client secret from the Discord bot page
secure: 'false', // HTTPS: 'true' for true, 'false' for false
sessionSecret: '-crazyKeyboard-qwaszxerdfcvtyghbnuijkmopl', // Go crazy on the keyboard here, this is used as a session secret
domain: 'dashboard.bot-website.com', // Domain name (with port if not running behind proxy running on port 80). Example: 'domain': 'dashboard.bot-website.com' OR 'domain': 'localhost:33445'
port: '33445', // The port that it should run on
invitePerm: '536079575',
protectStats: 'false',
borderedStats: 'false', // Controls whether stats in the dashboard should have a border or not
legalTemplates: {
contactEmail: '[email protected]', // This email will be used in the legal page of the dashboard if someone needs to contact you for any reason regarding this page
lastEdited: '18 November 2017' // Change this if you update the `TERMS.md` or `PRIVACY.md` files in `dashboard/public/`
}
}
};
module.exports = config;
In the config file above, the callbackURL would be set by the code to https://dashboard.bot-website.com/callback
.