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}.")
评论列表
文章目录