adding meme. fixes #19
This commit is contained in:
parent
e868f23bd9
commit
cd113f139a
19
app/bot.py
19
app/bot.py
@ -132,6 +132,7 @@ async def emoji(ctx):
|
||||
|
||||
import core_utils
|
||||
emoji_staging = '/tmp/emoji'
|
||||
try:
|
||||
await ctx.send("emoji successfully uploaded! Heres how it looks in a sentence {}\nUse it with `:{}:`".format(
|
||||
await ctx.message.guild.create_custom_emoji(
|
||||
name=emoji_name,
|
||||
@ -155,11 +156,25 @@ async def avatar(ctx):
|
||||
# Code stolen from this reddit post
|
||||
# https://www.reddit.com/r/discordapp/comments/74bb4z/retrieve_a_mentioned_users_avatar_using_discordpy
|
||||
for user in profile:
|
||||
avatar_url = str(user.avatar_url).replace('.webp', '.png')
|
||||
await ctx.send(
|
||||
embed=generate_embed(
|
||||
embed_title="{}#{}".format(user.name, user.discriminator),
|
||||
embed_url=str(user.avatar_url).replace('.webp', '.png'),
|
||||
embed_description="[Direct Link]({})".format(str(user.avatar_url).replace('.webp', '.png'))
|
||||
embed_url=avatar_url,
|
||||
embed_description="[Direct Link]({})".format(avatar_url)
|
||||
)
|
||||
)
|
||||
|
||||
@bot.command(name='meme')
|
||||
async def meme(ctx):
|
||||
|
||||
import meme_gen
|
||||
await ctx.message.delete()
|
||||
await ctx.send(
|
||||
embed=generate_embed(
|
||||
embed_url=meme_gen.parse_message(
|
||||
ctx.message.content
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user