bot.py 文件源码

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

项目:PomodoroBot 作者: VicenteRD 项目源码 文件源码
def get_interface(self, channel: discord.Channel, generate=True):
        """ Retrieves a channel interface. If none found for the channel, a new
            one is created with its default values (if generate is True).

        :param channel: The channel the interface belongs to.
        :type channel: discord.Channel

        :param generate: Whether the interface should be auto-generated if none
            is found or not.
        :type generate: bool

        :return: The interface belonging to the channel, new or old.
        """

        if channel not in self._interfaces:
            if not generate:
                return None
            self._interfaces[channel] = ChannelTimerInterface(channel)
        return self._interfaces[channel]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号