mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Boredom Command
This commit is contained in:
@@ -260,7 +260,7 @@ in the appropriate channel's topic to use it.
|
||||
|
||||
## Commands
|
||||
|
||||
Total: 573
|
||||
Total: 574
|
||||
|
||||
### Utility:
|
||||
|
||||
@@ -319,6 +319,7 @@ Total: 573
|
||||
* **acrostic:** Creates an acrostic from any word or name.
|
||||
* **advice:** Responds with a random bit of advice.
|
||||
* **axis-cult:** Responds with a teaching of the Axis Cult.
|
||||
* **boredom:** Responds with a random activity to try when you're bored.
|
||||
* **bunny-fact:** Responds with a random bunny fact.
|
||||
* **cat-fact:** Responds with a random cat fact.
|
||||
* **charlie-charlie:** Asks your question to Charlie.
|
||||
@@ -1008,6 +1009,8 @@ here.
|
||||
* screenshot ([NSFW Site List](https://raw.githubusercontent.com/blocklistproject/Lists/master/porn.txt))
|
||||
- [Bob Ross](https://www.bobross.com/)
|
||||
* bob-ross (Himself)
|
||||
- [Bored API](https://www.boredapi.com/)
|
||||
* boredom (API)
|
||||
- [Bowserinator](https://github.com/Bowserinator/)
|
||||
* periodic-table ([Periodic Table Data](https://github.com/Bowserinator/Periodic-Table-JSON))
|
||||
- [BrantSteele](https://brantsteele.com/)
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const request = require('node-superfetch');
|
||||
|
||||
module.exports = class BoredomCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'boredom',
|
||||
aliases: ['bored'],
|
||||
group: 'random-res',
|
||||
memberName: 'boredom',
|
||||
description: 'Responds with a random activity to try when you\'re bored.',
|
||||
credit: [
|
||||
{
|
||||
name: 'Bored API',
|
||||
url: 'https://www.boredapi.com/',
|
||||
reason: 'API'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg) {
|
||||
try {
|
||||
const { body } = await request.get('https://www.boredapi.com/api/activity/');
|
||||
return msg.say(`${body.activity} (${body.type}})`);
|
||||
} catch (err) {
|
||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
}
|
||||
};
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "124.3.3",
|
||||
"version": "124.4.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
@@ -44,14 +44,14 @@
|
||||
"discord.js": "^12.5.1",
|
||||
"discord.js-commando": "github:discordjs/Commando",
|
||||
"dotenv": "^8.2.0",
|
||||
"eslint": "^7.16.0",
|
||||
"eslint": "^7.17.0",
|
||||
"expr-eval": "^2.0.2",
|
||||
"gifencoder": "^2.0.1",
|
||||
"gm": "^1.23.1",
|
||||
"html-entities": "^1.4.0",
|
||||
"html-entities": "^2.0.2",
|
||||
"ioredis": "^4.19.4",
|
||||
"js-beautify": "^1.13.0",
|
||||
"mathjs": "^8.1.0",
|
||||
"mathjs": "^8.1.1",
|
||||
"moment": "^2.29.1",
|
||||
"moment-duration-format": "^2.3.2",
|
||||
"moment-timezone": "^0.5.32",
|
||||
@@ -66,7 +66,7 @@
|
||||
"winston": "^3.3.3"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"bufferutil": "^4.0.2",
|
||||
"bufferutil": "^4.0.3",
|
||||
"erlpack": "github:discord/erlpack",
|
||||
"sodium": "^3.0.2",
|
||||
"utf-8-validate": "^5.0.3",
|
||||
|
||||
Reference in New Issue
Block a user