Events are now in a separated folder
parent
280e03c907
commit
8b8007cb6c
@ -0,0 +1,15 @@
|
||||
const responseObject = require("../reply.json");
|
||||
const { Permissions } = require('discord.js');
|
||||
const flags = [
|
||||
'SEND_MESSAGES'
|
||||
];
|
||||
const permissions = new Permissions(flags);
|
||||
|
||||
module.exports = (client, message) => {
|
||||
// Auto respond to messages
|
||||
let message_content = message.content.toLowerCase();
|
||||
if(responseObject[message_content]) {
|
||||
message.channel.send(responseObject[message_content]);
|
||||
};
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
module.exports = (client) => {
|
||||
const { botID, statsChannel } = require('../config.json');
|
||||
// Send stats to the console
|
||||
console.log(`Logged in as ${client.user.tag}! (${client.user.id})`);
|
||||
console.log(`Ready to serve in ${client.channels.size} channels on ${client.guilds.size} servers, for a total of ${client.users.size} users. ${client.readyAt}`);
|
||||
// Send stats to the "stats" channel in the support server if its not the test bot
|
||||
if (client.user.id == botID) {
|
||||
const channel = client.channels.get(statsChannel);
|
||||
channel.send(`Ready to serve in ${client.channels.size} channels on ${client.guilds.size} servers, for a total of ${client.users.size} users. ${client.readyAt}`);
|
||||
}
|
||||
client.user.setActivity('"haha help" or "@me help" for help');
|
||||
}
|
Loading…
Reference in New Issue