Add commands to config
This commit is contained in:
parent
269c1f9954
commit
939e6f5946
21
app/bot.js
21
app/bot.js
|
@ -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
|
||||
}
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue