xmpp-discord-bridge/xmpp_discord_bridge/helpers.py

12 lines
327 B
Python
Raw Normal View History

2021-09-16 10:57:36 +00:00
from discord import Status
2021-09-15 20:33:59 +00:00
def discord_status_to_xmpp_show(status):
return {
2021-09-16 10:57:36 +00:00
Status.online: "available",
Status.idle: "away",
Status.dnd: "dnd",
Status.do_not_disturb: "dnd",
Status.invisible: "xa", # TODO: Kinda
Status.offline: "unavailable"
2021-09-15 20:33:59 +00:00
}.get(status, "available")