Test voor huge emoji

Test alleen de parsing van de emoji en dat er een embed wordt gemaakt.
This commit is contained in:
2022-12-04 17:47:49 +01:00
parent b08933b9f1
commit f3dfca14c2
2 changed files with 14 additions and 4 deletions
+9 -4
View File
@@ -28,6 +28,14 @@ class General(commands.Cog):
def __check(self, ctx): #Todo: Is dit het porno kanaal?
return True
def get_emoji_embed(self, tag: str):
emoji = re.search(".*\<\:([A-z]*)\:(\d*)\>.*", tag)
embed = discord.Embed(title=emoji.group(1), type='photo')
hugemoji = 'https://cdn.discordapp.com/emojis/' + emoji.group(2) + '.png'
embed.set_image(url=hugemoji)
return embed
@commands.command()
@asyncio.coroutine
def huge(self, ctx, *, arg):
@@ -35,10 +43,7 @@ class General(commands.Cog):
Bijvoorbeeld:
!huge :ancilla:
"""
id = re.search("\<\:([A-z]*)\:(\d*)\>", arg)
hugemoji = 'https://cdn.discordapp.com/emojis/' + id.group(2) + '.png'
em = discord.Embed(title=id.group(1), type='photo')
em.set_image(url=hugemoji)
em = self.get_emoji_embed(arg)
try:
yield from ctx.message.delete()
except: