coowner.py 文件源码

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

项目:Sitryk-Cogs 作者: Sitryk 项目源码 文件源码
def add(self, ctx, user: discord.User):
        """Add a co-owner by mentioning them"""

        self.bot.say("Are you sure you want to add **{}** as a co-owner?".format(user.display_name))
        confirm = await self._confirm_owner(ctx)
        if not confirm:
            return

        if user.id not in self.settings["USERS"]:
            self.settings["USERS"][user.id] = {"RESTRICTED" : []}
            dataIO.save_json(self.path, self.settings)
            await self.bot.say("**{0.display_name}** *<{0.id}>* has been added as a co-owner".format(user))
            return
        elif user.id in self.settings["USERS"]:
            await self.bot.say("That user is already a co-owner")
            return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号