mirror of
https://github.com/kaaninchen/Gleiswechsel.git
synced 2026-09-17 16:52:47 +00:00
fix: actually intercept voice_channel status error
This commit is contained in:
@@ -4,7 +4,7 @@ Gleiswechsel [ˈɡlaɪsvɛksəl] (german for "platform change") is a selfhostabl
|
|||||||

|

|
||||||
|
|
||||||
## Features
|
## 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
|
- 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)
|
- 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
|
- Announcements, including the option to join the voice chat and play an audio file while arriving at a specific station
|
||||||
|
|||||||
+2
-1
@@ -1,5 +1,6 @@
|
|||||||
import discord
|
import discord
|
||||||
import asyncio
|
import asyncio
|
||||||
|
import aiohttp
|
||||||
import random
|
import random
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
|
||||||
@@ -148,7 +149,7 @@ async def _update_next_loop(voice_channel: discord.VoiceChannel):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
await voice_channel.set_status(status_text, reason="Next stop status")
|
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")
|
logger(F"Failed to set the channel status (network error?): {e}", "error")
|
||||||
|
|
||||||
if config.announcements.voice_announcements:
|
if config.announcements.voice_announcements:
|
||||||
|
|||||||
Reference in New Issue
Block a user