Remove now un-necessary subscription functionality

This commit is contained in:
benji7425 2017-05-17 18:55:15 +01:00
parent cdd7cb056b
commit 33a8db54fb
2 changed files with 0 additions and 56 deletions

View File

@ -11,8 +11,6 @@
"youtubeMode": true,
"allowSubscriptions": true,
"userCommands": {
"subscribe": "!subscribe",
"unsubscribe": "!unsubscribe",
"help": "!help"
},
"developerCommands": {

View File

@ -35,18 +35,6 @@ module.exports = {
},
commands: [
{
command: Config.userCommands.subscribe,
type: "equals",
action: (bot, user, userID, channelID, message) => { if (Config.allowSubscriptions) Subscriptions.subscribe(bot, user, userID, channelID, message); },
channelIDs: [Config.channelID]
},
{
command: Config.userCommands.unsubscribe,
type: "equals",
action: (bot, user, userID, channelID, message) => { if (Config.allowSubscriptions) Subscriptions.unsubscribe(bot, user, userID, channelID, message); },
channelIDs: [Config.channelID]
},
{
command: Config.userCommands.help,
type: "equals",
@ -121,48 +109,6 @@ var Actions = {
},
};
var Subscriptions = {
subscribe: function (bot, user, userID, channelID, message) {
bot.addToRole({
serverID: bot.channels[Config.channelID].guild_id,
userID: userID,
roleID: Config.subscribersRoleID
},
(err) => {
if (err) Console.log(err); //log the error if there is an error
else { //else go ahead and confirm subscription
Console.info("Subscribed user " + (user ? user + "(" + userID + ")" : userID));
bot.sendMessage({
to: channelID,
message: "You have successfully subscribed"
}, (err, response) => { setTimeout(() => { bot.deleteMessage({ channelID: channelID, messageID: response.id }); }, Config.messageDeleteDelay); }); //delete the subscription confirmation message after a delay
}
});
},
unsubscribe: function (bot, user, userID, channelID, message) {
bot.removeFromRole({
serverID: bot.channels[Config.channelID].guild_id,
userID: userID,
roleID: Config.subscribersRoleID
},
(err) => {
if (err) Console.log(err); //log the error if there is an error
else { //else go ahead and confirm un-subscription
Console.info("Unsubscribed user " + (user ? user + "(" + userID + ")" : userID));
bot.sendMessage({
to: channelID,
message: "You have successfully unsubscribed"
}, (err, response) => { setTimeout(() => { bot.deleteMessage({ channelID: channelID, messageID: response.id }); }, Config.messageDeleteDelay); }); //delete the un-subscription confirmation message after a delay
}
});
}
};
var YouTube = {
url: {
share: "http://youtu.be/",