mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-13 08:09:52 +02:00
grand commit que tutur attend ( marche pas le raidmode en dev)
sinon il y a pleins de truc comme les anti raid , des coorectif ect
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
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] });
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user