Verification dans la methode d'appel si le salon spécifié est bien un salon vocal
This commit is contained in:
parent
a68dff47d1
commit
4fcd4e3f20
1 changed files with 6 additions and 2 deletions
|
@ -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:
|
||||
|
|
Reference in a new issue