add jokes kekw
This commit is contained in:
parent
4dd06821d1
commit
8c5b317e11
3 changed files with 16 additions and 1 deletions
11
src/commands/joke.ts
Normal file
11
src/commands/joke.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import type { CacheType, ChatInputCommandInteraction } from 'discord.js';
|
||||
|
||||
export const jokeCommand = async (
|
||||
i: ChatInputCommandInteraction<CacheType>
|
||||
) => {
|
||||
await i.deferReply();
|
||||
const joke = await fetch('https://icanhazdadjoke.com', {
|
||||
headers: { Accept: 'text/plain' },
|
||||
}).then((r) => r.text());
|
||||
await i.editReply(joke);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue