Fixed some bugs in placeholder

This commit is contained in:
Choco
2024-01-02 12:28:41 +08:00
parent fd87a151e5
commit 7a47287193
2 changed files with 3 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ Actions
| Action Name | Description |
| --- | --- |
| player | Playing status. |
| play | Playing status. |
| listen | Listening status. |
| watch | Watching status. |
| stream | Streaming status. |

View File

@@ -34,9 +34,7 @@ class Placeholders:
for key in keys:
value = self.variables.get(key.lower(), None)
if value is None:
continue
msg = msg.replace(f"@@{key}@@", str(value()))
if value:
msg = msg.replace(f"@@{key}@@", str(value()))
return msg