feat: add tts commands

This commit is contained in:
2026-01-13 18:37:21 -03:00
parent 889b86b019
commit 07da7538ba
6 changed files with 302 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
import {
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');
const cmd: Command = {
name: builder.name,
builder: builder,
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;
}
const guildData = await DatabaseManager.get.getGuild(interaction.guild.id);
await guildData.set('tts_channel', interaction.channelId);
await guildData.save();
interaction.editReply('TTS channel updated.');
}
};
export default cmd;