Fixed missed stuff

This commit is contained in:
Dragon Fire
2024-04-07 19:13:13 -04:00
parent f59826f7ab
commit 03c2855b3a
7 changed files with 16 additions and 11 deletions
+1
View File
@@ -1,4 +1,5 @@
const Command = require('../../framework/Command');
const { PermissionFlagsBits } = require('discord.js');
const { MOCKING_EMOJI_ID, MOCKING_EMOJI_NAME } = process.env;
module.exports = class MockingCommand extends Command {
+1 -1
View File
@@ -1,6 +1,6 @@
const Command = require('../../framework/Command');
const request = require('node-superfetch');
const { EmbedBuilder } = require('discord.js');
const { EmbedBuilder, PermissionFlagsBits } = require('discord.js');
const { shorten } = require('../../util/Util');
const logos = require('../../assets/json/logos');
const { GOV_KEY } = process.env;
+5 -1
View File
@@ -66,7 +66,11 @@ module.exports = class TwentyQuestionsCommand extends Command {
const row = rows[Math.floor(i / 5)];
const components = answers.slice(i, i + 5);
for (const component of components) {
row.addComponents(new ButtonBuilder().setCustomId(component).setStyle(ButtonStyle.Primary).setLabel(component));
const button = new ButtonBuilder()
.setCustomId(component)
.setStyle(ButtonStyle.Primary)
.setLabel(component);
row.addComponents(button);
}
}
const sRow = new ActionRowBuilder();
+1 -1
View File
@@ -1,5 +1,5 @@
const Command = require('../../framework/Command');
const { EmbedBuilder } = require('discord.js');
const { EmbedBuilder, PermissionFlagsBits } = require('discord.js');
const request = require('node-superfetch');
const { stripIndents } = require('common-tags');
const logos = require('../../assets/json/logos');
+4 -1
View File
@@ -34,7 +34,10 @@ module.exports = class AvatarCommand extends Command {
const embed = new EmbedBuilder()
.setTitle(user.tag)
.setDescription(
formats.map(fmt => embedURL(displayFmts[fmt], user.displayAvatarURL({ extension: fmt, size: 2048 }))).join(' | ')
formats.map(fmt => {
const avatar = user.displayAvatarURL({ extension: fmt, size: 2048 });
return embedURL(displayFmts[fmt], avatar);
}).join(' | ')
)
.setImage(user.displayAvatarURL({ format, size: 2048 }))
.setColor(0x00AE86);
+2 -1
View File
@@ -2,6 +2,7 @@ const Command = require('../../framework/Command');
const { PermissionFlagsBits } = require('discord.js');
const { joinVoiceChannel } = require('@discordjs/voice');
const Dispatcher = require('../../structures/Dispatcher');
const perms = [PermissionFlagsBits.Connect, PermissionFlagsBits.Speak, PermissionFlagsBits.ViewChannel];
module.exports = class JoinCommand extends Command {
constructor(client) {
@@ -20,7 +21,7 @@ module.exports = class JoinCommand extends Command {
run(msg) {
const voiceChannel = msg.member.voice.channel;
if (!voiceChannel) return msg.reply('Please enter a voice channel first.');
if (!voiceChannel.permissionsFor(this.client.user).has([PermissionFlagsBits.Connect, PermissionFlagsBits.Speak, 'VIEW_CHANNEL'])) {
if (!voiceChannel.permissionsFor(this.client.user).has(perms)) {
return msg.reply('I\'m missing the "Connect", "Speak", or "View Channel" permission for this channel.');
}
if (!voiceChannel.joinable) return msg.reply('Your voice channel is not joinable.');
+2 -6
View File
@@ -59,15 +59,11 @@ module.exports = [
type: ActivityType.Playing
},
{
text: (client) => `${formatNumber(client.guilds.cache.size)} servers`,
text: client => `${formatNumber(client.guilds.cache.size)} servers`,
type: ActivityType.Watching
},
{
text: (client) => `with ${formatNumber(client.registry.commands.size)} commands`,
text: client => `with ${formatNumber(client.registry.commands.size)} commands`,
type: ActivityType.Playing
},
{
text: (client) => `${formatNumber(client.channels.cache.size)} channels`,
type: ActivityType.Watching
}
];