style: run format:apply
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
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')
|
||||
@@ -11,21 +15,22 @@ const cmd: Command = {
|
||||
builder: builder,
|
||||
execute: async (interaction: ChatInputCommandInteraction): Promise<void> => {
|
||||
const responseEmbed = new EmbedBuilder()
|
||||
.setColor("Blurple")
|
||||
.setTitle("Command List");
|
||||
.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");
|
||||
.map(
|
||||
({ builder }) => `• **${builder?.name}** - ${builder?.description}`
|
||||
)
|
||||
.join('\n');
|
||||
|
||||
responseEmbed.addFields({ name: info.name, value: fieldBody });
|
||||
});
|
||||
|
||||
await interaction.reply({ embeds: [responseEmbed] });
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
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')
|
||||
|
||||
@@ -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,7 +63,7 @@ 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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user