From 6352556f9eaad6d7e0759806dc6105525196fcec Mon Sep 17 00:00:00 2001 From: BFlow Date: Sun, 15 Mar 2020 22:16:16 +0100 Subject: [PATCH 1/2] #1 add gif command --- kabot/kabot/kabot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kabot/kabot/kabot.py b/kabot/kabot/kabot.py index 0be6ae6..4b1f9c3 100644 --- a/kabot/kabot/kabot.py +++ b/kabot/kabot/kabot.py @@ -67,7 +67,7 @@ class Mybot(commands.Cog): get_url['url'] ctx.channel.send(get_url['url']) except ApiException as e: - ctx.channel.send("Exception when calling DefaultApi->gifs_search_get: %s\n" % e) + ctx.send("Exception when calling DefaultApi->gifs_search_get: %s\n" % e) @commands.command() async def welcome(self, ctx): From 1bc5f97f79d1e0db1ae418491e606edc3801edfa Mon Sep 17 00:00:00 2001 From: BFlow Date: Sun, 15 Mar 2020 22:18:29 +0100 Subject: [PATCH 2/2] #1 add gif command --- kabot/kabot/kabot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kabot/kabot/kabot.py b/kabot/kabot/kabot.py index 190fb82..6c96cd1 100644 --- a/kabot/kabot/kabot.py +++ b/kabot/kabot/kabot.py @@ -65,9 +65,9 @@ class Mybot(commands.Cog): api_response.to_dict()['data'][0] get_url = random.choice(api_response.to_dict()['data']) get_url['url'] - ctx.channel.send(get_url['url']) + await ctx.channel.send(get_url['url']) except ApiException as e: - ctx.send("Exception when calling DefaultApi->gifs_search_get: %s\n" % e) + await ctx.channel.send("Exception when calling DefaultApi->gifs_search_get: %s\n" % e) @commands.command() async def welcome(self, ctx):