style: run format:apply

This commit is contained in:
2026-01-14 22:36:07 -03:00
parent c005bc0e54
commit 294e256feb
5 changed files with 54 additions and 45 deletions
+27 -22
View File
@@ -1,32 +1,37 @@
import { ChatInputCommandInteraction, EmbedBuilder, SlashCommandBuilder } from "discord.js";
import { Command } from "../../commands";
import { Bot } from "../../bot";
import {
ChatInputCommandInteraction,
EmbedBuilder,
SlashCommandBuilder
} from 'discord.js';
import { Command } from '../../commands';
import { Bot } from '../../bot';
const builder = new SlashCommandBuilder()
.setName('commands')
.setDescription('Shows a list of all the commands.');
.setName('commands')
.setDescription('Shows a list of all the commands.');
const cmd: Command = {
name: builder.name,
builder: builder,
execute: async (interaction: ChatInputCommandInteraction): Promise<void> => {
const responseEmbed = new EmbedBuilder()
.setColor("Blurple")
.setTitle("Command List");
name: builder.name,
builder: builder,
execute: async (interaction: ChatInputCommandInteraction): Promise<void> => {
const responseEmbed = new EmbedBuilder()
.setColor('Blurple')
.setTitle('Command List');
const bot = Bot.get;
bot.getCategories().forEach(({ info, commands }) => {
const fieldBody = commands
.filter(({ builder }) => builder)
.map(({ builder }) => `• **${builder?.name}** - ${builder?.description}`)
.join("\n");
const bot = Bot.get;
bot.getCategories().forEach(({ info, commands }) => {
const fieldBody = commands
.filter(({ builder }) => builder)
.map(
({ builder }) => `• **${builder?.name}** - ${builder?.description}`
)
.join('\n');
responseEmbed.addFields({ name: info.name, value: fieldBody });
});
responseEmbed.addFields({ name: info.name, value: fieldBody });
});
await interaction.reply({ embeds: [responseEmbed] });
}
await interaction.reply({ embeds: [responseEmbed] });
}
};
export default cmd;
+9 -9
View File
@@ -1,16 +1,16 @@
import { ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js";
import { Command } from "../../commands";
import { ChatInputCommandInteraction, SlashCommandBuilder } from 'discord.js';
import { Command } from '../../commands';
const builder = new SlashCommandBuilder()
.setName('ping')
.setDescription('Pong.');
.setName('ping')
.setDescription('Pong.');
const cmd: Command = {
name: builder.name,
builder: builder,
execute: async (interaction: ChatInputCommandInteraction): Promise<void> => {
interaction.reply('pong!');
}
name: builder.name,
builder: builder,
execute: async (interaction: ChatInputCommandInteraction): Promise<void> => {
interaction.reply('pong!');
}
};
export default cmd;
+12 -9
View File
@@ -42,15 +42,18 @@ const cmd: Command = {
}
const voiceChannel = member.voice.channel;
if (voiceChannel.userLimit != 0 && voiceChannel.members.size >= voiceChannel.userLimit) {
if (
voiceChannel.userLimit != 0 &&
voiceChannel.members.size >= voiceChannel.userLimit
) {
interaction.reply('Channel is full');
return;
}
const perms = voiceChannel.permissionsFor(me)
const perms = voiceChannel.permissionsFor(me);
if (!perms.has(PermissionsBitField.Flags.ViewChannel)) {
interaction.reply("I don't have permissions to see that channel")
interaction.reply("I don't have permissions to see that channel");
return;
}
@@ -60,16 +63,16 @@ const cmd: Command = {
}
if (!perms.has(PermissionsBitField.Flags.Speak)) {
interaction.reply("I don't have permissions to speak on that channel")
interaction.reply("I don't have permissions to speak on that channel");
return;
}
const voiceOptions: JoinVoiceChannelOptions & CreateVoiceConnectionOptions =
{
channelId: member.voice.channelId,
guildId: interaction.guild.id,
adapterCreator: interaction.guild.voiceAdapterCreator
};
{
channelId: member.voice.channelId,
guildId: interaction.guild.id,
adapterCreator: interaction.guild.voiceAdapterCreator
};
const connection = await joinVoiceChannel(voiceOptions);
if (!connection) {
+3 -1
View File
@@ -11,7 +11,9 @@ const ttsGoogle: TTSModule = {
name: 'Google',
defaultVoice: 'en',
async getVoices(): Promise<string[]> { return GOOGLE_TTS_VOICES.voices },
async getVoices(): Promise<string[]> {
return GOOGLE_TTS_VOICES.voices;
},
async generate(voice: string, text: string): Promise<TTSResponse> {
const query = new URLSearchParams({
+1 -2
View File
@@ -83,8 +83,7 @@ class PollyTTS implements TTSModule {
}
canBeUsed(): boolean {
if (!config.aws_access_id || !config.aws_access_key)
return false;
if (!config.aws_access_id || !config.aws_access_key) return false;
return true;
}