run black
This commit is contained in:
parent
0a38b8b4a4
commit
a1644e3652
@ -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
|
||||||
|
@ -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"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user