Browse Source

Add commands to config

shorten
benji7425 4 years ago
parent
commit
939e6f5946
  1. 21
      app/bot.js
  2. 18
      app/config.json

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
}

18
app/config.json

@ -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…
Cancel
Save