Merge pull request #290 from lbryio/member-fetch-changes

Removed debug logging in releasenotes
This commit is contained in:
Ralph 2019-12-29 19:46:13 -05:00 committed by GitHub
commit 3c2b4a67b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 19 deletions

View file

@ -74,20 +74,6 @@ bot.on('error', function(error) {
function checkMessageForCommand(msg, isEdit) {
//check if message is a command
if (msg.author.id !== bot.user.id && msg.content.startsWith(config.prefix)) {
//check if user is Online
if (!msg.author.presence.status || msg.author.presence.status === 'offline' || msg.author.presence.status === 'invisible') {
msg.author.send('Please set your Discord Presence to Online to talk to the bot!').catch(function(error) {
msg.channel
.send(
msg.author +
', Please enable Direct Messages from server members to communicate fully with our bot, ' +
'it is located in the user setting area under Privacy & Safety tab, ' +
'select the option allow direct messages from server members'
)
.then(msg.channel.send('Please set your Discord Presence to Online to talk to the Bot!'));
return;
});
}
let cmdTxt = msg.content.split(' ')[0].substring(config.prefix.length);
let suffix = msg.content.substring(cmdTxt.length + config.prefix.length + 1); //add one for the ! and one for the space
if (msg.isMentioned(bot.user)) {
@ -184,7 +170,6 @@ function checkMessageForCommand(msg, isEdit) {
if (msg.author == bot.user) {
return;
}
if (msg.author !== bot.user && msg.isMentioned(bot.user)) {
msg.channel.send('yes?'); //using a mention here can lead to looping
} else {

View file

@ -12,15 +12,11 @@ exports.releasenotes = {
usage: '<desktop/android>',
description: 'gets current release notes from GitHub, for either Desktop or Android',
process: function(bot, msg, suffix) {
console.log('Suffix is: ' + suffix);
let releaseType = suffix.toLowerCase();
console.log('Release Type is ' + releaseType);
let releaseTypePost = null;
if (releaseType === 'android post' || releaseType === 'desktop post') {
releaseTypePost = releaseType.charAt(0).toUpperCase() + releaseType.slice(1, 7);
console.log('ReleaseType is ' + releaseType);
console.log('ReleaseTypePost is ' + releaseTypePost);
console.log('Post message detected ' + releaseTypePost);
}
let releaseTypeName = releaseType.charAt(0).toUpperCase() + releaseType.slice(1);