mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-03 15:07:26 +02:00
9bd39c69ca
sinon il y a pleins de truc comme les anti raid , des coorectif ect
25 lines
1.1 KiB
JavaScript
25 lines
1.1 KiB
JavaScript
const axios = require('axios');
|
|
const BlaguesAPI = require('blagues-api');
|
|
const { EmbedBuilder } = require('discord.js');
|
|
|
|
module.exports = {
|
|
name: 'blague',
|
|
description: 'Envoie une blague au hasard.',
|
|
emote: '😄',
|
|
utilisation: 'blague ',
|
|
category: 'utils',
|
|
|
|
async execute(message, args, client) {
|
|
const blagues = new BlaguesAPI("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiMjcyNzI0MTA4NjQ1NDk4ODgwIiwibGltaXQiOjEwMCwia2V5Ijoib3V6cDQ2cjhkT3NlV1I1ZmlmcDNCc1pZSDBGWHJsb0lBQmtSTXpmcnpJalp3NmVidEciLCJjcmVhdGVkX2F0IjoiMjAyNC0wMy0wNVQxODowMjozOCswMDowMCIsImlhdCI6MTcwOTY2MTc1OH0.i-hNHrRXSdceVa_4ozInjVAapkK6KNRPt1PjO5z6I7g");
|
|
const blague = await blagues.random();
|
|
const question = blague.joke;
|
|
const reponse = blague.answer;
|
|
const randomColor = Math.floor(Math.random() * 16777215).toString(16);
|
|
|
|
const blagueEmbed = new EmbedBuilder()
|
|
.setDescription(`**${question}**\n➜ ||${reponse}||`)
|
|
.setColor(parseInt(randomColor, 16))
|
|
|
|
message.reply({ embeds: [blagueEmbed] });
|
|
},
|
|
};
|