@@ -5,6 +5,7 @@ package router
5
5
6
6
import (
7
7
"container/list"
8
+ "context"
8
9
"errors"
9
10
"testing"
10
11
@@ -136,7 +137,7 @@ func TestCommand_mapOptions(t *testing.T) {
136
137
},
137
138
{
138
139
name : "channel option" ,
139
- data : & objects.ApplicationCommandInteractionData {ID : 6921 },
140
+ data : & objects.ApplicationCommandInteractionData {DiscordBaseObject : objects. DiscordBaseObject { ID : 6921 } },
140
141
cmdOptions : []* objects.ApplicationCommandOption {
141
142
{
142
143
OptionType : objects .TypeChannel ,
@@ -153,13 +154,13 @@ func TestCommand_mapOptions(t *testing.T) {
153
154
expects : map [string ]interface {}{
154
155
"opt1" : & ResolvableChannel {
155
156
id : "123" ,
156
- data : & objects.ApplicationCommandInteractionData {ID : 6921 },
157
+ data : & objects.ApplicationCommandInteractionData {DiscordBaseObject : objects. DiscordBaseObject { ID : 6921 } },
157
158
},
158
159
},
159
160
},
160
161
{
161
162
name : "role option" ,
162
- data : & objects.ApplicationCommandInteractionData {ID : 6921 },
163
+ data : & objects.ApplicationCommandInteractionData {DiscordBaseObject : objects. DiscordBaseObject { ID : 6921 } },
163
164
cmdOptions : []* objects.ApplicationCommandOption {
164
165
{
165
166
OptionType : objects .TypeRole ,
@@ -176,13 +177,13 @@ func TestCommand_mapOptions(t *testing.T) {
176
177
expects : map [string ]interface {}{
177
178
"opt1" : & ResolvableRole {
178
179
id : "123" ,
179
- data : & objects.ApplicationCommandInteractionData {ID : 6921 },
180
+ data : & objects.ApplicationCommandInteractionData {DiscordBaseObject : objects. DiscordBaseObject { ID : 6921 } },
180
181
},
181
182
},
182
183
},
183
184
{
184
185
name : "user option" ,
185
- data : & objects.ApplicationCommandInteractionData {ID : 6921 },
186
+ data : & objects.ApplicationCommandInteractionData {DiscordBaseObject : objects. DiscordBaseObject { ID : 6921 } },
186
187
cmdOptions : []* objects.ApplicationCommandOption {
187
188
{
188
189
OptionType : objects .TypeUser ,
@@ -199,7 +200,7 @@ func TestCommand_mapOptions(t *testing.T) {
199
200
expects : map [string ]interface {}{
200
201
"opt1" : & ResolvableUser {
201
202
id : "123" ,
202
- data : & objects.ApplicationCommandInteractionData {ID : 6921 },
203
+ data : & objects.ApplicationCommandInteractionData {DiscordBaseObject : objects. DiscordBaseObject { ID : 6921 } },
203
204
},
204
205
},
205
206
},
@@ -262,7 +263,7 @@ func TestCommand_mapOptions(t *testing.T) {
262
263
},
263
264
{
264
265
name : "mentionable option" ,
265
- data : & objects.ApplicationCommandInteractionData {ID : 6921 },
266
+ data : & objects.ApplicationCommandInteractionData {DiscordBaseObject : objects. DiscordBaseObject { ID : 6921 } },
266
267
cmdOptions : []* objects.ApplicationCommandOption {
267
268
{
268
269
OptionType : objects .TypeMentionable ,
@@ -279,7 +280,7 @@ func TestCommand_mapOptions(t *testing.T) {
279
280
expects : map [string ]interface {}{
280
281
"opt1" : & ResolvableMentionable {
281
282
id : "123" ,
282
- data : & objects.ApplicationCommandInteractionData {ID : 6921 },
283
+ data : & objects.ApplicationCommandInteractionData {DiscordBaseObject : objects. DiscordBaseObject { ID : 6921 } },
283
284
},
284
285
},
285
286
},
@@ -333,12 +334,12 @@ var messageTargetData = &objects.ApplicationCommandInteractionData{
333
334
Resolved : objects.ApplicationCommandInteractionDataResolved {
334
335
Users : map [objects.Snowflake ]objects.User {
335
336
1 : {
336
- ID : 1234 ,
337
+ DiscordBaseObject : objects. DiscordBaseObject { ID : 6921 } ,
337
338
},
338
339
},
339
340
Messages : map [objects.Snowflake ]objects.Message {
340
341
1 : {
341
- ID : 5678 ,
342
+ DiscordBaseObject : objects. DiscordBaseObject { ID : 6921 } ,
342
343
},
343
344
},
344
345
},
@@ -349,12 +350,12 @@ var userTargetData = &objects.ApplicationCommandInteractionData{
349
350
Resolved : objects.ApplicationCommandInteractionDataResolved {
350
351
Users : map [objects.Snowflake ]objects.User {
351
352
2 : {
352
- ID : 1234 ,
353
+ DiscordBaseObject : objects. DiscordBaseObject { ID : 6921 } ,
353
354
},
354
355
},
355
356
Messages : map [objects.Snowflake ]objects.Message {
356
357
1 : {
357
- ID : 5678 ,
358
+ DiscordBaseObject : objects. DiscordBaseObject { ID : 6921 } ,
358
359
},
359
360
},
360
361
},
@@ -515,7 +516,7 @@ func TestCommand_execute(t *testing.T) {
515
516
}
516
517
517
518
// Execute the command.
518
- resp := c .execute (commandExecutionOptions {
519
+ resp := c .execute (context . Background (), commandExecutionOptions {
519
520
restClient : dummyRestClient ,
520
521
exceptionHandler : errHandler ,
521
522
interaction : dummyInteraction ,
0 commit comments