def _remove_heist(self, ctx, *, target: str):
"""Remove a target from the heist list"""
author = ctx.message.author
settings = self.check_server_settings(author.server)
if string.capwords(target) in settings["Targets"]:
await self.bot.say("Are you sure you want to remove {} from the list of "
"targets?".format(string.capwords(target)))
response = await self.bot.wait_for_message(timeout=15, author=author)
if response is None:
msg = "Canceling removal. You took too long."
elif response.content.title() == "Yes":
settings["Targets"].pop(string.capwords(target))
self.save_system()
msg = "{} was removed from the list of targets.".format(string.capwords(target))
else:
msg = "Canceling target removal."
else:
msg = "That target does not exist."
await self.bot.say(msg)
评论列表
文章目录