Skip to content
This repository has been archived by the owner on Jul 31, 2018. It is now read-only.

Commit

Permalink
Merge pull request #200 from XAOS1502/patch-4
Browse files Browse the repository at this point in the history
Docstrings and tags for gif
  • Loading branch information
FloatCobra authored Nov 15, 2017
2 parents 4b9db59 + 04870e8 commit 3692cc4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cogs/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
from PIL import Image
import safygiphy
from ext import embedtobox
from ext import nsfwgif


class NumericStringParserForPython3(object):
Expand Down Expand Up @@ -157,8 +158,13 @@ def __init__(self, bot):

@commands.command()
async def gif(self, ctx, *, tag):
''' Get a random gif. Usage: gif <tag> '''
''' Get a random gif. Usage: gif <tag>
this command is sfw, to use nsfw gifs
load community.nsfw '''
g = safygiphy.Giphy()
tag = tag.lower()
if tag in nsfwgif.nsfw:
return await ctx.send('`Please use the nsfw commands to see content like this.`', delete_after=5)
gif = g.random(tag=tag)
color = await ctx.get_dominant_color(ctx.author.avatar_url)
em = discord.Embed(color=color)
Expand Down

0 comments on commit 3692cc4

Please sign in to comment.