mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
Show role payday amounts in economyset showsettings (#5457)
* [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 Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
parent
7db3339aba
commit
a228a0d0b3
@ -669,15 +669,20 @@ class Economy(commands.Cog):
|
|||||||
"""
|
"""
|
||||||
Shows the current economy settings
|
Shows the current economy settings
|
||||||
"""
|
"""
|
||||||
|
role_paydays = []
|
||||||
guild = ctx.guild
|
guild = ctx.guild
|
||||||
if await bank.is_global():
|
if await bank.is_global():
|
||||||
conf = self.config
|
conf = self.config
|
||||||
else:
|
else:
|
||||||
conf = self.config.guild(guild)
|
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(
|
await ctx.send(
|
||||||
box(
|
box(
|
||||||
_(
|
_(
|
||||||
"----Economy Settings---\n"
|
"---Economy Settings---\n"
|
||||||
"Minimum slot bid: {slot_min}\n"
|
"Minimum slot bid: {slot_min}\n"
|
||||||
"Maximum slot bid: {slot_max}\n"
|
"Maximum slot bid: {slot_max}\n"
|
||||||
"Slot cooldown: {slot_time}\n"
|
"Slot cooldown: {slot_time}\n"
|
||||||
@ -692,6 +697,8 @@ class Economy(commands.Cog):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
if role_paydays:
|
||||||
|
await ctx.send(box(_("---Role Payday Amounts---\n") + "\n".join(role_paydays)))
|
||||||
|
|
||||||
@economyset.command()
|
@economyset.command()
|
||||||
async def slotmin(self, ctx: commands.Context, bid: positive_int):
|
async def slotmin(self, ctx: commands.Context, bid: positive_int):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user