From fdee7cdcca96cc25293e919437118c7492bd6797 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Tue, 21 Apr 2020 10:04:14 -0400 Subject: [PATCH] Idiot Command --- .env.example | 1 + README.md | 4 +++- commands/single/idiot.js | 25 +++++++++++++++++++++++++ package.json | 2 +- 4 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 commands/single/idiot.js diff --git a/.env.example b/.env.example index 2e10f027..5b2dbe5b 100644 --- a/.env.example +++ b/.env.example @@ -39,6 +39,7 @@ GITHUB_USERNAME= GOOGLE_CALENDAR_ID= GOOGLE_KEY= GOV_KEY= +IDIOT_PAGE_ID= IMGUR_KEY= OPENWEATHERMAP_KEY= OSU_KEY= diff --git a/README.md b/README.md index aba1b9ea..d62cee1e 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,7 @@ in the appropriate channel's topic to use it. ## Commands -Total: 395 +Total: 396 ### Utility: @@ -245,6 +245,7 @@ Total: 395 * **fly:** Sends a fake fly that looks surprisngly real. * **give-flower:** Gives Xiao Pai a flower. * **hi:** Hello. +* **idiot:** Responds with the Wikipedia page of an idiot. * **isnt-joke:** Isn't joke... * **its-joke:** It's joke! * **just-do-it:** Sends a link to the "Just Do It!" motivational speech. @@ -1146,6 +1147,7 @@ here. * wikihow ([API](https://www.wikihow.com/api.php)) - [Wikipedia](https://www.wikipedia.org/) * fact ([API](https://en.wikipedia.org/w/api.php)) + * idiot (URL) * itunes ([Language Code Data](https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes)) * time ([Time Zone Data](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)) * wikipedia ([API](https://en.wikipedia.org/w/api.php)) diff --git a/commands/single/idiot.js b/commands/single/idiot.js new file mode 100644 index 00000000..5b8018ff --- /dev/null +++ b/commands/single/idiot.js @@ -0,0 +1,25 @@ +const Command = require('../../structures/Command'); +const IDIOT_PAGE_ID = process.env.IDIOT_PAGE_ID || 'Donald_Trump'; + +module.exports = class IdiotCommand extends Command { + constructor(client) { + super(client, { + name: 'idiot', + aliases: ['moron'], + group: 'single', + memberName: 'idiot', + description: 'Responds with the Wikipedia page of an idiot.', + credit: [ + { + name: 'Wikipedia', + url: 'https://www.wikipedia.org/', + reason: 'URL' + } + ] + }); + } + + run(msg) { + return msg.say(`https://en.wikipedia.org/wiki/${IDIOT_PAGE_ID}`); + } +}; diff --git a/package.json b/package.json index af53d887..e8b7cbe5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "113.9.1", + "version": "113.10.0", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {