if(err)Log.raw(err);//log the error if there is an error
else{//else go ahead and confirm subscription
Log.event("Subscribed user "+(user?user+"("+userID+")":userID));
DiscordClient.bot.sendMessage({
to:channelID,
message:"You have successfully subscribed"
},(err,response)=>{setTimeout(()=>{DiscordClient.bot.deleteMessage({channelID:channelID,messageID:response.id});},Config.messageDeleteDelay);});//delete the subscription confirmation message after a delay
}
});
Log.event("Subscribed user "+(user?user+"("+userID+")":userID));
DiscordClient.bot.sendMessage({
to:channelID,
message:"You have successfully subscribed"
},(err,response)=>{setTimeout(()=>{DiscordClient.bot.deleteMessage({channelID:channelID,messageID:response.id});},Config.messageDeleteDelay);});//delete the subscription confirmation message after a delay
Log.event("Unsubscribed user "+(user?user+"("+userID+")":userID));
DiscordClient.bot.sendMessage({
to:channelID,
message:"You have successfully unsubscribed"
},(err,response)=>{setTimeout(()=>{DiscordClient.bot.deleteMessage({channelID:channelID,messageID:response.id});},Config.messageDeleteDelay);});//delete the un-subscription confirmation message after a delay
},
(err)=>{
if(err)Log.raw(err);//log the error if there is an error
else{//else go ahead and confirm un-subscription
Log.event("Unsubscribed user "+(user?user+"("+userID+")":userID));
DiscordClient.bot.sendMessage({
to:channelID,
message:"You have successfully unsubscribed"
},(err,response)=>{setTimeout(()=>{DiscordClient.bot.deleteMessage({channelID:channelID,messageID:response.id});},Config.messageDeleteDelay);});//delete the un-subscription confirmation message after a delay