def notify_handler(self, settings, ctx, itemname, user, confirmation):
role = settings["Config"]["Shop Role"]
if "Role" not in settings["Users"][user.id]["Inventory"][itemname]:
if settings["Config"]["Shop Notify"] and role is not None:
msg = ("{} was added to the pending list by {}.\nConfirmation#: {}.\nUser ID: "
"{}".format(itemname, user.name, confirmation, user.id))
names = self.role_check(role, ctx)
destinations = [m for m in ctx.message.server.members if m.name in names]
for destination in destinations:
await self.bot.send_message(destination, msg)
await self.bot.say("```{} has been added to pending list. Your confirmation number is "
"{}.\nTo check the status of your pending items, use the command "
"{}pending check```".format(itemname, confirmation, ctx.prefix))
else:
await self.bot.say("{} just received the {} role!".format(user.name, itemname))
quantity = 1
self.user_remove_item(settings, user, itemname, quantity)
评论列表
文章目录