diff --git a/cogs/commands.py b/cogs/commands.py index 3de21fe..4bea166 100755 --- a/cogs/commands.py +++ b/cogs/commands.py @@ -221,9 +221,13 @@ class Commands(commands.Cog): """Fais l'appel⁢⁢⁢⁢⁢\n ➡ Syntaxe: .appel [ID salon vocal] """ voice_channels = [] voice_channels.extend(ctx.guild.voice_channels) - if voice_channel: - voice_channels = [self.bot.get_channel(voice_channel)] await ctx.message.add_reaction(emoji = "✅") + if voice_channel: + canal = self.bot.get_channel(voice_channel) + if canal.type.__str__() == "voice": + voice_channels = [canal] + else: + return await ctx.send("Tu as spécifié un channel textuelle et non vocal.") if len(voice_channels) > 0: embed = discord.Embed(title = "Réagissez à ce message avec ✋ pour signaler votre présence.", description = f"(attention, je réagis aussi) — Professeur : {ctx.author.mention}") for channel in voice_channels: