fixing emoji

This commit is contained in:
Luke Robles 2022-05-12 16:55:00 -07:00
parent 044653e33c
commit 5530de2857
2 changed files with 12 additions and 13 deletions

View File

@ -46,19 +46,18 @@ class ServerUtils(commands.Cog):
emoji_staging = "/tmp/emoji" emoji_staging = "/tmp/emoji"
try: try:
await ctx.reply( core_utils.download_image(url, emoji_staging)
"emoji successfully uploaded! Heres how it looks in a sentence {}\nUse it with `:{}:`".format( emoji_id = await ctx.message.guild.create_custom_emoji(
await ctx.message.guild.create_custom_emoji( name=emoji_name,
name=emoji_name, image=open(emoji_staging, "rb").read(),
image=open( )
core_utils.download_image(url, emoji_staging), "rb" await ctx.send(
).read(), "Emoji created! heres how it looks in a sentence\n\n%s" % emoji_id
), )
emoji_name, except Exception as e:
) await ctx.send(
"I wasnt able to upload that image as an emoji. Sorry\n %s" % e
) )
except Exception:
await ctx.reply("I wasnt able to upload that image as an emoji. Sorry")
os.remove(emoji_staging) os.remove(emoji_staging)
return return

View File

@ -6,7 +6,7 @@ replicaCount: 1
image: image:
# Overrides the image tag whose default is the chart appVersion. # Overrides the image tag whose default is the chart appVersion.
tag: "194" tag: "195"
repository: ldooks/dragon-bot repository: ldooks/dragon-bot
pullPolicy: IfNotPresent pullPolicy: IfNotPresent