Skip to content

Commit 9bd40ca

Browse files
committed
fix illegal arguments
1 parent 9ad0295 commit 9bd40ca

2 files changed

Lines changed: 23 additions & 20 deletions

File tree

botfest/src/main/kotlin/net/modfest/botfest/extensions/SubmissionCommands.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import dev.kordex.core.commands.application.slash.ephemeralSubCommand
1515
import dev.kordex.core.commands.application.slash.group
1616
import dev.kordex.core.commands.converters.impl.attachment
1717
import dev.kordex.core.commands.converters.impl.defaultingInt
18+
import dev.kordex.core.commands.converters.impl.int
1819
import dev.kordex.core.commands.converters.impl.string
1920
import dev.kordex.core.commands.converters.impl.user
2021
import dev.kordex.core.components.components
@@ -506,7 +507,7 @@ class SubmissionCommands : Extension(), KordExKoinComponent {
506507
)
507508

508509
respond {
509-
content = Translations.Commands.Submission.Update.Meta.Response.success
510+
content = Translations.Commands.Submission.Update.Marker.Response.success
510511
.withContext(this@action)
511512
.translateNamed(
512513
"subId" to subId
@@ -552,7 +553,7 @@ class SubmissionCommands : Extension(), KordExKoinComponent {
552553
))
553554

554555
respond {
555-
content = Translations.Commands.Submission.Update.Meta.Response.success
556+
content = Translations.Commands.Submission.Update.Warp.Response.success
556557
.withContext(this@action)
557558
.translateNamed(
558559
"subId" to subId
@@ -593,7 +594,7 @@ class SubmissionCommands : Extension(), KordExKoinComponent {
593594
platform.withAuth(this.user).editSubmissionBoothData(curEvent, subId, SubmissionData.BoothData(this.arguments.shards.toInt(), this.arguments.eta, SubmissionData.BoothData.BoothStatus.valueOf(this.arguments.status.name)))
594595

595596
respond {
596-
content = Translations.Commands.Submission.Update.Meta.Response.success
597+
content = Translations.Commands.Submission.Update.Booth.Response.success
597598
.withContext(this@action)
598599
.translateNamed(
599600
"subId" to subId
@@ -875,19 +876,19 @@ class SubmissionCommands : Extension(), KordExKoinComponent {
875876
}
876877

877878
inner class WarpArg : SubmissionArg() {
878-
val warpX by optionalNumberChoice {
879+
val warpX by int {
879880
name = Translations.Arguments.Submission.Claim.WarpX.name
880881
description = Translations.Arguments.Submission.Claim.WarpX.description
881882
}
882-
val warpY by optionalNumberChoice {
883+
val warpY by int {
883884
name = Translations.Arguments.Submission.Claim.WarpY.name
884885
description = Translations.Arguments.Submission.Claim.WarpY.description
885886
}
886-
val warpZ by optionalNumberChoice {
887+
val warpZ by int {
887888
name = Translations.Arguments.Submission.Claim.WarpZ.name
888889
description = Translations.Arguments.Submission.Claim.WarpZ.description
889890
}
890-
val warpDirection by optionalEnumChoice<WarpDirection> {
891+
val warpDirection by enumChoice<WarpDirection> {
891892
name = Translations.Arguments.Submission.Claim.Direction.name
892893
description = Translations.Arguments.Submission.Claim.Direction.description
893894
typeName = Translations.Arguments.Submission.Claim.Direction.type
@@ -905,10 +906,9 @@ class SubmissionCommands : Extension(), KordExKoinComponent {
905906
Translations.Arguments.Submission.Booth.Shards.Choice.four to 4
906907
)
907908
}
908-
val eta by defaultingInt {
909+
val eta by int {
909910
name = Translations.Arguments.Submission.Booth.Eta.name
910911
description = Translations.Arguments.Submission.Booth.Eta.description
911-
defaultValue = 3
912912
}
913913
val status by enumChoice<BoothStatus> {
914914
name = Translations.Arguments.Submission.Booth.Status.name

botfest/src/main/resources/translations/botfest/strings.properties

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,13 @@ commands.submission.update.meta.response.notmodrinth=Can't update a non-modrinth
9999
commands.submission.update.meta.response.success=Updated the metadata and images for {subId}
100100
commands.submission.update.marker.name=marker
101101
commands.submission.update.marker.description=Update your booth map marker location and icon
102+
commands.submission.update.marker.response.success=Updated the booth map marker for {subId}!
102103
commands.submission.update.warp.name=warp
103104
commands.submission.update.warp.description=Update your booth warp location and direction
105+
commands.submission.update.warp.response.success=Updated the booth warp location for {subId}!
104106
commands.submission.update.booth.name=booth
105107
commands.submission.update.booth.description=Update your booth progress and size
108+
commands.submission.update.booth.response.success=Updated the booth progress for {subId}!
106109
commands.submission.delete.name=unsubmit
107110
commands.submission.delete.description=Withdraw your submission
108111
commands.submission.delete.response.notfound=Unknown submission {subId}
@@ -157,17 +160,17 @@ arguments.submission.edit_image.name=image
157160
arguments.submission.edit_image.description=Your image
158161
arguments.submission.invite.user.name=user
159162
arguments.submission.invite.user.description=The registered user to add to your submission
160-
arguments.submission.claim.marker_x.name=map marker x
163+
arguments.submission.claim.marker_x.name=marker_x
161164
arguments.submission.claim.marker_x.description=x coordinate at the center of your claim
162-
arguments.submission.claim.marker_z.name=map marker z
165+
arguments.submission.claim.marker_z.name=marker_z
163166
arguments.submission.claim.marker_z.description=z coordinate at the center of your claim
164-
arguments.submission.claim.warp_x.name=warp x
167+
arguments.submission.claim.warp_x.name=warp_x
165168
arguments.submission.claim.warp_x.description=x coordinate on the path near your claim
166-
arguments.submission.claim.warp_y.name=warp y
169+
arguments.submission.claim.warp_y.name=warp_y
167170
arguments.submission.claim.warp_y.description=y coordinate on the path near your claim
168-
arguments.submission.claim.warp_z.name=warp z
171+
arguments.submission.claim.warp_z.name=warp_z
169172
arguments.submission.claim.warp_z.description=z coordinate on the path near your claim
170-
arguments.submission.claim.direction.name=warp direction
173+
arguments.submission.claim.direction.name=direction
171174
arguments.submission.claim.direction.description=which direction your booth is in compared to your warp
172175
arguments.submission.claim.direction.type=direction
173176
arguments.submission.claim.direction.choice.north=North (-180)
@@ -186,17 +189,17 @@ arguments.submission.claim.direction.choice.west=West (90)
186189
arguments.submission.claim.direction.choice.west_north_west=West-Northwest (120)
187190
arguments.submission.claim.direction.choice.north_west=Northwest (135)
188191
arguments.submission.claim.direction.choice.north_north_west=North-Northwest (150)
189-
arguments.submission.claim.item_icon.name=item icon
192+
arguments.submission.claim.item_icon.name=item_icon
190193
arguments.submission.claim.item_icon.description=the ID of an item that represents your booth
191-
arguments.submission.booth.shards.name=shard count
194+
arguments.submission.booth.shards.name=shard_count
192195
arguments.submission.booth.shards.description=The number of shards placed in your booth
193196
arguments.submission.booth.shards.choice.one=One shard (visitor)
194197
arguments.submission.booth.shards.choice.two=Two shards (visitor + 1 bonus)
195198
arguments.submission.booth.shards.choice.three=Three shards (visitor + 2 bonus)
196199
arguments.submission.booth.shards.choice.four=Four shards (visitor + 3 bonus)
197-
arguments.submission.booth.eta.name=time to complete (minutes)
198-
arguments.submission.booth.eta.description=The average time it might take to tour your booth
199-
arguments.submission.booth.status.name=booth status
200+
arguments.submission.booth.eta.name=eta
201+
arguments.submission.booth.eta.description=The average time (in minutes) it might take to tour your booth
202+
arguments.submission.booth.status.name=status
200203
arguments.submission.booth.status.type=status
201204
arguments.submission.booth.status.description=How ready the booth is to tour
202205
arguments.submission.booth.status.choice.constructing=Under Construction

0 commit comments

Comments
 (0)