adding birb

This commit is contained in:
Luke Robles 2018-06-22 13:51:06 -07:00
parent 13094d9051
commit bf5a430c67
3 changed files with 19 additions and 3 deletions

View File

@ -19,3 +19,10 @@ def random_dog():
if 'mp4' in dog_url[-3:]: if 'mp4' in dog_url[-3:]:
dog_url = None dog_url = None
return "https://random.dog/{}".format(dog_url) return "https://random.dog/{}".format(dog_url)
def get_birb():
return "https://random.birb.pw/img/{}".format(
requests.get(
'https://random.birb.pw/tweet'
).text)

View File

@ -8,12 +8,12 @@ then imported into the main bot
import os import os
import requests import requests
import animals
import core_utils import core_utils
import decide import decide
import define_word import define_word
import discord import discord
import docker import docker
import doggos
import eight_ball import eight_ball
import excuse import excuse
import get_from_reddit import get_from_reddit
@ -138,6 +138,11 @@ async def on_message(message):
embed_description="[Direct Link]({})".format(user.avatar_url.replace('.webp', '.png')) embed_description="[Direct Link]({})".format(user.avatar_url.replace('.webp', '.png'))
) )
) )
if message.content.startswith('!birb'):
await client.send_message(
message.channel,
embed=generate_embed(embed_url=animals.get_birb())
)
if message.content.startswith('!clap'): if message.content.startswith('!clap'):
await client.delete_message(message) await client.delete_message(message)
@ -173,7 +178,7 @@ async def on_message(message):
if message.content.startswith('!dog'): if message.content.startswith('!dog'):
await client.send_message( await client.send_message(
message.channel, message.channel,
embed=generate_embed(embed_url=doggos.get_dog()) embed=generate_embed(embed_url=animals.get_dog())
) )
if message.content.startswith('!excuse'): if message.content.startswith('!excuse'):

View File

@ -17,6 +17,10 @@ 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': [
'Sends an image of a birb',
'\nUsage: !birb'
],
'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'
@ -117,7 +121,7 @@ def get_help_message(method):
def get_help_embed(client): def get_help_embed(client):
categories = { categories = {
'fun': ['clap', 'dog', 'excuse', 'greentext', 'lewd', 'message', 'homepage', 'pout', 'smug'], 'fun': ['clap', 'birb', 'dog', 'excuse', 'greentext', 'lewd', 'message', 'homepage', 'pout', 'smug'],
'util': ['8ball', 'decide', 'wallpaper', 'weather', 'stock', 'tts'], 'util': ['8ball', 'decide', 'wallpaper', 'weather', 'stock', 'tts'],
'users': ['help', 'invite', 'purge', 'roles', 'source', 'minecraft'], 'users': ['help', 'invite', 'purge', 'roles', 'source', 'minecraft'],
'admin': ['emoji', 'cleanup'] 'admin': ['emoji', 'cleanup']