mirror of
https://github.com/SrIzan10/vinci.git
synced 2026-07-05 06:49:43 +00:00
15 lines
607 B
TypeScript
15 lines
607 B
TypeScript
import { commandModule, CommandType } from '@sern/handler'
|
|
import axios from "axios";
|
|
import { publish } from "../../src/plugins/publish.js";
|
|
|
|
export default commandModule({
|
|
name: 'chiste',
|
|
type: CommandType.Slash,
|
|
plugins: [publish()],
|
|
description: 'Enseña un chiste en inglés.',
|
|
execute: async (ctx, args) => {
|
|
const jokeJSON = await axios(
|
|
'https://v2.jokeapi.dev/joke/Programming,Miscellaneous,Spooky,Christmas?blacklistFlags=nsfw,religious,racist,sexist,explicit'
|
|
).then((res) => res.data);
|
|
ctx.reply({content: `${jokeJSON.joke || jokeJSON.setup}\n${jokeJSON.delivery || ""}`})
|
|
}}) |