From 0435056271ca03374e5be0aee015d665cc0c3cf3 Mon Sep 17 00:00:00 2001 From: sarah Date: Mon, 23 Mar 2026 09:56:58 +0100 Subject: [PATCH] Fix: Remove optional channel option from twitch add Discord does not support optional channel options in subcommands. Streamers are now monitored in the channel where the command is executed. Co-Authored-By: Claude Opus 4.6 --- src/commands/utility/twitch.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/commands/utility/twitch.ts b/src/commands/utility/twitch.ts index bdd8474..1b70661 100644 --- a/src/commands/utility/twitch.ts +++ b/src/commands/utility/twitch.ts @@ -1,4 +1,4 @@ -import { SlashCommandBuilder, PermissionFlagsBits, EmbedBuilder, MessageFlags, ChannelType } from 'discord.js'; +import { SlashCommandBuilder, PermissionFlagsBits, EmbedBuilder, MessageFlags } from 'discord.js'; import { Command } from '../../structures/Command.js'; import { TwitchManager } from '../../structures/TwitchManager.js'; @@ -18,10 +18,6 @@ const command: Command = { subcommand .setName('add') .setDescription('Kanal überwachen (Admin).') - .addChannelOption(option => - option.setName('channel') - .setDescription('Discord-Kanal für Benachrichtigungen (Standard: aktueller Kanal)') - .setRequired(false)) .addStringOption(option => option.setName('streamers') .setDescription('Twitch-Kanäle (kommagetrennt, z.B. shroud, xQc, ninja)') @@ -63,7 +59,7 @@ const command: Command = { .setDescription('Überwache Twitch-Streams und bekomme Benachrichtigungen.') .addFields( { name: '`/twitch online `', value: 'Prüft, ob ein Kanal gerade online ist.', inline: false }, - { name: '`/twitch add [kanal] streamer1, streamer2, ...`', value: 'Überwacht mehrere Twitch-Kanäle (Mod).\nOptional: Discord-Kanal oder aktueller Kanal.', inline: false }, + { name: '`/twitch add streamer1, streamer2, ...`', value: 'Überwacht Twitch-Kanäle in diesem Kanal (Mod).', inline: false }, { name: '`/twitch remove streamer1, streamer2, ...`', value: 'Entfernt Twitch-Kanäle (Mod).', inline: false }, { name: '`/twitch list`', value: 'Zeigt überwachte Kanäle in diesem Kanal.', inline: false }, { name: '`/twitch listall`', value: 'Zeigt alle überwachten Kanäle des Servers (Mod).', inline: false }, @@ -174,7 +170,7 @@ const command: Command = { const discordChannel = interaction.options.getChannel('channel'); const streamersInput = interaction.options.getString('streamers')!; const message = interaction.options.getString('message'); - const discordChannelId = discordChannel?.id || interaction.channelId; + const discordChannelId = interaction.channelId; // Parse comma-separated streamers const streamers = streamersInput