mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
Supporta custom status in /cv
This commit is contained in:
parent
e6f1cd5e9d
commit
c5ea9232c0
1 changed files with 9 additions and 2 deletions
|
@ -77,8 +77,15 @@ class CvCommand(Command):
|
||||||
activity += f" | 📺 {mact['name']}"
|
activity += f" | 📺 {mact['name']}"
|
||||||
# Custom Status
|
# Custom Status
|
||||||
elif mact["type"] == 4:
|
elif mact["type"] == 4:
|
||||||
if "state" in activity:
|
if "emoji" in mact:
|
||||||
activity += f" | ❓ {mact['state']}"
|
emoji = f"{mact['emoji']['name']}"
|
||||||
|
else:
|
||||||
|
emoji = f"❓"
|
||||||
|
if "state" in mact:
|
||||||
|
state = f" {mact['state']}"
|
||||||
|
else:
|
||||||
|
state = ""
|
||||||
|
activity += f" | {emoji}{state}"
|
||||||
else:
|
else:
|
||||||
raise ExternalError(f"Unknown Discord activity type: {mact['type']}")
|
raise ExternalError(f"Unknown Discord activity type: {mact['type']}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue