diff options
| author | 8cy <[email protected]> | 2020-05-05 17:49:49 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-05-05 17:49:49 -0700 |
| commit | 76de31680712004ca83880c8ef6d8ffa6b291f7e (patch) | |
| tree | 35e6d3c94ac72fe267d69d5b3758266c02f5acc7 /src/commands/bot/api.ts | |
| parent | make default status cmd response uwufier's status (diff) | |
| download | dep-core-76de31680712004ca83880c8ef6d8ffa6b291f7e.tar.xz dep-core-76de31680712004ca83880c8ef6d8ffa6b291f7e.zip | |
add api cmd, formatting, add cors to server
Diffstat (limited to 'src/commands/bot/api.ts')
| -rw-r--r-- | src/commands/bot/api.ts | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/commands/bot/api.ts b/src/commands/bot/api.ts new file mode 100644 index 0000000..ff89fd8 --- /dev/null +++ b/src/commands/bot/api.ts @@ -0,0 +1,26 @@ +import { Command, CommandoMessage } from 'discord.js-commando'; +import emoji from 'emoji-random'; +import { MessageEmbed } from 'discord.js'; + +module.exports = class APIBot extends Command { + constructor(client) { + super(client, { + name: 'api', + group: 'bot', + memberName: 'api', + description: 'Gives you uwufier\'s API link and documentation.', + examples: ['uwu!api'], + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + throttling: { + usages: 5, + duration: 30 + }, + }); + } + run(msg: CommandoMessage) { + let emb = new MessageEmbed() + .setDescription('Here\'s a link to my [API](https://kyzer.co/discord/bots/uwufier/api/v1/). (To use, copy the given URL, then append the API endpoints looking to get to it.) As for documentation, it is currently under heavy re-writing. As soon as the documentation goes live, you can read through it on the [official uwufier website](https://kyzer.co/discord/bots/uwufier/)!' + emoji.random()) + msg.say(emb) + } +};
\ No newline at end of file |