@@ -10,9 +10,9 @@ import (
1010 "github.com/KittyBot-Org/KittyBotGo/dbot"
1111 "github.com/disgoorg/disgo/discord"
1212 "github.com/disgoorg/disgo/events"
13- "github.com/disgoorg/disgo/json"
1413 "github.com/disgoorg/disgo/rest"
1514 "github.com/disgoorg/handler"
15+ "github.com/disgoorg/json"
1616 "github.com/disgoorg/snowflake/v2"
1717)
1818
@@ -133,7 +133,7 @@ func reportConfirmHandler(b *dbot.Bot) handler.ComponentHandler {
133133 discord.SelectMenuComponent {
134134 CustomID : fmt .Sprintf ("handler:report-action:%d" , reportID ),
135135 Placeholder : "Select an action" ,
136- MinValues : json .NewPtr (1 ),
136+ MinValues : json .Ptr (1 ),
137137 MaxValues : 1 ,
138138 Options : selectMenuOptions ,
139139 },
@@ -260,7 +260,7 @@ func reportActionHandler(b *dbot.Bot) handler.ComponentHandler {
260260 CustomID : "duration" ,
261261 Style : discord .TextInputStyleShort ,
262262 Label : "Timeout Duration" ,
263- MinLength : json .NewPtr (2 ),
263+ MinLength : json .Ptr (2 ),
264264 Required : true ,
265265 Placeholder : "time units: s, m, h example: 1h3s" ,
266266 Value : "1h" ,
@@ -307,7 +307,7 @@ func reportActionHandler(b *dbot.Bot) handler.ComponentHandler {
307307 CustomID : "del-days" ,
308308 Style : discord .TextInputStyleShort ,
309309 Label : "Message Delete Days" ,
310- MinLength : json .NewPtr (1 ),
310+ MinLength : json .Ptr (1 ),
311311 MaxLength : 1 ,
312312 Required : true ,
313313 Placeholder : "0-7" ,
@@ -354,7 +354,7 @@ func reportActionConfirmHandler(b *dbot.Bot) handler.ModalHandler {
354354 } else {
355355 until = until .Add (duration )
356356 if _ , err = b .Client .Rest ().UpdateMember (* e .GuildID (), userID , discord.MemberUpdate {
357- CommunicationDisabledUntil : json .NewOptional (until ),
357+ CommunicationDisabledUntil : json .NewNullablePtr (until ),
358358 }, rest .WithReason (reason )); err != nil {
359359 b .Logger .Errorf ("Failed to update member: %s" , err )
360360 content = "Failed to timeout user, please reach out to a bot developer."
0 commit comments