Creating and Removing Bots

now we want to make a bot, you can do this by typing in the command ($ ds createbot) with the last argument being the name of the bot file. so running the command:

$ ds createbot example

which will create an example.js file, and will have the contents:

example.js
// create a client
const Discord = require('discord.short');
const ds = new Discord.ShortClient('example');

// login
ds.login({
  "botToken": "...",
  "mongo": {
    "username": "...",
    "password": "...",
    "cluster": "...",
    "database": "discordshort"
  },
  "heroku": {
    "name": "..."
  }
});

using the premade script, you can enter your data, and you can change the mongo.database to anything you would like.

the "cluster" section is not the cluster name, you want to grab the name and the code. as shown in the image:

If you make a JavaScript file and want to still add the bot, you can run the command:

$ ds addbot filename

make sure the filename doesn't have .js at the end, you can remove bots using this command:

$ ds rembot filename

You can access anything in the discord.js module when requiring discord.short

const Discord = require('discord.short'); // requiring
new Discord.MessageEmbed(); // class from discord.js module

Last updated