widget.py 文件源码

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

项目:curious 作者: SunDwarf 项目源码 文件源码
def __init__(self, bot, **kwargs):
        super().__init__(id=int(kwargs.get("id", 0)), cl=bot)

        #: The name of this guild.
        self.name = kwargs.get("name", "")

        #: A mapping of :class:`~.WidgetChannel` in this widget guild.
        self._channels = {}  # type: typing.MutableMapping[int, WidgetChannel]
        for channel in kwargs.get("channels", []):
            c = WidgetChannel(bot=self._bot, guild=self, **channel)
            self._channels[c.id] = c

        #: A mapping of :class:`~.WidgetMember` in this widget guild.
        self._members = {}
        for member in kwargs.get("members", []):
            m = WidgetMember(bot=self._bot, guild=self, kwargs=member)
            self._members[m.id] = m
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号