hacky but fail if they didnt provide a valid meme template
This commit is contained in:
parent
75c43689a3
commit
b42cdf6f4d
@ -205,9 +205,20 @@ class Cheeky(commands.Cog):
|
|||||||
required=True,
|
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
|
import meme_gen
|
||||||
|
|
||||||
await ctx.defer()
|
|
||||||
await ctx.send_followup(
|
await ctx.send_followup(
|
||||||
embed=core_utils.generate_embed(
|
embed=core_utils.generate_embed(
|
||||||
embed_url=meme_gen.parse_message(template, top, bottom)
|
embed_url=meme_gen.parse_message(template, top, bottom)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user