@@ -18,7 +18,7 @@ class SlashContext:
18
18
:ivar command_id: ID of the command.
19
19
:ivar _http: :class:`.http.SlashCommandRequest` of the client.
20
20
:ivar _discord: :class:`discord.ext.commands.Bot`
21
- :ivar slashcommand: :class:`.client.SlashCommand`
21
+ :ivar logger: Logger instance.
22
22
:ivar sent: Whether you sent the initial response.
23
23
:ivar guild: :class:`discord.Guild` instance of the command message.
24
24
:ivar author: :class:`discord.Member` instance representing author of the command message.
@@ -29,14 +29,14 @@ def __init__(self,
29
29
_http : http .SlashCommandRequest ,
30
30
_json : dict ,
31
31
_discord : typing .Union [discord .Client , commands .Bot ],
32
- slashcommand ):
32
+ logger ):
33
33
self .__token = _json ["token" ]
34
34
self .name = _json ["data" ]["name" ]
35
35
self .interaction_id = _json ["id" ]
36
36
self .command_id = _json ["data" ]["id" ]
37
37
self ._http = _http
38
38
self ._discord = _discord
39
- self .slashcommand = slashcommand
39
+ self .logger = logger
40
40
self .sent = False
41
41
self .guild : discord .Guild = _discord .get_guild (int (_json ["guild_id" ]))
42
42
self .author : discord .Member = self .guild .get_member (int (_json ["member" ]["user" ]["id" ])) if self .guild else None
@@ -100,7 +100,7 @@ async def send(self,
100
100
else :
101
101
base ["data" ]["flags" ] = 64
102
102
if hidden and embeds :
103
- self .slashcommand . logger .warning ("You cannot use both `hidden` and `embeds`!" )
103
+ self .logger .warning ("You cannot use both `hidden` and `embeds` at the same time !" )
104
104
initial = True if not self .sent else False
105
105
resp = await self ._http .post (base , self ._discord .user .id , self .interaction_id , self .__token , initial )
106
106
self .sent = True
0 commit comments