fix (video): Don't pre-load with no channels.
This commit is contained in:
@@ -55,13 +55,14 @@ class video_channels(settings.ChannelList, settings.ListData, settings.Setting):
|
||||
for guild in client.guilds
|
||||
if any(channel.members for channel in guild.voice_channels)
|
||||
]
|
||||
rows = cls._table_interface.select_where(
|
||||
guildid=active_guildids
|
||||
)
|
||||
cache = defaultdict(list)
|
||||
for row in rows:
|
||||
cache[row['guildid']].append(row['channelid'])
|
||||
cls._cache.update(cache)
|
||||
if active_guildids:
|
||||
rows = cls._table_interface.select_where(
|
||||
guildid=active_guildids
|
||||
)
|
||||
cache = defaultdict(list)
|
||||
for row in rows:
|
||||
cache[row['guildid']].append(row['channelid'])
|
||||
cls._cache.update(cache)
|
||||
|
||||
|
||||
@GuildSettings.attach_setting
|
||||
|
||||
Reference in New Issue
Block a user