@@ -8,7 +8,7 @@ import com.kotlindiscord.kord.extensions.DISCORD_GREEN
88import com.kotlindiscord.kord.extensions.DISCORD_RED
99import com.kotlindiscord.kord.extensions.commands.Arguments
1010import com.kotlindiscord.kord.extensions.commands.converters.impl.boolean
11- import com.kotlindiscord.kord.extensions.commands.converters.impl.defaultingCoalescingDuration
11+ import com.kotlindiscord.kord.extensions.commands.converters.impl.coalescingDefaultingDuration
1212import com.kotlindiscord.kord.extensions.commands.converters.impl.defaultingInt
1313import com.kotlindiscord.kord.extensions.commands.converters.impl.defaultingString
1414import com.kotlindiscord.kord.extensions.commands.converters.impl.int
@@ -40,8 +40,6 @@ import dev.racci.elixir.utils.MODERATORS
4040import dev.racci.elixir.utils.MOD_ACTION_LOG
4141import dev.racci.elixir.utils.ResponseHelper
4242import dev.racci.elixir.utils.TRIALMODERATORS
43- import kotlin.system.exitProcess
44- import kotlin.time.ExperimentalTime
4543import kotlinx.coroutines.flow.catch
4644import kotlinx.coroutines.flow.collect
4745import kotlinx.coroutines.flow.filterNotNull
@@ -851,58 +849,121 @@ class Moderation : Extension() {
851849
852850 inner class ClearArgs : Arguments () {
853851
854- val messages by int(" messages" , " Messages" )
852+ val messages by int {
853+ name = " messages"
854+ description = " Messages"
855+ }
855856 }
856857
857858 inner class KickArgs : Arguments () {
858859
859- val userArgument by user(" kickUser" , " Person to kick" )
860- val reason by defaultingString(" reason" , " The reason for the Kick" , " No Reason Provided" )
860+ val userArgument by user {
861+ name = " kickUser"
862+ description = " Person to kick"
863+ }
864+ val reason by defaultingString {
865+ name = " reason"
866+ description = " The reason for the Kick"
867+ defaultValue = " No Reason Provided"
868+ }
861869 }
862870
863871 inner class BanArgs : Arguments () {
864872
865- val userArgument by user(" banUser" , " Person to ban" )
866- val messages by int(" messages" , " Messages" )
867- val reason by defaultingString(" reason" , " The reason for the ban" , " No Reason Provided" )
873+ val userArgument by user {
874+ name = " banUser"
875+ description = " Person to ban"
876+ }
877+ val messages by int {
878+ name = " messages"
879+ description = " Messages"
880+ }
881+ val reason by defaultingString {
882+ name = " reason"
883+ description = " The reason for the ban"
884+ defaultValue = " No Reason Provided"
885+ }
868886 }
869887
870888 inner class UnbanArgs : Arguments () {
871889
872- val userArgument by user(" unbanUserId" , " Person Unbanned" )
890+ val userArgument by user {
891+ name = " unbanUserId"
892+ description = " Person Unbanned"
893+ }
873894 }
874895
875896 inner class SoftBanArgs : Arguments () {
876897
877- val userArgument by user(" softBanUser" , " Person to Soft ban" )
878- val messages by defaultingInt(" messages" , " Messages" , 3 )
879- val reason by defaultingString(" reason" , " The reason for the ban" , " No Reason Provided" )
898+ val userArgument by user {
899+ name = " softBanUser"
900+ description = " Person to Soft ban"
901+ }
902+ val messages by defaultingInt {
903+ name = " messages"
904+ description = " Messages"
905+ defaultValue = 3
906+ }
907+ val reason by defaultingString {
908+ name = " reason"
909+ description = " The reason for the ban"
910+ defaultValue = " No Reason Provided"
911+ }
880912 }
881913
882914 inner class SayArgs : Arguments () {
883915
884- val messageArgument by string(" message" , " Message contents" )
885- val embedMessage by boolean(" embed" , " Would you like to send as embed" )
916+ val messageArgument by string {
917+ name = " message"
918+ description = " Message contents"
919+ }
920+ val embedMessage by boolean {
921+ name = " embed"
922+ description = " Would you like to send as embed"
923+ }
886924 }
887925
888926 inner class PresenceArgs : Arguments () {
889927
890- val presenceArgument by string(" presence" , " Elixir's presence" )
928+ val presenceArgument by string {
929+ name = " presence"
930+ description = " Presence"
931+ }
891932 }
892933
893934 inner class WarnArgs : Arguments () {
894935
895- val userArgument by user(" warnUser" , " Person to Warn" )
896- val warnPoints by defaultingInt(" points" , " Amount of points to add" , 10 )
897- val reason by defaultingString(" reason" , " Reason for Warn" , " No Reason Provided" )
936+ val userArgument by user {
937+ name = " warnUser"
938+ description = " Person to Warn"
939+ }
940+ val warnPoints by defaultingInt {
941+ name = " points"
942+ description = " Amount of points to add"
943+ defaultValue = 10
944+ }
945+ val reason by defaultingString {
946+ name = " reason"
947+ description = " Reason for Warn"
948+ defaultValue = " No Reason Provided"
949+ }
898950 }
899951
900952 inner class TimeoutArgs : Arguments () {
901953
902- val userArgument by user(" timeoutUser" , " Person to timeout" )
903- val duration by defaultingCoalescingDuration(" duration" ,
904- " Duration of timeout" ,
905- DateTimePeriod (0 , 0 , 0 , 6 , 0 , 0 , 0 ))
906- val reason by defaultingString(" reason" , " Reason for timeout" , " No reason provided" )
954+ val userArgument by user {
955+ name = " timeoutUser"
956+ description = " Person to timeout"
957+ }
958+ val duration by coalescingDefaultingDuration {
959+ name = " duration"
960+ description = " Duration of timeout"
961+ defaultValue = DateTimePeriod (0 , 0 , 0 , 6 , 0 , 0 , 0 )
962+ }
963+ val reason by defaultingString {
964+ name = " reason"
965+ description = " Reason for timeout"
966+ defaultValue = " No reason provided"
967+ }
907968 }
908969}
0 commit comments