From 91b758faa9806e67514055a7a58ed8982453cd5d Mon Sep 17 00:00:00 2001 From: Milka64 Date: Sun, 13 Dec 2020 17:10:14 +0100 Subject: [PATCH] fix error for #23 --- kabot/kabot/kabot.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/kabot/kabot/kabot.py b/kabot/kabot/kabot.py index b24784a..27a3df2 100644 --- a/kabot/kabot/kabot.py +++ b/kabot/kabot/kabot.py @@ -208,7 +208,6 @@ class Mybot(commands.Cog): @commands.command(help='Gif me') async def gif(self, ctx): query = ctx.message.content.replace('!gif ', '') - print(query) api_instance = giphy_client.DefaultApi() api_key = self.gif_token lang = 'fr' @@ -540,9 +539,6 @@ def main(): gif_token = "udhL9Rgdme3HpAoFhWVZoYM0l0XwkzLz" bot = commands.Bot( command_prefix='!', - gl_url=gl_url, - gl_token=gl_token, - gif_token=gif_token ) test = False @@ -636,7 +632,14 @@ def main(): joke = bot.get_command('joke') await joke.invoke(ctx) - bot.add_cog(Mybot(bot)) + bot.add_cog( + Mybot( + bot + gl_url=gl_url, + gl_token=gl_token, + gif_token=gif_token + ) + ) bot.run(token)