From 53ded152090af19ee19e1edc92c8908da88ff770 Mon Sep 17 00:00:00 2001 From: Kaaninchen <124433727+kaaninchen@users.noreply.github.com> Date: Sat, 22 Aug 2026 23:38:21 +0200 Subject: [PATCH] fix: actually intercept voice_channel status error --- README.md | 2 +- src/dc/handlers.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 21c3a49..c790bbd 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Gleiswechsel [ˈɡlaɪsvɛksəl] (german for "platform change") is a selfhostabl ![Example Channel](.github/preview_kanal.png) ## Features -- [International support](https://transitous.org/sources/) for both countries and cities +- [International support](https://transitous.org/sources/) for countries aswell as and cities - Support for various types of transportations, including but not limited to Subways, Busses, Funiculars, Trams and Trains - Multi language support (+ option to easily add more languages) - Announcements, including the option to join the voice chat and play an audio file while arriving at a specific station diff --git a/src/dc/handlers.py b/src/dc/handlers.py index dcb2750..d391daf 100644 --- a/src/dc/handlers.py +++ b/src/dc/handlers.py @@ -1,5 +1,6 @@ import discord import asyncio +import aiohttp import random from datetime import datetime, timedelta @@ -148,7 +149,7 @@ async def _update_next_loop(voice_channel: discord.VoiceChannel): try: await voice_channel.set_status(status_text, reason="Next stop status") - except discord.HTTPException as e: + except aiohttp.ClientConnectorDNSError as e: logger(F"Failed to set the channel status (network error?): {e}", "error") if config.announcements.voice_announcements: