@@ -20,7 +20,7 @@ func Test_findOption(t *testing.T) {
20
20
options []* objects.ApplicationCommandOption
21
21
22
22
wants * objects.ApplicationCommandOption
23
- }{
23
+ }{
24
24
{
25
25
name : "nil slice" ,
26
26
},
@@ -78,37 +78,37 @@ func TestCommand_mapOptions(t *testing.T) {
78
78
}{
79
79
{
80
80
name : "option not in command" ,
81
- cmdOptions : []* objects.ApplicationCommandOption {
81
+ cmdOptions : []* objects.ApplicationCommandOption {
82
82
{
83
83
OptionType : objects .TypeInteger ,
84
- Name : "opt1" ,
84
+ Name : "opt1" ,
85
85
},
86
86
{
87
87
OptionType : objects .TypeString ,
88
- Name : "opt2" ,
88
+ Name : "opt2" ,
89
89
},
90
90
},
91
91
retOptions : []* objects.ApplicationCommandInteractionDataOption {
92
92
{
93
- Type : objects .TypeString ,
93
+ Type : objects .TypeString ,
94
94
Name : "opt3" ,
95
95
Value : "123" ,
96
96
},
97
97
},
98
98
expectsErr : "interaction option doesn't exist on command" ,
99
99
},
100
100
{
101
- name : "autocomplete type mismatch" ,
101
+ name : "autocomplete type mismatch" ,
102
102
autocomplete : true ,
103
- cmdOptions : []* objects.ApplicationCommandOption {
103
+ cmdOptions : []* objects.ApplicationCommandOption {
104
104
{
105
105
OptionType : objects .TypeInteger ,
106
- Name : "opt1" ,
106
+ Name : "opt1" ,
107
107
},
108
108
},
109
109
retOptions : []* objects.ApplicationCommandInteractionDataOption {
110
110
{
111
- Type : objects .TypeString ,
111
+ Type : objects .TypeString ,
112
112
Name : "opt1" ,
113
113
Value : "123" ,
114
114
},
@@ -118,25 +118,25 @@ func TestCommand_mapOptions(t *testing.T) {
118
118
},
119
119
},
120
120
{
121
- name : "non-autocomplete type mismatch" ,
121
+ name : "non-autocomplete type mismatch" ,
122
122
cmdOptions : []* objects.ApplicationCommandOption {
123
123
{
124
124
OptionType : objects .TypeInteger ,
125
- Name : "opt1" ,
125
+ Name : "opt1" ,
126
126
},
127
127
},
128
128
retOptions : []* objects.ApplicationCommandInteractionDataOption {
129
129
{
130
- Type : objects .TypeString ,
130
+ Type : objects .TypeString ,
131
131
Name : "opt1" ,
132
132
Value : "123" ,
133
133
},
134
134
},
135
135
expectsErr : "mismatched interaction option" ,
136
136
},
137
137
{
138
- name : "channel option" ,
139
- data : & objects.ApplicationCommandInteractionData {ID : 6921 },
138
+ name : "channel option" ,
139
+ data : & objects.ApplicationCommandInteractionData {ID : 6921 },
140
140
cmdOptions : []* objects.ApplicationCommandOption {
141
141
{
142
142
OptionType : objects .TypeChannel ,
@@ -158,8 +158,8 @@ func TestCommand_mapOptions(t *testing.T) {
158
158
},
159
159
},
160
160
{
161
- name : "role option" ,
162
- data : & objects.ApplicationCommandInteractionData {ID : 6921 },
161
+ name : "role option" ,
162
+ data : & objects.ApplicationCommandInteractionData {ID : 6921 },
163
163
cmdOptions : []* objects.ApplicationCommandOption {
164
164
{
165
165
OptionType : objects .TypeRole ,
@@ -181,8 +181,8 @@ func TestCommand_mapOptions(t *testing.T) {
181
181
},
182
182
},
183
183
{
184
- name : "user option" ,
185
- data : & objects.ApplicationCommandInteractionData {ID : 6921 },
184
+ name : "user option" ,
185
+ data : & objects.ApplicationCommandInteractionData {ID : 6921 },
186
186
cmdOptions : []* objects.ApplicationCommandOption {
187
187
{
188
188
OptionType : objects .TypeUser ,
@@ -204,7 +204,7 @@ func TestCommand_mapOptions(t *testing.T) {
204
204
},
205
205
},
206
206
{
207
- name : "string option" ,
207
+ name : "string option" ,
208
208
cmdOptions : []* objects.ApplicationCommandOption {
209
209
{
210
210
OptionType : objects .TypeString ,
@@ -223,7 +223,7 @@ func TestCommand_mapOptions(t *testing.T) {
223
223
},
224
224
},
225
225
{
226
- name : "int option" ,
226
+ name : "int option" ,
227
227
cmdOptions : []* objects.ApplicationCommandOption {
228
228
{
229
229
OptionType : objects .TypeInteger ,
@@ -242,7 +242,7 @@ func TestCommand_mapOptions(t *testing.T) {
242
242
},
243
243
},
244
244
{
245
- name : "boolean option" ,
245
+ name : "boolean option" ,
246
246
cmdOptions : []* objects.ApplicationCommandOption {
247
247
{
248
248
OptionType : objects .TypeBoolean ,
@@ -261,8 +261,8 @@ func TestCommand_mapOptions(t *testing.T) {
261
261
},
262
262
},
263
263
{
264
- name : "mentionable option" ,
265
- data : & objects.ApplicationCommandInteractionData {ID : 6921 },
264
+ name : "mentionable option" ,
265
+ data : & objects.ApplicationCommandInteractionData {ID : 6921 },
266
266
cmdOptions : []* objects.ApplicationCommandOption {
267
267
{
268
268
OptionType : objects .TypeMentionable ,
@@ -284,16 +284,16 @@ func TestCommand_mapOptions(t *testing.T) {
284
284
},
285
285
},
286
286
{
287
- name : "double option" ,
287
+ name : "double option" ,
288
288
cmdOptions : []* objects.ApplicationCommandOption {
289
289
{
290
- OptionType : objects .TypeDouble ,
290
+ OptionType : objects .TypeNumber ,
291
291
Name : "opt1" ,
292
292
},
293
293
},
294
294
retOptions : []* objects.ApplicationCommandInteractionDataOption {
295
295
{
296
- Type : objects .TypeDouble ,
296
+ Type : objects .TypeNumber ,
297
297
Name : "opt1" ,
298
298
Value : (float64 )(69 ),
299
299
},
0 commit comments