arrival as discord rpc

This commit is contained in:
Kaaninchen
2026-08-18 22:17:45 +02:00
parent d46a04af0c
commit e6013a437f
5 changed files with 13 additions and 4 deletions
-2
View File
@@ -25,8 +25,6 @@ async def on_ready():
logger(f"{bot.user} is online")
_bot_initialized = True
await bot.change_presence(activity=discord.Game(name="tschu tschu! • /info"))
server_id = config.discord.server
server_vc_id = config.discord.vc
channel = validate_channel(bot=bot, server_id=server_id, channel_id=server_vc_id)
+2
View File
@@ -14,3 +14,5 @@ embeds:
title: "Informationen zu ihrer Fahrt"
"end_of_connection":
message: "Sehr geehrte Fahrgäste,\nIn wenigen Minuten erreichen wir {destination}. Unsere Reise endet dort\n\nWir wünschen Ihnen eine angenehme Weiterreise.\n\nVielen Dank für ihr Vertrauen und auf Wiedersehen."
rich_presence:
arrival: "Ankunft um {arrival} • /info"
+2
View File
@@ -14,3 +14,5 @@ embeds:
title: "Information about your trip"
"end_of_connection":
message: "Dear Passengers,\nwe will be arriving at {destination} in a few minutes. Our journey ends there.\n\nWe wish you a pleasant onward journey.\n\nThank you for your patronage, and goodbye."
rich_presence:
arrival: "Arrival by {arrival} • /info"
+1
View File
@@ -43,6 +43,7 @@ async def rename_vc(bot: discord.Bot, voice_channel, from_scheduler: bool = Fals
logger(f"Updated channel name!")
await bot.change_presence(activity=discord.Game(name=lang.rich_presence.arrival()))
await announcer("transfer", voice_channel)
_scheduled_task = asyncio.create_task(_schedule_next_transfer(bot, trip["arrival_dt"], voice_channel, trip["to"]))
+8 -2
View File
@@ -1,6 +1,6 @@
# generated by datamodel-codegen:
# filename: de.yaml
# timestamp: 2026-08-17T18:44:37+00:00
# filename: en.yaml
# timestamp: 2026-08-18T20:08:48+00:00
from __future__ import annotations
@@ -49,7 +49,13 @@ class Embeds:
announcement: Announcement
@dataclass
class RichPresence:
arrival: str
@dataclass
class Model:
channel: Channel
embeds: Embeds
rich_presence: RichPresence