fix error in rss cmd
This commit is contained in:
1 parent
0fdba6b251
commit
11558bf558
1 file changed
+10
-8
+10
-8
@@ -353,7 +353,7 @@ class Banking(commands.Cog):
|
||||
)
|
||||
@commands.has_role(987770837627187250)
|
||||
@commands.command()
|
||||
async def rss(self, ctx: CustomCtx, ids: commands.Greedy[int] = [], nation_names: commands.Greedy[str] = []):
|
||||
async def rss(self, ctx: CustomCtx, ids: commands.Greedy[int] = [], *, nation_names: str|None =None):
|
||||
"""get resources of a nation in alliance
|
||||
|
||||
Args:
|
||||
@@ -368,13 +368,15 @@ class Banking(commands.Cog):
|
||||
aiohttp_session=aiohttp.ClientSession(loop=self.bot.loop),
|
||||
)
|
||||
embeds = []
|
||||
for n in nation_names:
|
||||
result = await self.kit.query(
|
||||
"nations",
|
||||
{"nation_name": n, "first": 1},
|
||||
"id"
|
||||
)
|
||||
ids.append(result.nations[0].id)
|
||||
if nation_names:
|
||||
nation_names = nation_names.split(',')
|
||||
for n in nation_names:
|
||||
result = await self.kit.query(
|
||||
"nations",
|
||||
{"nation_name": n, "first": 1},
|
||||
"id"
|
||||
)
|
||||
ids.append(result.nations[0].id)
|
||||
|
||||
for id in ids:
|
||||
kit = self.kit if (id != 103764) else d_kit
|
||||
|
||||
Reference in new issue
Block a user