Add commands to config
This commit is contained in:
parent
269c1f9954
commit
939e6f5946
19
app/bot.js
19
app/bot.js
|
@ -3,11 +3,26 @@ const GuildData = require("./models/guild-data.js");
|
||||||
module.exports = {
|
module.exports = {
|
||||||
onCommand(commandObj, commandsObj, params, guildData, message) {
|
onCommand(commandObj, commandsObj, params, guildData, message) {
|
||||||
switch (commandObj.command) {
|
switch (commandObj.command) {
|
||||||
case commandsObj.commandName.command:
|
case commandsObj.addFeed.command:
|
||||||
return; //return promise!
|
return addFeed();
|
||||||
|
case commandsObj.removeFeed.command:
|
||||||
|
return removeFeed();
|
||||||
|
case commandsObj.viewFeeds.command:
|
||||||
|
return viewFeeds();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onNonCommandMsg(message, guildData) {
|
onNonCommandMsg(message, guildData) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function addFeed() {
|
||||||
|
//todo
|
||||||
|
}
|
||||||
|
|
||||||
|
function removeFeed() {
|
||||||
|
//todo
|
||||||
|
}
|
||||||
|
function viewFeeds() {
|
||||||
|
//todo
|
||||||
|
}
|
|
@ -17,6 +17,24 @@
|
||||||
"description": "Display information about commands available to you",
|
"description": "Display information about commands available to you",
|
||||||
"syntax": "help",
|
"syntax": "help",
|
||||||
"admin": false
|
"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 a new issue