Allow the bot to return nsfw baords
This commit is contained in:
parent
1711886c1b
commit
9eed58439b
@ -110,7 +110,7 @@ async def on_message(message):
|
|||||||
try:
|
try:
|
||||||
subreddit = word.split('/')[-1]
|
subreddit = word.split('/')[-1]
|
||||||
# Try and request the page to check that it actually exists
|
# Try and request the page to check that it actually exists
|
||||||
get_from_reddit.get_image(boards=subreddit)
|
get_from_reddit.get_image(boards=subreddit, nsfw=True)
|
||||||
await client.send_message(message.channel, "https://reddit.com/r/{}".format(subreddit))
|
await client.send_message(message.channel, "https://reddit.com/r/{}".format(subreddit))
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
@ -154,7 +154,6 @@ async def on_message(message):
|
|||||||
return m.author == client.user
|
return m.author == client.user
|
||||||
await client.purge_from(message.channel, limit=10, check=is_bot)
|
await client.purge_from(message.channel, limit=10, check=is_bot)
|
||||||
|
|
||||||
|
|
||||||
if message.content.startswith('!decide'):
|
if message.content.startswith('!decide'):
|
||||||
await client.send_message(
|
await client.send_message(
|
||||||
message.channel,
|
message.channel,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user