update transfer cmd
This commit is contained in:
1 parent
9608585578
commit
97c5e24162
1 file changed
+18
-6
+18
-6
@@ -517,6 +517,7 @@ class Banking(commands.Cog):
|
||||
async def change_alliance(self, i: discord.Interaction, _):
|
||||
self.sel_alliance = 10198 if self.sel_alliance == 10177 else 10177
|
||||
flag = d_flag if self.sel_alliance == 10198 else m_flag
|
||||
e = i.message.embeds[0]
|
||||
e.set_thumbnail(url=flag)
|
||||
e.set_field_at(
|
||||
0, name="Transferring From", value=alliances.get(self.sel_alliance)
|
||||
@@ -578,9 +579,7 @@ class Banking(commands.Cog):
|
||||
key, value = r.split(":")
|
||||
resources[key.strip()] = int(value.strip())
|
||||
e.description = (
|
||||
"Send resources to: \n"
|
||||
f"[{nation.nation_name}](https://politicsandwar.com/nation/id={nation.id})\n"
|
||||
f"Leader: {nation.leader_name}\n\n"
|
||||
"**Resources** \n"
|
||||
f"{Emojis.money} {resources.get('money', 0):,}\n"
|
||||
f"{Emojis.food} {resources.get('food', 0):,}\n"
|
||||
f"{Emojis.uranium} {resources.get('uranium', 0):,}\n"
|
||||
@@ -596,6 +595,16 @@ class Banking(commands.Cog):
|
||||
)
|
||||
|
||||
e.set_image(url=nation.flag)
|
||||
e.add_field(
|
||||
name="Transferring To",
|
||||
value=f"[**{nation.nation_name}**](https://politicsandwar.com/nation/id={nation.id})",
|
||||
inline=False,
|
||||
)
|
||||
e.add_field(
|
||||
name="Leader",
|
||||
value=nation.leader_name,
|
||||
inline=True,
|
||||
)
|
||||
self.view.nation_id = nation.id
|
||||
self.view.resources = {
|
||||
"money" : resources.get('money', 0),
|
||||
@@ -668,8 +677,7 @@ class Banking(commands.Cog):
|
||||
resources[key.strip()] = int(value.strip())
|
||||
|
||||
e.description = (
|
||||
"Send resources to: \n"
|
||||
f"[{alliance.name}](https://politicsandwar.com/allaince/id={alliance.id})\n\n"
|
||||
"**Resources** \n"
|
||||
f"{Emojis.money} {resources.get('money', 0):,}\n"
|
||||
f"{Emojis.food} {resources.get('food', 0):,}\n"
|
||||
f"{Emojis.uranium} {resources.get('uranium', 0):,}\n"
|
||||
@@ -685,6 +693,10 @@ class Banking(commands.Cog):
|
||||
|
||||
)
|
||||
e.set_image(url=alliance.flag)
|
||||
e.add_field(
|
||||
name="Transferring To",
|
||||
value=f"[**{alliance.name}**](https://politicsandwar.com/alliance/id={alliance.id})",
|
||||
)
|
||||
self.view.alliance_id = alliance.id
|
||||
self.view.resources = {
|
||||
"money" : resources.get('money', 0),
|
||||
@@ -737,7 +749,7 @@ class Banking(commands.Cog):
|
||||
e.color = discord.Color.green()
|
||||
e.description = (
|
||||
"Resources have been transferred successfully\n"
|
||||
f"Target => [link]({url})\n\n"
|
||||
f"Target => {url}\n\n"
|
||||
f"{Emojis.money} {self.resources.get('money'):,}\n"
|
||||
f"{Emojis.food} {self.resources.get('food'):,}\n"
|
||||
f"{Emojis.uranium} {self.resources.get('uranium'):,}\n"
|
||||
|
||||
Reference in new issue
Block a user