@@ -10,9 +10,9 @@ import (
10
10
"github.com/KittyBot-Org/KittyBotGo/dbot"
11
11
"github.com/disgoorg/disgo/discord"
12
12
"github.com/disgoorg/disgo/events"
13
- "github.com/disgoorg/disgo/json"
14
13
"github.com/disgoorg/disgo/rest"
15
14
"github.com/disgoorg/handler"
15
+ "github.com/disgoorg/json"
16
16
"github.com/disgoorg/snowflake/v2"
17
17
)
18
18
@@ -133,7 +133,7 @@ func reportConfirmHandler(b *dbot.Bot) handler.ComponentHandler {
133
133
discord.SelectMenuComponent {
134
134
CustomID : fmt .Sprintf ("handler:report-action:%d" , reportID ),
135
135
Placeholder : "Select an action" ,
136
- MinValues : json .NewPtr (1 ),
136
+ MinValues : json .Ptr (1 ),
137
137
MaxValues : 1 ,
138
138
Options : selectMenuOptions ,
139
139
},
@@ -260,7 +260,7 @@ func reportActionHandler(b *dbot.Bot) handler.ComponentHandler {
260
260
CustomID : "duration" ,
261
261
Style : discord .TextInputStyleShort ,
262
262
Label : "Timeout Duration" ,
263
- MinLength : json .NewPtr (2 ),
263
+ MinLength : json .Ptr (2 ),
264
264
Required : true ,
265
265
Placeholder : "time units: s, m, h example: 1h3s" ,
266
266
Value : "1h" ,
@@ -307,7 +307,7 @@ func reportActionHandler(b *dbot.Bot) handler.ComponentHandler {
307
307
CustomID : "del-days" ,
308
308
Style : discord .TextInputStyleShort ,
309
309
Label : "Message Delete Days" ,
310
- MinLength : json .NewPtr (1 ),
310
+ MinLength : json .Ptr (1 ),
311
311
MaxLength : 1 ,
312
312
Required : true ,
313
313
Placeholder : "0-7" ,
@@ -354,7 +354,7 @@ func reportActionConfirmHandler(b *dbot.Bot) handler.ModalHandler {
354
354
} else {
355
355
until = until .Add (duration )
356
356
if _ , err = b .Client .Rest ().UpdateMember (* e .GuildID (), userID , discord.MemberUpdate {
357
- CommunicationDisabledUntil : json .NewOptional (until ),
357
+ CommunicationDisabledUntil : json .NewNullablePtr (until ),
358
358
}, rest .WithReason (reason )); err != nil {
359
359
b .Logger .Errorf ("Failed to update member: %s" , err )
360
360
content = "Failed to timeout user, please reach out to a bot developer."
0 commit comments