diff --git a/exts/banking.py b/exts/banking.py index b67b434..a818cb5 100644 --- a/exts/banking.py +++ b/exts/banking.py @@ -59,6 +59,22 @@ class BaseMul: "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): 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.invoke(discord.utils.get(self.bot.commands, name='wclist')) 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, + } +