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
|
for guild in client.guilds
|
||||||
if any(channel.members for channel in guild.voice_channels)
|
if any(channel.members for channel in guild.voice_channels)
|
||||||
]
|
]
|
||||||
rows = cls._table_interface.select_where(
|
if active_guildids:
|
||||||
guildid=active_guildids
|
rows = cls._table_interface.select_where(
|
||||||
)
|
guildid=active_guildids
|
||||||
cache = defaultdict(list)
|
)
|
||||||
for row in rows:
|
cache = defaultdict(list)
|
||||||
cache[row['guildid']].append(row['channelid'])
|
for row in rows:
|
||||||
cls._cache.update(cache)
|
cache[row['guildid']].append(row['channelid'])
|
||||||
|
cls._cache.update(cache)
|
||||||
|
|
||||||
|
|
||||||
@GuildSettings.attach_setting
|
@GuildSettings.attach_setting
|
||||||
|
|||||||
Reference in New Issue
Block a user