From 72771e3e527131d7746033d418c85172fe2f2ae5 Mon Sep 17 00:00:00 2001 From: Jason <31069084+SharpBit@users.noreply.github.com> Date: Wed, 15 Nov 2017 08:54:38 -0500 Subject: [PATCH 1/7] Update option: CR_TAG --- data/options.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/options.json b/data/options.json index 48779d09..6409dc6b 100644 --- a/data/options.json +++ b/data/options.json @@ -1,5 +1,5 @@ { - "CR_TAG":"your clash royale tag", - "MODLOG":"modlog channel", - "NICKPROTECT":[] + "CR_TAG": "CY8G8VVQ", + "MODLOG": "modlog channel", + "NICKPROTECT": [] } \ No newline at end of file From a04679e151ef999a00a18698c863eacd7d0fd7e7 Mon Sep 17 00:00:00 2001 From: Jason <31069084+SharpBit@users.noreply.github.com> Date: Wed, 15 Nov 2017 09:01:16 -0500 Subject: [PATCH 2/7] New text Command: self --- data/cc.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/data/cc.json b/data/cc.json index 897473e7..781f2e8d 100644 --- a/data/cc.json +++ b/data/cc.json @@ -1,8 +1,6 @@ { - "pycc":{ - - }, - "textcc":{ - + "pycc": {}, + "textcc": { + "self": "stats https://github.com/SharpBit/selfstats" } } \ No newline at end of file From af6f0658e2a70b5c4d4cc9e44c3562a01ca40463 Mon Sep 17 00:00:00 2001 From: Jason <31069084+SharpBit@users.noreply.github.com> Date: Wed, 15 Nov 2017 09:02:04 -0500 Subject: [PATCH 3/7] Deleted text Command: self --- data/cc.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/data/cc.json b/data/cc.json index 781f2e8d..3fe50d35 100644 --- a/data/cc.json +++ b/data/cc.json @@ -1,6 +1,4 @@ { "pycc": {}, - "textcc": { - "self": "stats https://github.com/SharpBit/selfstats" - } + "textcc": {} } \ No newline at end of file From ea10ca6923d33ff653c80598cd045ba9d395f45f Mon Sep 17 00:00:00 2001 From: Jason <31069084+SharpBit@users.noreply.github.com> Date: Wed, 15 Nov 2017 09:05:11 -0500 Subject: [PATCH 4/7] New text Command: selfstats --- data/cc.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data/cc.json b/data/cc.json index 3fe50d35..3ab3b62f 100644 --- a/data/cc.json +++ b/data/cc.json @@ -1,4 +1,6 @@ { "pycc": {}, - "textcc": {} + "textcc": { + "selfstats": "https://github.com/SharpBit/selfstats" + } } \ No newline at end of file From a88fcc4172407438a6717b5fc9f51121f0f5d260 Mon Sep 17 00:00:00 2001 From: Jason <31069084+SharpBit@users.noreply.github.com> Date: Wed, 15 Nov 2017 11:29:21 -0500 Subject: [PATCH 5/7] Add gif cmd --- cogs/misc.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cogs/misc.py b/cogs/misc.py index 872527c8..33c235b2 100644 --- a/cogs/misc.py +++ b/cogs/misc.py @@ -55,6 +55,7 @@ from urllib.request import urlopen from sympy import solve from PIL import Image +import safygiphy class NumericStringParserForPython3(object): @@ -152,6 +153,21 @@ def __init__(self, bot): self.bot = bot self.emoji_converter = commands.EmojiConverter() self.nsp=NumericStringParserForPython3() + + @commands.command() + async def gif(self, ctx, *, tag): + ''' Get a random gif. Usage: gif ''' + g = safygiphy.Giphy() + gif = g.random(tag=tag) + color = await ctx.get_dominant_color(ctx.author.avatar_url) + em = discord.Embed(color=color) + em.set_image(url=str(gif.get('data', {}).get('image_original_url'))) + try: + await ctx.send(embed=em) + except discord.HTTPException: + em_list = await embedtobox.etb(em) + for page in em_list: + await ctx.send(page) @commands.command() async def embedsay(self, ctx, *, message): From faa1fb22228b492105a6adf53963ca147e104574 Mon Sep 17 00:00:00 2001 From: Jason <31069084+SharpBit@users.noreply.github.com> Date: Wed, 15 Nov 2017 11:29:39 -0500 Subject: [PATCH 6/7] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index f8f89af7..0fcf3083 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,3 +10,4 @@ wikipedia crasync cr-py urban-async +safygiphy From 4fb52056e3166f1001dfdc4b12cb82dd16508c70 Mon Sep 17 00:00:00 2001 From: Jason <31069084+SharpBit@users.noreply.github.com> Date: Wed, 15 Nov 2017 11:33:09 -0500 Subject: [PATCH 7/7] Update misc.py --- cogs/misc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cogs/misc.py b/cogs/misc.py index 33c235b2..d6120611 100644 --- a/cogs/misc.py +++ b/cogs/misc.py @@ -56,6 +56,7 @@ from sympy import solve from PIL import Image import safygiphy +from ext import embedtobox class NumericStringParserForPython3(object):