mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-07 14:55:40 +02:00
Be Like Bill
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const snekfetch = require('snekfetch');
|
||||
|
||||
module.exports = class BeLikeBillCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'be-like-bill',
|
||||
aliases: ['be-like'],
|
||||
group: 'image-edit',
|
||||
memberName: 'be-like-bill',
|
||||
description: 'Sends a "Be Like Bill" meme with the name of your choice.',
|
||||
clientPermissions: ['ATTACH_FILES'],
|
||||
args: [
|
||||
{
|
||||
key: 'name',
|
||||
prompt: 'What should the name on the meme be?',
|
||||
type: 'string',
|
||||
default: 'Bill'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg, { name }) {
|
||||
try {
|
||||
const { body } = await snekfetch
|
||||
.get('http://belikebill.azurewebsites.net/billgen-API.php')
|
||||
.query({
|
||||
default: 1,
|
||||
name
|
||||
});
|
||||
return msg.say({ files: [{ attachment: body, name: 'be-like-bill.png' }] });
|
||||
} catch (err) {
|
||||
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiaobot",
|
||||
"version": "42.0.0",
|
||||
"version": "42.1.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Shard.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user