Add commands to config

This commit is contained in:
benji7425 2017-09-01 18:19:48 +01:00
parent 269c1f9954
commit 939e6f5946
2 changed files with 36 additions and 3 deletions

View File

@ -3,11 +3,26 @@ const GuildData = require("./models/guild-data.js");
module.exports = {
onCommand(commandObj, commandsObj, params, guildData, message) {
switch (commandObj.command) {
case commandsObj.commandName.command:
return; //return promise!
case commandsObj.addFeed.command:
return addFeed();
case commandsObj.removeFeed.command:
return removeFeed();
case commandsObj.viewFeeds.command:
return viewFeeds();
}
},
onNonCommandMsg(message, guildData) {
return;
}
};
function addFeed() {
//todo
}
function removeFeed() {
//todo
}
function viewFeeds() {
//todo
}

View File

@ -17,6 +17,24 @@
"description": "Display information about commands available to you",
"syntax": "help",
"admin": false
},
"addFeed": {
"command": "add-feed",
"description": "Add an RSS feed to be posted in a channel, with an optional role to tag",
"syntax": "add-feed <url> <#channel> [@role]",
"admin": true
},
"removeFeed": {
"command": "remove-feed",
"description": "Remove an RSS feed by it's ID",
"syntax": "remove-feed <id>",
"admin": true
},
"viewFeeds": {
"command": "view-feeds",
"description": "View a list of configured feeds and their associated details",
"syntax": "view-feed",
"admin": true
}
}
}