run black
All checks were successful
Enforce Conventional Commit PR Title / Validate PR Title (pull_request_target) Successful in 6s
CI / ci (pull_request) Successful in 1m0s

This commit is contained in:
Luke Tainton 2025-06-06 18:35:36 +01:00
parent 0a38b8b4a4
commit a1644e3652
Signed by: luke
SSH Key Fingerprint: SHA256:D34npKT7UaiT/7gULqu7EPSLWWVAjTjXf4kKfJ/fQBo
2 changed files with 3 additions and 8 deletions

View File

@ -80,7 +80,5 @@ def generate_api_url(template: str, top_str: str, btm_str: str) -> str:
top_str = format_meme_string(top_str) top_str = format_meme_string(top_str)
btm_str = format_meme_string(btm_str) btm_str = format_meme_string(btm_str)
url: str = ( url: str = f"https://api.memegen.link/images/{tmpl_name}/{top_str}/{btm_str}.{tmpl_ext}"
f"https://api.memegen.link/images/{tmpl_name}/{top_str}/{btm_str}.{tmpl_ext}"
)
return url return url

View File

@ -78,8 +78,7 @@ class MakeMemeCommand(Command):
id="meme_type", id="meme_type",
isMultiSelect=False, isMultiSelect=False,
choices=[ choices=[
Choice(title=x["name"], value=x["choiceval"]) Choice(title=x["name"], value=x["choiceval"]) for x in TEMPLATES
for x in TEMPLATES
], ],
), ),
Text(id="text_top", placeholder="Top Text", maxLength=100), Text(id="text_top", placeholder="Top Text", maxLength=100),
@ -147,9 +146,7 @@ class MakeMemeCallback(Command):
if self.error: if self.error:
return None return None
self.meme_filename: str = img.generate_api_url( self.meme_filename: str = img.generate_api_url(self.meme, self.text_top, self.text_bottom)
self.meme, self.text_top, self.text_bottom
)
msg: Response = Response( msg: Response = Response(
attributes={ attributes={
"roomId": activity["target"]["globalId"], "roomId": activity["target"]["globalId"],