From 02d8baf282a498c5d5e58e30d1a2234de073ceed Mon Sep 17 00:00:00 2001 From: MSFTserver Date: Thu, 9 Nov 2017 14:29:07 -0800 Subject: [PATCH 1/2] add message to send DM to tipbot --- bot/modules/tipbot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot/modules/tipbot.js b/bot/modules/tipbot.js index 912bc4e..f969376 100644 --- a/bot/modules/tipbot.js +++ b/bot/modules/tipbot.js @@ -48,7 +48,7 @@ function doBalance(message, tipper) { function doDeposit(message, tipper) { if(!inPrivateOrBotSandbox(message)){ - message.reply('Please use <#369896313082478594> or DMs to talk to bots.'); + message.reply('Please use <#369896313082478594> or DM <@372832162572926987> to talk to tipbot.'); return; } getAddress(tipper, function(err, address) { @@ -64,7 +64,7 @@ function doDeposit(message, tipper) { function doWithdraw(message, tipper, words) { if(!inPrivateOrBotSandbox(message)){ - message.reply('Please use <#369896313082478594> or DMs to talk to bots.'); + message.reply('Please use <#369896313082478594> or DM <@372832162572926987> to talk to tipbot.'); return; } if (words.length < 4) { @@ -117,7 +117,7 @@ function doTip(message, tipper, words) { function doHelp(message) { if(!inPrivateOrBotSandbox(message)){ - message.reply('Please use <#369896313082478594> or DMs to talk to bots.'); + message.reply('Please use <#369896313082478594> or DM <@372832162572926987> to talk to tipbot.'); return; } message.reply('Sent you help via DM!'); -- 2.45.2 From e1791023616ca188eb42cd5aeab7cad0f38f3455 Mon Sep 17 00:00:00 2001 From: MSFTserver Date: Sat, 11 Nov 2017 13:59:24 -0800 Subject: [PATCH 2/2] move help message to variable --- bot/modules/tipbot.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bot/modules/tipbot.js b/bot/modules/tipbot.js index f969376..ebb98c8 100644 --- a/bot/modules/tipbot.js +++ b/bot/modules/tipbot.js @@ -12,6 +12,7 @@ exports.tip = { usage: "", description: 'balance: get your balance\n deposit: get adress for your deposits\n withdraw ADDRESS AMOUNT: withdraw AMOUNT credits to ADDRESS\n : mention a user with @ and then the amount to tip them', process: async function(bot,msg,suffix){ + var helpmessage = 'Please use <#369896313082478594> or DM <@372832162572926987> to talk to tipbot.' let tipper = msg.author.id, words = msg.content.trim().split(' ').filter( function(n){return n !== "";} ), subcommand = words.length >= 2 ? words[1] : 'help'; @@ -48,7 +49,7 @@ function doBalance(message, tipper) { function doDeposit(message, tipper) { if(!inPrivateOrBotSandbox(message)){ - message.reply('Please use <#369896313082478594> or DM <@372832162572926987> to talk to tipbot.'); + message.reply(helpmessage); return; } getAddress(tipper, function(err, address) { @@ -64,7 +65,7 @@ function doDeposit(message, tipper) { function doWithdraw(message, tipper, words) { if(!inPrivateOrBotSandbox(message)){ - message.reply('Please use <#369896313082478594> or DM <@372832162572926987> to talk to tipbot.'); + message.reply(helpmessage); return; } if (words.length < 4) { @@ -117,7 +118,7 @@ function doTip(message, tipper, words) { function doHelp(message) { if(!inPrivateOrBotSandbox(message)){ - message.reply('Please use <#369896313082478594> or DM <@372832162572926987> to talk to tipbot.'); + message.reply(helpmessage); return; } message.reply('Sent you help via DM!'); -- 2.45.2