def _addrole_shop(self, ctx, quantity: int, cost: int, role: discord.Role):
"""Add a role token to shop list. Requires buyrole from refactored cogs"""
server = ctx.message.server
settings = self.check_server_settings(server)
shop_name = settings["Config"]["Shop Name"]
if 'Buyrole' not in self.bot.cogs:
msg = ("This feature requires the buyrole cog from the Refactored Cogs repo.\n"
"Load buyrole to use this function.")
else:
self.shop_item_add(settings, role, cost, quantity, role=True)
item_count = len(settings["Shop List"])
msg = ("```{} {} have been added to {} shop.\n{} item(s) available for purchase in the "
"store.```".format(quantity, role.name, shop_name, item_count))
await self.bot.say(msg)
评论列表
文章目录