hacky but fail if they didnt provide a valid meme template
This commit is contained in:
parent
81b2c25db7
commit
2b5facab40
@ -205,9 +205,20 @@ class Cheeky(commands.Cog):
|
||||
required=True,
|
||||
),
|
||||
):
|
||||
|
||||
if template not in sorted(
|
||||
list(
|
||||
map(
|
||||
lambda x: x["id"],
|
||||
requests.get("https://api.memegen.link/templates/").json(),
|
||||
)
|
||||
)
|
||||
):
|
||||
await ctx.respond("❌ You didnt pick a valid meme template ❌")
|
||||
return
|
||||
await ctx.defer()
|
||||
import meme_gen
|
||||
|
||||
await ctx.defer()
|
||||
await ctx.send_followup(
|
||||
embed=core_utils.generate_embed(
|
||||
embed_url=meme_gen.parse_message(template, top, bottom)
|
||||
|
Loading…
x
Reference in New Issue
Block a user