From 5356cca6ec0073720598430de86a15b5494286a7 Mon Sep 17 00:00:00 2001 From: Red-GitHubBot <88117545+Red-GitHubBot@users.noreply.github.com> Date: Sat, 25 Dec 2021 18:09:52 +0100 Subject: [PATCH] [3.4] Show role payday amounts in `economyset showsettings` (#5457) (#5489) * [V3/develop] show RolePaydayAmounts in showsettings command * Update economy.py * Switch to using a list (nitpicky optimizations) https://docs.python.org/3/faq/programming.html#what-is-the-most-efficient-way-to-concatenate-many-strings-together * Mark the text as translatable (cherry picked from commit a228a0d0b31f1986791af9120d1c04e34e01330a) Co-authored-by: Alex <58824393+vertyco@users.noreply.github.com> Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> Co-authored-by: Alex <58824393+vertyco@users.noreply.github.com> Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> --- redbot/cogs/economy/economy.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/redbot/cogs/economy/economy.py b/redbot/cogs/economy/economy.py index 6105ecdfa..e72569419 100644 --- a/redbot/cogs/economy/economy.py +++ b/redbot/cogs/economy/economy.py @@ -816,15 +816,20 @@ class Economy(commands.Cog): """ Shows the current economy settings """ + role_paydays = [] guild = ctx.guild if await bank.is_global(): conf = self.config else: conf = self.config.guild(guild) + for role in guild.roles: + rolepayday = await self.config.role(role).PAYDAY_CREDITS() + if rolepayday: + role_paydays.append(f"{role}: {rolepayday}") await ctx.send( box( _( - "----Economy Settings---\n" + "---Economy Settings---\n" "Minimum slot bid: {slot_min}\n" "Maximum slot bid: {slot_max}\n" "Slot cooldown: {slot_time}\n" @@ -843,6 +848,8 @@ class Economy(commands.Cog): ) ) ) + if role_paydays: + await ctx.send(box(_("---Role Payday Amounts---\n") + "\n".join(role_paydays))) @economyset.command() async def slotmin(self, ctx: commands.Context, bid: positive_int):