changes
This commit is contained in:
1 parent
60154ed1bf
commit
a6ac1caff4
1 file changed
+12
-3
+12
-3
@@ -972,12 +972,19 @@ class Banking(commands.Cog):
|
|||||||
"revenue": revenue,
|
"revenue": revenue,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
nation_rss = {
|
||||||
|
"nation_coal": nation.coal,
|
||||||
|
"nation_oil": nation.oil,
|
||||||
|
"nation_iron": nation.iron,
|
||||||
|
"nation_bauxite": nation.bauxite,
|
||||||
|
"nation_lead": nation.lead
|
||||||
|
}
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
await ctx.cbsend(f"{traceback.format_exc()}")
|
await ctx.cbsend(f"{traceback.format_exc()}")
|
||||||
|
|
||||||
# Format and send the results
|
# Format and send the results
|
||||||
await self.send_revenue_results(ctx, revenue_data)
|
await self.send_revenue_results(ctx, revenue_data, nation_rss)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
await ctx.send(f"> Error getting game data: {str(e)}")
|
await ctx.send(f"> Error getting game data: {str(e)}")
|
||||||
@@ -1313,7 +1320,7 @@ class Banking(commands.Cog):
|
|||||||
"colors": colors,
|
"colors": colors,
|
||||||
}
|
}
|
||||||
|
|
||||||
async def send_revenue_results(self, ctx: commands.Context, revenue_data: list):
|
async def send_revenue_results(self, ctx: commands.Context, revenue_data: list, nation_rss: dict):
|
||||||
"""Format and send the revenue calculation results."""
|
"""Format and send the revenue calculation results."""
|
||||||
if not revenue_data:
|
if not revenue_data:
|
||||||
return await ctx.send("> No revenue data to display.")
|
return await ctx.send("> No revenue data to display.")
|
||||||
@@ -1328,7 +1335,9 @@ class Banking(commands.Cog):
|
|||||||
timestamp=datetime.datetime.utcnow(),
|
timestamp=datetime.datetime.utcnow(),
|
||||||
)
|
)
|
||||||
|
|
||||||
e.add_field(name="Net Revenue", value=revenue["net_rev_txt"], inline=False)
|
e.add_field(name="Net raws production", value=revenue["net_rev_txt"], inline=False)
|
||||||
|
e.add_field(name="On Nation", value=f"Coal: {nation_rss[nation_coal]}\nIron: {nation_rss[nation_iron]}\nTBC", inline=False)
|
||||||
|
|
||||||
|
|
||||||
if revenue["footer"]:
|
if revenue["footer"]:
|
||||||
e.set_footer(text=revenue["footer"])
|
e.set_footer(text=revenue["footer"])
|
||||||
|
|||||||
Reference in new issue
Block a user