converters.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:dogbot 作者: slice 项目源码 文件源码
def _get_recent_image(channel: discord.TextChannel) -> typing.Optional[discord.Message]:
    async for msg in channel.history(limit=100):
        # Scan any attached images.
        for attachment in msg.attachments:
            if attachment.height:
                return attachment.proxy_url

        # Scan any embeds in the message.
        for embed in msg.embeds:
            if embed.image is discord.Embed.Empty:
                continue
            return embed.image.proxy_url
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号