Skip to content

Commit 3f23e5e

Browse files
committed
Unknown int?
1 parent daf3e94 commit 3f23e5e

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

bot.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ async def testcmd(ctx: SlashContext):
2424

2525
@slash.context_menu(ContextMenuType.MESSAGE, name="testname", guild_ids=[852402668294766612])
2626
async def testname(ctx: SlashContext):
27-
print(1 + 1)
28-
print(ctx)
2927
print(ctx.message_menus)
3028
await ctx.send("test!")
3129

discord_slash/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1473,7 +1473,7 @@ async def _on_context_menu(self, to_use):
14731473

14741474
self._discord.dispatch("context_menu", ctx)
14751475

1476-
await self.invoke_command(selected_cmd, ctx, args=[])
1476+
await self.invoke_command(selected_cmd, ctx, args={})
14771477

14781478
async def handle_subcommand(self, ctx: context.SlashContext, data: dict):
14791479
"""

discord_slash/context.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def __init__(
6969
self.guild_id = int(_json["guild_id"]) if "guild_id" in _json.keys() else None
7070
if self.guild and self._author_menus_id:
7171
self.author_menus = discord.Member(
72-
data=self._author_menus_id[self._author_menus_id],
72+
data=self._author_menus_id[[id for id in self._author_menus_id][0]],
7373
state=self.bot._connection
7474
)
7575
else:
@@ -80,11 +80,12 @@ def __init__(
8080
self.channel_id = int(_json["channel_id"])
8181
self.message_menus = None
8282
try:
83-
if self._message_menu_id:
83+
if self._message_menu_id != None:
84+
_data = self._message_menu_id[[id for id in self._message_menu_id][0]]
8485
self.message_menus = model.SlashMessage(
8586
state=self.bot._connection,
8687
channel=_discord.get_channel(self.channel_id),
87-
data=self._message_menu_id[self._message_menu_id],
88+
data=_data,
8889
_http=_http,
8990
interaction_token=self._token,
9091
)
@@ -97,7 +98,7 @@ def __init__(
9798
data=_json["member"], state=self.bot._connection, guild=self.guild
9899
)
99100
elif self.guild_id:
100-
self.author = discord.User(data=_json["member"]["user"], state=self.bot._connection)
101+
self.author = discord.Member(data=_json["member"]["user"], state=self.bot._connection)
101102
else:
102103
self.author = discord.User(data=_json["user"], state=self.bot._connection)
103104
self.created_at: datetime.datetime = snowflake_time(int(self.interaction_id))

0 commit comments

Comments
 (0)