diff --git a/src/cogs/partygames.py b/src/cogs/partygames.py index 6be2b9d..7dfec93 100644 --- a/src/cogs/partygames.py +++ b/src/cogs/partygames.py @@ -23,7 +23,7 @@ class PartyGames(commands.Cog, name="Partygames"): } @commands.command(name='app', hidden = True) - async def linkCreator(self, ctx, app: str = None, fromSlash = None): + async def _linkCreator(self, ctx, app: str = None, fromSlash = None): """Renvoie l'embed de l'app selectionée\n ➡ Syntaxe: {PREFIX}app """ if app == None: return await mySendHidden(ctx, fromSlash, f"Aucune application renseignée, merci d'en renseigner une (`{ctx.prefix}app `).") @@ -50,7 +50,7 @@ class PartyGames(commands.Cog, name="Partygames"): @commands.command(name='youtube') async def _youtube(self, ctx, fromSlash = None): """Créer une instance "Youtube Together".""" - return await ctx.invoke(self.client.get_command("app"), "youtube", fromSlash) + return await self._linkCreator(ctx, "youtube", fromSlash) @cog_ext.cog_slash(name="youtube", description = "Créer une instance \"Youtube Together\".") async def __youtube(self, ctx): """Slash command""" @@ -59,7 +59,7 @@ class PartyGames(commands.Cog, name="Partygames"): @commands.command(name='poker') async def _poker(self, ctx, fromSlash = None): """Créer une instance "Poker Night".""" - return await ctx.invoke(self.client.get_command("app"), "poker", fromSlash) + return await self._linkCreator(ctx, "poker", fromSlash) @cog_ext.cog_slash(name="poker", description = "Créer une instance \"Poker Night\".") async def __poker(self, ctx): """Slash command""" @@ -68,7 +68,7 @@ class PartyGames(commands.Cog, name="Partygames"): @commands.command(name='chess') async def _chess(self, ctx, fromSlash = None): """Créer une instance "Chess in the Park".""" - return await ctx.invoke(self.client.get_command("app"), "chess", fromSlash) + return await self._linkCreator(ctx, "chess", fromSlash) @cog_ext.cog_slash(name="chess", description = "Créer une instance \"Chess in the Park\".") async def __chess(self, ctx): """Slash command""" @@ -77,7 +77,7 @@ class PartyGames(commands.Cog, name="Partygames"): @commands.command(name='betrayal') async def _betrayal(self, ctx, fromSlash = None): """Créer une instance "Betrayal.io".""" - return await ctx.invoke(self.client.get_command("app"), "betrayal", fromSlash) + return await self._linkCreator(ctx, "betrayal", fromSlash) @cog_ext.cog_slash(name="betrayal", description = "Créer une instance \"Betrayal.io\".") async def __betrayal(self, ctx): """Slash command""" @@ -86,7 +86,7 @@ class PartyGames(commands.Cog, name="Partygames"): @commands.command(name='fishing') async def _fishing(self, ctx, fromSlash = None): """Créer une instance "Fishington.io".""" - return await ctx.invoke(self.client.get_command("app"), "fishing", fromSlash) + return await self._linkCreator(ctx, "fishing", fromSlash) @cog_ext.cog_slash(name="fishing", description = "Créer une instance \"Fishington.io\".") async def __fishing(self, ctx): """Slash command"""