From 32fa66877051a0511e1a359a557b90ce283c87ad Mon Sep 17 00:00:00 2001 From: Miikka Virtanen Date: Mon, 24 Jul 2017 02:09:06 +0300 Subject: [PATCH] Clarify the name of the exported function from greeting --- src/greeting.js | 4 ++-- src/index.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/greeting.js b/src/greeting.js index 306e3fd..af2dc53 100644 --- a/src/greeting.js +++ b/src/greeting.js @@ -4,7 +4,7 @@ const config = require('../config'); const greetingGuildId = config.mainGuildId || config.greetingGuildId; -function enable(bot) { +function init(bot) { if (! config.enableGreeting) return; bot.on('guildMemberAdd', (guild, member) => { @@ -30,5 +30,5 @@ function enable(bot) { } module.exports = { - enable, + init, }; diff --git a/src/index.js b/src/index.js index 7b66d7e..14dafd0 100644 --- a/src/index.js +++ b/src/index.js @@ -253,7 +253,7 @@ function reply(msg, text, anonymous = false) { msg.channel.createMessage(`[${timestamp}] ยป ${logContent}`); }, (err) => { 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) { msg.channel.createMessage(`Could not send reply; error code ${err.resp.statusCode}`); } else { @@ -430,5 +430,5 @@ bot.registerCommand('logs', (msg, args) => { bot.connect(); restBot.connect(); webserver.run(); -greeting.enable(bot); +greeting.init(bot);