map improvements

This commit is contained in:
Kaaninchen
2026-08-27 13:10:30 +02:00
parent 93b9712394
commit dde0c443de
7 changed files with 21 additions and 52 deletions
+3 -2
View File
@@ -28,7 +28,8 @@ async def rename_vc(bot: discord.Bot, voice_channel, from_scheduler: bool = Fals
logger(f"Failed to select route after {max_attempt} attempts", "fatal")
return False
generate_static_map(trip["stops"], trip["mode"], trip["agency"], trip["route_color"])
if config.announcements.map:
generate_static_map(trip["stops"], trip["mode"], trip["agency"], trip["route_color"])
arrival = trip["arrival"]
channel_name = trip["channel_name"]
@@ -70,7 +71,7 @@ async def announcer(announcement: str, voice_channel: discord.VoiceChannel, dest
embed = None
if embed:
if image:
if image and config.announcements.map:
await voice_channel.send(file=image, embed=embed)
else:
await voice_channel.send(embed=embed)