fix appel slash command

This commit is contained in:
Mylloon 2021-05-29 13:25:02 +02:00
parent 9eeb286ff6
commit 637b7209a7

View file

@ -67,11 +67,14 @@ class School(commands.Cog):
# else: # else:
await ctx.send(f"Une erreur est survenue, syntaxe: `{ctx.prefix}appel [ID salon vocal]`.") await ctx.send(f"Une erreur est survenue, syntaxe: `{ctx.prefix}appel [ID salon vocal]`.")
@cog_ext.cog_slash(name="appel", description = "Fais l'appel.") @cog_ext.cog_slash(name="appel", description = "Fais l'appel.")
async def __appel(self, ctx, voice_channel: int = None): async def __appel(self, ctx, voice_channel_id = None):
if voice_channel == None: if voice_channel_id == None:
return await self._appel(ctx, True) return await self._appel(ctx, True)
else: else:
return await self._appel(ctx, voice_channel, True) try:
return await self._appel(ctx, int(voice_channel_id), True)
except:
pass
@commands.command(name='getid', hidden = True) @commands.command(name='getid', hidden = True)
async def _getid(self, ctx, fromSlash): async def _getid(self, ctx, fromSlash):