1
0
Fork 0
mirror of synced 2024-05-19 03:52:25 +12:00

Limit urban to nsfw channels

This commit is contained in:
phxntxm 2018-06-23 12:10:37 -05:00
parent 9be23219c5
commit ff672d1f81

View file

@ -154,6 +154,7 @@ class Links:
EXAMPLE: !urban a normal phrase
RESULT: Probably something lewd; this is urban dictionary we're talking about"""
if utils.channel_is_nsfw(ctx.message.channel, self.bot.db):
await ctx.message.channel.trigger_typing()
url = "http://api.urbandictionary.com/v0/define"
@ -180,6 +181,8 @@ class Links:
await ctx.send('```\nError: Definition is too long for me to send```')
except KeyError:
await ctx.send("Sorry but I failed to connect to urban dictionary!")
else:
await ctx.send("This command is limited to nsfw channels")
def setup(bot):