mine.py 文件源码

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

项目:kitsuchan-2 作者: n303p4 项目源码 文件源码
def unmine(self, ctx, *, user: discord.Member):
        """Remove a tripmine from yourself, or from someone else.

        * user - The person for which the mine will go off.
        """
        if not user:
            user = ctx.author

        if user.id == ctx.bot.user.id:
            await ctx.send("Nope. :3")
        elif (ctx.channel.id in self.tripmines.keys() and
              self.tripmines[ctx.channel.id].has_member(user.id)):
            self.tripmines[ctx.channel.id].remove_member(user.id)
            await ctx.send(f"Removed tripmine for {user.display_name}! :3")
        else:
            raise commands.UserInputError(f"No tripmine is currently set for {user.display_name}.")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号