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.has_role(987770837627187250)
|
||||||
@commands.command()
|
@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
|
"""get resources of a nation in alliance
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@@ -368,13 +368,15 @@ class Banking(commands.Cog):
|
|||||||
aiohttp_session=aiohttp.ClientSession(loop=self.bot.loop),
|
aiohttp_session=aiohttp.ClientSession(loop=self.bot.loop),
|
||||||
)
|
)
|
||||||
embeds = []
|
embeds = []
|
||||||
for n in nation_names:
|
if nation_names:
|
||||||
result = await self.kit.query(
|
nation_names = nation_names.split(',')
|
||||||
"nations",
|
for n in nation_names:
|
||||||
{"nation_name": n, "first": 1},
|
result = await self.kit.query(
|
||||||
"id"
|
"nations",
|
||||||
)
|
{"nation_name": n, "first": 1},
|
||||||
ids.append(result.nations[0].id)
|
"id"
|
||||||
|
)
|
||||||
|
ids.append(result.nations[0].id)
|
||||||
|
|
||||||
for id in ids:
|
for id in ids:
|
||||||
kit = self.kit if (id != 103764) else d_kit
|
kit = self.kit if (id != 103764) else d_kit
|
||||||
|
|||||||
Reference in new issue
Block a user