Adding birb and red panda
This commit is contained in:
parent
97b100e0a2
commit
33a324da26
@ -7,6 +7,9 @@ import get_from_reddit
|
|||||||
def get_dog():
|
def get_dog():
|
||||||
return random.choice([random_sheeb, random_dog, random_dog_reddit])()
|
return random.choice([random_sheeb, random_dog, random_dog_reddit])()
|
||||||
|
|
||||||
|
def get_birb():
|
||||||
|
return random.choice([random_bird, random_bird_reddit])()
|
||||||
|
|
||||||
|
|
||||||
def random_sheeb():
|
def random_sheeb():
|
||||||
return requests.get(
|
return requests.get(
|
||||||
@ -22,6 +25,22 @@ def random_dog():
|
|||||||
dog_url = None
|
dog_url = None
|
||||||
return "https://random.dog/{}".format(dog_url)
|
return "https://random.dog/{}".format(dog_url)
|
||||||
|
|
||||||
|
def random_bird():
|
||||||
|
bird = None
|
||||||
|
while not bird:
|
||||||
|
bird = requests.get('https://some-random-api.ml/img/birb').json()['link']
|
||||||
|
if 'mp4' in bird[-3:]:
|
||||||
|
bird = None
|
||||||
|
return bird
|
||||||
|
|
||||||
|
def random_red_panda():
|
||||||
|
red_panda = None
|
||||||
|
while not red_panda:
|
||||||
|
red_panda = requests.get('https://some-random-api.ml/img/red_panda').json()['link']
|
||||||
|
if 'mp4' in red_panda[-3:]:
|
||||||
|
red_panda = None
|
||||||
|
return red_panda
|
||||||
|
|
||||||
|
|
||||||
def random_dog_reddit():
|
def random_dog_reddit():
|
||||||
return get_from_reddit.get_image(
|
return get_from_reddit.get_image(
|
||||||
@ -36,3 +55,10 @@ def random_dog_reddit():
|
|||||||
'zoomies',
|
'zoomies',
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def random_bird_reddit():
|
||||||
|
return get_from_reddit.get_image(
|
||||||
|
[
|
||||||
|
'birbs',
|
||||||
|
]
|
||||||
|
)
|
||||||
|
@ -172,6 +172,18 @@ async def on_message(message):
|
|||||||
embed=generate_embed(embed_url=animals.get_dog())
|
embed=generate_embed(embed_url=animals.get_dog())
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if message.content.startswith('!birb'):
|
||||||
|
await client.send_message(
|
||||||
|
message.channel,
|
||||||
|
embed=generate_embed(embed_url=animals.get_birb())
|
||||||
|
)
|
||||||
|
|
||||||
|
if message.content.startswith('!redpanda'):
|
||||||
|
await client.send_message(
|
||||||
|
message.channel,
|
||||||
|
embed=generate_embed(embed_url=animals.random_red_panda())
|
||||||
|
)
|
||||||
|
|
||||||
if message.content.startswith('!excuse'):
|
if message.content.startswith('!excuse'):
|
||||||
await client.send_message(message.channel, excuse.get_excuse())
|
await client.send_message(message.channel, excuse.get_excuse())
|
||||||
|
|
||||||
|
@ -17,6 +17,14 @@ def get_help_message(method):
|
|||||||
'Returns the avatar for the mentioned user',
|
'Returns the avatar for the mentioned user',
|
||||||
'\nUsage: !avatar @somebody'
|
'\nUsage: !avatar @somebody'
|
||||||
],
|
],
|
||||||
|
'birb': [
|
||||||
|
'Returns a random bird photo',
|
||||||
|
'\nUsage: !birb'
|
||||||
|
],
|
||||||
|
'redpanda': [
|
||||||
|
'Returns a random red panda photo',
|
||||||
|
'\nUsage: !redpanda'
|
||||||
|
],
|
||||||
'clap': [
|
'clap': [
|
||||||
'Returns the shittiest meme created by sassy girls on twitter this century',
|
'Returns the shittiest meme created by sassy girls on twitter this century',
|
||||||
'Usage: !clap some text to be meme\'mt'
|
'Usage: !clap some text to be meme\'mt'
|
||||||
@ -145,7 +153,7 @@ def get_help_message(method):
|
|||||||
|
|
||||||
def get_help_embed(client):
|
def get_help_embed(client):
|
||||||
categories = {
|
categories = {
|
||||||
'fun': ['clap', 'youtube', 'dog', 'excuse', 'greentext', 'lewd', 'message', 'meme', 'homepage', 'pout', 'roll', 'smug', 'quake'],
|
'fun': ['clap', 'redanda', 'birb', 'youtube', 'dog', 'excuse', 'greentext', 'lewd', 'message', 'meme', 'homepage', 'pout', 'roll', 'smug', 'quake'],
|
||||||
'util': ['8ball', 'decide', 'icon', 'wallpaper', 'weather', 'stock', 'tts', 'issue'],
|
'util': ['8ball', 'decide', 'icon', 'wallpaper', 'weather', 'stock', 'tts', 'issue'],
|
||||||
'users': ['help', 'invite', 'purge', 'roles', 'source', 'minecraft'],
|
'users': ['help', 'invite', 'purge', 'roles', 'source', 'minecraft'],
|
||||||
'admin': ['emoji', 'cleanup']
|
'admin': ['emoji', 'cleanup']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user