const Forge = require('DiscordForge');
const Client = new Forge.Client({selfBot: true, prefix: "/"});
class evalCommand extends Forge.Command {
constructor(registry) {
super("eval", null);
}
message(message, author, channel, guild, client) {
try {
const com = eval(message.content.split(' ').slice(1).join(' '));
channel.sendMessage('```\n' + com + '```');
} catch (e) {
channel.sendMessage('```\n' + e + '```');
}
}
}
Client.on('ready', () => {
console.log('Ready');
})
Client.registry.registerCommand(new evalCommand());
Client.login("token").catch(console.log);