async def METHOD_NAME(
    bot: "MyBot", channel: typing.Union[DiscordChannel, discord.TextChannel]
):
    if isinstance(channel, DiscordChannel):
        db_channel = channel
    else:
        db_channel: DiscordChannel = await get_from_db(channel)
    if len(db_channel.webhook_urls) == 0:
        webhook = await create_and_save_webhook(bot, channel)
    else:
        url = random.choice(db_channel.webhook_urls)
        try:
            webhook = discord.Webhook.from_url(url, session=bot.client_session)
        except ValueError:
            db_channel.webhook_urls.remove(url)
            await db_channel.save()
            webhook = None
    return webhook