style: formatting

This commit is contained in:
2026-01-13 20:05:08 -03:00
parent 8e98b38fa8
commit 21c69329ee
3 changed files with 21 additions and 26 deletions
+1 -1
View File
@@ -78,7 +78,7 @@ class TTSListener implements Command {
queue.enqueue(Readable.from(audio.data)); queue.enqueue(Readable.from(audio.data));
} }
} catch (err) { } catch (err) {
this.log.error('error occurred while processing TTS message (%s)', err); this.log.error('Error occurred while processing TTS message (%s)', err);
} }
}; };
+18 -18
View File
@@ -1,34 +1,34 @@
import { import {
ChatInputCommandInteraction, ChatInputCommandInteraction,
MessageFlags, MessageFlags,
SlashCommandBuilder SlashCommandBuilder
} from 'discord.js'; } from 'discord.js';
import { Command } from '../../commands'; import { Command } from '../../commands';
import { DatabaseManager } from '../../modules/db'; import { DatabaseManager } from '../../modules/db';
const builder = new SlashCommandBuilder() const builder = new SlashCommandBuilder()
.setName('tts-channel') .setName('tts-channel')
.setDescription('Sets the channel where TTS messages will be read from'); .setDescription('Sets the channel where TTS messages will be read from');
const cmd: Command = { const cmd: Command = {
name: builder.name, name: builder.name,
builder: builder, builder: builder,
execute: async (interaction: ChatInputCommandInteraction): Promise<void> => { execute: async (interaction: ChatInputCommandInteraction): Promise<void> => {
await interaction.deferReply({ flags: MessageFlags.Ephemeral }); await interaction.deferReply({ flags: MessageFlags.Ephemeral });
if (!interaction.guild) { if (!interaction.guild) {
interaction.editReply('This message can only be executed on guilds'); interaction.editReply('This message can only be executed on guilds');
return; return;
} }
const guildData = await DatabaseManager.get.getGuild(interaction.guild.id); const guildData = await DatabaseManager.get.getGuild(interaction.guild.id);
await guildData.set('tts_channel', interaction.channelId); await guildData.set('tts_channel', interaction.channelId);
await guildData.save(); await guildData.save();
interaction.editReply('TTS channel updated.'); interaction.editReply('TTS channel updated.');
} }
}; };
export default cmd; export default cmd;
+1 -6
View File
@@ -1,9 +1,4 @@
import { import { DataTypes, Model, ModelStatic, Sequelize } from 'sequelize';
DataTypes,
Model,
ModelStatic,
Sequelize
} from 'sequelize';
export class DatabaseManager { export class DatabaseManager {
private readonly db: Sequelize; private readonly db: Sequelize;