Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const botSettings = require("./botsettings.json");
- const Discord = require ("discord.js");
- const prefix = botSettings.prefix;
- const bot = new Discord.Client();
- bot.on("ready", async () => {
- console.log(`${bot.user.username} is ready.`);
- try {
- let link = await bot.generateInvite(["ADMINISTRATOR"]);
- console.log(link);
- } catch(e) {
- console.log(e.stack);
- }
- });
- bot.on("message", async message => {
- if(message.author.bot) return;
- if(message.channel.type === "dm") return;
- let messageArray = message.content.split(" ");
- let command = messageArray[0];
- let args = messageArray.slice(1);
- if(!command.startsWith(prefix)) return;
- });
- bot.login(botSettings.token);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement