Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Eris = require('eris');
- const prefixes = ['>', '//', ','];
- const auth = require('./assets/auth.json');
- const clientOptions = {
- intents: [
- "guilds",
- "guildMessages"
- ]
- };
- const bot = new Eris.CommandClient(auth.token, clientOptions, {}, {
- description: "A bot made to test various things",
- owner: "Terrarian#9999",
- prefix: `${prefixes}`
- });
- require('../src/commands/loader');
- bot.on("guildCreate", (guild) => { // When the client joins a new guild
- console.log(`New guild: ${guild.name}`);
- });
- bot.on("messageCreate", (msg) => { // When a message is created
- console.log(`New message: ${msg.cleanContent}`);
- if(msg.author.bot) return;
- if(!prefixes.some(prefix => msg.content.startsWith(prefix))) return;
- });
- bot.on("ready", () => { // When the bot is ready
- console.log("Ready! Connected to Discord!");
- });
- bot.connect();
Advertisement
Add Comment
Please, Sign In to add comment