import logging from typing import List import discord log = logging.getLogger(__name__) def get_scannable_channels(client: discord.Client, guild_id: int) -> List[discord.TextChannel]: guild = client.get_guild(guild_id) if guild is None: log.warning("Guild %s not found in local cache, skipping", guild_id) return [] return list(guild.text_channels)