summaryrefslogtreecommitdiff
path: root/src/moyai_bot
diff options
context:
space:
mode:
authorseth <[email protected]>2023-01-12 18:37:32 -0500
committerseth <[email protected]>2023-01-12 18:37:32 -0500
commitf9d3078865b0c4fe99fa7cb7ec4b82f2f9c31263 (patch)
treeaee3b376824a8f06429ea8ac0704b58ba33a942a /src/moyai_bot
parentbfe621badba6df161c5c9d262f8155119797f422 (diff)
fix: make sure get_copypasta returns a list
Diffstat (limited to 'src/moyai_bot')
-rw-r--r--src/moyai_bot/lib.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/moyai_bot/lib.py b/src/moyai_bot/lib.py
index 65360a1..9ec4b0e 100644
--- a/src/moyai_bot/lib.py
+++ b/src/moyai_bot/lib.py
@@ -36,14 +36,14 @@ def split_msg(msg: str):
return [msg[i:i + split] for i in range(0, len(msg), split)]
-def get_copypasta(name):
+def get_copypasta(name) -> list[str]:
try:
res = importlib.resources.read_text(copypastas, name + ".txt")
except OSError:
- return "something went wrong :("
+ return ["something went wrong :("]
if res == "":
- return f"couldn't send copypasta: {name} :("
+ return [f"couldn't send copypasta: {name} :("]
if len(res) >= CHAR_LIMIT:
res = split_msg(res)