Skip to content

Commit

Permalink
Fix up your filter for gifs
Browse files Browse the repository at this point in the history
  • Loading branch information
fourjr committed Nov 16, 2017
1 parent f7792f7 commit b12fd29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions cogs/community/nsfw.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import json
import io
import safygiphy
from ext import embed2box

class Nsfw:
""" Nsfw commands """
Expand Down
5 changes: 3 additions & 2 deletions cogs/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
from PIL import Image
import safygiphy
from ext import embedtobox
from ext import nsfwgif


class NumericStringParserForPython3(object):
Expand Down Expand Up @@ -163,7 +162,9 @@ async def gif(self, ctx, *, tag):
load community.nsfw '''
g = safygiphy.Giphy()
tag = tag.lower()
if tag in nsfwgif.nsfw:
with open('data/nsfw.json')as f:
nsfwgif = json.load(f)
if tag in nsfwgif:
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)
Expand Down

0 comments on commit b12fd29

Please sign in to comment.