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));
}
} 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 {
ChatInputCommandInteraction,
MessageFlags,
SlashCommandBuilder
ChatInputCommandInteraction,
MessageFlags,
SlashCommandBuilder
} from 'discord.js';
import { Command } from '../../commands';
import { DatabaseManager } from '../../modules/db';
const builder = new SlashCommandBuilder()
.setName('tts-channel')
.setDescription('Sets the channel where TTS messages will be read from');
.setName('tts-channel')
.setDescription('Sets the channel where TTS messages will be read from');
const cmd: Command = {
name: builder.name,
builder: builder,
name: builder.name,
builder: builder,
execute: async (interaction: ChatInputCommandInteraction): Promise<void> => {
await interaction.deferReply({ flags: MessageFlags.Ephemeral });
execute: async (interaction: ChatInputCommandInteraction): Promise<void> => {
await interaction.deferReply({ flags: MessageFlags.Ephemeral });
if (!interaction.guild) {
interaction.editReply('This message can only be executed on guilds');
return;
}
if (!interaction.guild) {
interaction.editReply('This message can only be executed on guilds');
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.save();
await guildData.set('tts_channel', interaction.channelId);
await guildData.save();
interaction.editReply('TTS channel updated.');
}
interaction.editReply('TTS channel updated.');
}
};
export default cmd;
+1 -6
View File
@@ -1,9 +1,4 @@
import {
DataTypes,
Model,
ModelStatic,
Sequelize
} from 'sequelize';
import { DataTypes, Model, ModelStatic, Sequelize } from 'sequelize';
export class DatabaseManager {
private readonly db: Sequelize;