Clarify the name of the exported function from greeting
parent
3828e9f7ee
commit
32fa668770
|
@ -4,7 +4,7 @@ const config = require('../config');
|
||||||
|
|
||||||
const greetingGuildId = config.mainGuildId || config.greetingGuildId;
|
const greetingGuildId = config.mainGuildId || config.greetingGuildId;
|
||||||
|
|
||||||
function enable(bot) {
|
function init(bot) {
|
||||||
if (! config.enableGreeting) return;
|
if (! config.enableGreeting) return;
|
||||||
|
|
||||||
bot.on('guildMemberAdd', (guild, member) => {
|
bot.on('guildMemberAdd', (guild, member) => {
|
||||||
|
@ -30,5 +30,5 @@ function enable(bot) {
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
enable,
|
init,
|
||||||
};
|
};
|
||||||
|
|
|
@ -253,7 +253,7 @@ function reply(msg, text, anonymous = false) {
|
||||||
msg.channel.createMessage(`[${timestamp}] » ${logContent}`);
|
msg.channel.createMessage(`[${timestamp}] » ${logContent}`);
|
||||||
}, (err) => {
|
}, (err) => {
|
||||||
if (err.resp && err.resp.statusCode === 403) {
|
if (err.resp && err.resp.statusCode === 403) {
|
||||||
msg.channel.createMessage(`Could not send reply; the user has likely blocked the bot`);
|
msg.channel.createMessage(`Could not send reply; the user has likely left the server or blocked the bot`);
|
||||||
} else if (err.resp) {
|
} else if (err.resp) {
|
||||||
msg.channel.createMessage(`Could not send reply; error code ${err.resp.statusCode}`);
|
msg.channel.createMessage(`Could not send reply; error code ${err.resp.statusCode}`);
|
||||||
} else {
|
} else {
|
||||||
|
@ -430,5 +430,5 @@ bot.registerCommand('logs', (msg, args) => {
|
||||||
bot.connect();
|
bot.connect();
|
||||||
restBot.connect();
|
restBot.connect();
|
||||||
webserver.run();
|
webserver.run();
|
||||||
greeting.enable(bot);
|
greeting.init(bot);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue