Skip to content

Commit

Permalink
Add ,protip command
Browse files Browse the repository at this point in the history
  • Loading branch information
Nickster258 committed Jan 30, 2025
1 parent 6bc81c2 commit 5dda69d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/kotlin/org/openredstone/chad/Chad.kt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ fun main(args: Array<String>) = runBlocking {
put("apply", applyCommand)
put("uuid", uuidCommand)
put("insult", insultCommand(chadConfig.insults))
put("protip", protipCommand(chadConfig.protips))
put("add", command(authorizedRoles) {
val name by required()
val messages by vararg()
Expand Down
1 change: 1 addition & 0 deletions src/main/kotlin/org/openredstone/chad/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ data class ChadConfig(
val botAutomod: AutomodConfig,
val greetings: List<String>,
val insults: List<String>,
val protips: List<String>,
)

object ChadSpec : ConfigSpec("") {
Expand Down
6 changes: 6 additions & 0 deletions src/main/kotlin/org/openredstone/chad/commands/Command.kt
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,12 @@ fun insultCommand(insults: List<String>) = command {
}
}

fun protipCommand(protips: List<String>) = command {
reply {
"Pro Tip: ${protips.random()}"
}
}

val lmgtfy = command {
val search by vararg()
reply {
Expand Down

0 comments on commit 5dda69d

Please sign in to comment.