tf cmd
This commit is contained in:
1 parent
e73b136d57
commit
60b7e46b34
1 file changed
+40
-1
+40
-1
@@ -59,6 +59,22 @@ class BaseMul:
|
|||||||
"aluminum": cls.aluminum * cities - nation.aluminum,
|
"aluminum": cls.aluminum * cities - nation.aluminum,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class TransferFlags(commands.FlagConverter, delimiter=" ", prefix="--"):
|
||||||
|
money: int = commands.flag(default=0)
|
||||||
|
food: int = commands.flag(default=0)
|
||||||
|
uranium: int = commands.flag(default=0)
|
||||||
|
gasoline: int = commands.flag(default=0)
|
||||||
|
munitions: int = commands.flag(default=0)
|
||||||
|
steel: int = commands.flag(default=0)
|
||||||
|
aluminum: int = commands.flag(default=0)
|
||||||
|
coal: int = commands.flag(default=0)
|
||||||
|
iron: int = commands.flag(default=0)
|
||||||
|
lead: int = commands.flag(default=0)
|
||||||
|
bauxite: int = commands.flag(default=0)
|
||||||
|
oil: int = commands.flag(default=0)
|
||||||
|
nation: List[int] = commands.flag(default=[])
|
||||||
|
alliance: Optional[int] = commands.flag(default=None)
|
||||||
|
|
||||||
|
|
||||||
class Banking(commands.Cog):
|
class Banking(commands.Cog):
|
||||||
def __init__(self, bot: Brahmos):
|
def __init__(self, bot: Brahmos):
|
||||||
@@ -922,7 +938,30 @@ class Banking(commands.Cog):
|
|||||||
await ctx.send(f"> Removed nations from warchest refill list: `{removed_list}`")
|
await ctx.send(f"> Removed nations from warchest refill list: `{removed_list}`")
|
||||||
await ctx.invoke(discord.utils.get(self.bot.commands, name='wclist'))
|
await ctx.invoke(discord.utils.get(self.bot.commands, name='wclist'))
|
||||||
else:
|
else:
|
||||||
await ctx.send("> None of the provided nations were in the warchest refill list.")
|
await ctx.send("> None of the provided nations were in the warchest refill list.")
|
||||||
|
|
||||||
|
@commands.command()
|
||||||
|
async def tf(self, ctx: CustomCtx, flags: TransferFlags):
|
||||||
|
"""
|
||||||
|
Transfer resources to a nation or alliance.
|
||||||
|
"""
|
||||||
|
nation_ids = flags.nation
|
||||||
|
alliance_id = flags.alliance
|
||||||
|
resources = {
|
||||||
|
"money": flags.money,
|
||||||
|
"food": flags.food,
|
||||||
|
"uranium": flags.uranium,
|
||||||
|
"gasoline": flags.gasoline,
|
||||||
|
"munitions": flags.munitions,
|
||||||
|
"steel": flags.steel,
|
||||||
|
"aluminum": flags.aluminum,
|
||||||
|
"coal": flags.coal,
|
||||||
|
"iron": flags.iron,
|
||||||
|
"lead": flags.lead,
|
||||||
|
"bauxite": flags.bauxite,
|
||||||
|
"oil": flags.oil,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user