mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 14:21:41 +02:00
Discord.js v14
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../framework/Command');
|
||||
const { Util: { escapeMarkdown } } = require('discord.js');
|
||||
const { escapeMarkdown, PermissionFlagsBits } = require('discord.js');
|
||||
const { stripIndents } = require('common-tags');
|
||||
const { shuffle } = require('../../util/Util');
|
||||
const Game = require('../../structures/cards-against-humanity/Game');
|
||||
@@ -15,7 +15,7 @@ module.exports = class ApplesToApplesCommand extends Command {
|
||||
description: 'Compete to see who can come up with the best card to match an adjective.',
|
||||
guildOnly: true,
|
||||
game: true,
|
||||
clientPermissions: ['ADD_REACTIONS', 'READ_MESSAGE_HISTORY'],
|
||||
clientPermissions: [PermissionFlagsBits.AddReactions, 'READ_MESSAGE_HISTORY'],
|
||||
credit: [
|
||||
{
|
||||
name: 'Mattel',
|
||||
|
||||
@@ -365,7 +365,7 @@ module.exports = class CarRaceCommand extends Command {
|
||||
userData.car = await loadImage(
|
||||
path.join(__dirname, '..', '..', 'assets', 'images', 'car-race', 'cars', `${car}.png`)
|
||||
);
|
||||
const userAvatar = await request.get(msg.author.displayAvatarURL({ format: 'png', size: 128 }));
|
||||
const userAvatar = await request.get(msg.author.displayAvatarURL({ extension: 'png', size: 128 }));
|
||||
userData.avatar = await loadImage(userAvatar.body);
|
||||
let difficulty;
|
||||
const available = cars.filter(car2 => car !== car2);
|
||||
@@ -412,7 +412,7 @@ module.exports = class CarRaceCommand extends Command {
|
||||
);
|
||||
}
|
||||
}
|
||||
const oppoAvatar = await request.get(opponent.displayAvatarURL({ format: 'png', size: 128 }));
|
||||
const oppoAvatar = await request.get(opponent.displayAvatarURL({ extension: 'png', size: 128 }));
|
||||
oppoData.avatar = await loadImage(oppoAvatar.body);
|
||||
let lastRoundWinner;
|
||||
let lastTurnTimeout = false;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const Command = require('../../framework/Command');
|
||||
const { Util: { escapeMarkdown } } = require('discord.js');
|
||||
const { escapeMarkdown, PermissionFlagsBits } = require('discord.js');
|
||||
const { stripIndents } = require('common-tags');
|
||||
const { shuffle } = require('../../util/Util');
|
||||
const Game = require('../../structures/cards-against-humanity/Game');
|
||||
@@ -16,7 +16,7 @@ module.exports = class CardsAgainstHumanityCommand extends Command {
|
||||
guildOnly: true,
|
||||
nsfw: true,
|
||||
game: true,
|
||||
clientPermissions: ['ADD_REACTIONS', 'READ_MESSAGE_HISTORY'],
|
||||
clientPermissions: [PermissionFlagsBits.AddReactions, 'READ_MESSAGE_HISTORY'],
|
||||
credit: [
|
||||
{
|
||||
name: 'Cards Against Humanity',
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
const Command = require('../../framework/Command');
|
||||
const { PermissionFlagsBits } = require('discord.js');
|
||||
const { stripIndents, oneLine } = require('common-tags');
|
||||
const { Collection } = require('@discordjs/collection');
|
||||
const { delay, awaitPlayers, list, reactIfAble } = require('../../util/Util');
|
||||
@@ -15,7 +16,7 @@ module.exports = class ImposterCommand extends Command {
|
||||
description: 'Who is the imposter among us?',
|
||||
guildOnly: true,
|
||||
game: true,
|
||||
clientPermissions: ['ADD_REACTIONS', 'READ_MESSAGE_HISTORY'],
|
||||
clientPermissions: [PermissionFlagsBits.AddReactions, 'READ_MESSAGE_HISTORY'],
|
||||
args: [
|
||||
{
|
||||
key: 'playersCount',
|
||||
|
||||
Reference in New Issue
Block a user