Limit urban to nsfw channels
This commit is contained in:
parent
9be23219c5
commit
ff672d1f81
|
@ -154,6 +154,7 @@ class Links:
|
||||||
|
|
||||||
EXAMPLE: !urban a normal phrase
|
EXAMPLE: !urban a normal phrase
|
||||||
RESULT: Probably something lewd; this is urban dictionary we're talking about"""
|
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()
|
await ctx.message.channel.trigger_typing()
|
||||||
|
|
||||||
url = "http://api.urbandictionary.com/v0/define"
|
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```')
|
await ctx.send('```\nError: Definition is too long for me to send```')
|
||||||
except KeyError:
|
except KeyError:
|
||||||
await ctx.send("Sorry but I failed to connect to urban dictionary!")
|
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):
|
def setup(bot):
|
||||||
|
|
Loading…
Reference in a new issue