mirror of https://gitlab.com/litecord/litecord.git
parent
5bd292422b
commit
b5b168c388
|
|
@ -432,7 +432,7 @@ class Storage:
|
||||||
|
|
||||||
return {**row, **drow}
|
return {**row, **drow}
|
||||||
elif chan_type == ChannelType.GUILD_VOICE:
|
elif chan_type == ChannelType.GUILD_VOICE:
|
||||||
vrow = await self.db.fetchrow(
|
voice_channel_data = await self.db.fetchrow(
|
||||||
"""
|
"""
|
||||||
SELECT bitrate, user_limit
|
SELECT bitrate, user_limit
|
||||||
FROM guild_voice_channels
|
FROM guild_voice_channels
|
||||||
|
|
@ -441,7 +441,20 @@ class Storage:
|
||||||
row["id"],
|
row["id"],
|
||||||
)
|
)
|
||||||
|
|
||||||
return {**row, **dict(vrow)}
|
guild_region = await self.db.fetchval(
|
||||||
|
"""
|
||||||
|
SELECT region
|
||||||
|
FROM guilds
|
||||||
|
WHERE guild.id = $1
|
||||||
|
""",
|
||||||
|
guild_id,
|
||||||
|
row["guild_id"],
|
||||||
|
)
|
||||||
|
|
||||||
|
# see https://gitlab.com/litecord/litecord/-/issues/130
|
||||||
|
voice_channel_data["rtc_region"] = guild_region
|
||||||
|
|
||||||
|
return {**row, **dict(voice_channel_data)}
|
||||||
else:
|
else:
|
||||||
# this only exists to trick mypy. this codepath is unreachable
|
# this only exists to trick mypy. this codepath is unreachable
|
||||||
raise AssertionError("Unreachable code path.")
|
raise AssertionError("Unreachable code path.")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue