diff --git a/commands/reddit/russia.js b/commands/reddit/russia.js new file mode 100644 index 00000000..7115048a --- /dev/null +++ b/commands/reddit/russia.js @@ -0,0 +1,19 @@ +const subreddit = 'russiapics'; + +const { getRedditImage } = require('../../lib/Internet'); +const log = require('log4js').getLogger('amy'); + +/** + * Returns a random photo from /r/RussiasPics + * @param {Message} msg Command + * @param {Array} args Arguments + */ +module.exports = async (msg, args) => { + try { + getRedditImage(function (data = 'Loading...') { + msg.channel.send(data); + }, subreddit); + } catch (err) { + log.error(`While trying to grab a Reddit /r/RussiaPics picture I got ${err}`); + } +} \ No newline at end of file diff --git a/config/commands.json b/config/commands.json index ca261421..ab09f7ab 100644 --- a/config/commands.json +++ b/config/commands.json @@ -485,6 +485,12 @@ "description": "Get the server rules!", "alias": [] }, + { + "name": "See Russia", + "command": "russia", + "description": "Communism?", + "alias": [] + }, { "name": "Google", "command": "search", diff --git a/config/foldermap.json b/config/foldermap.json index 745ba378..8bb9956f 100644 --- a/config/foldermap.json +++ b/config/foldermap.json @@ -106,6 +106,7 @@ "rockpaperscissors": "games", "roll": "games", "rules": "utility", + "russia": "reddit", "say": "admin", "search": "internet", "selfharm": "utility",