16 lines
558 B
Kotlin
16 lines
558 B
Kotlin
package nl.voidcorp.discord.commands.`fun`
|
|
|
|
import nl.voidcorp.discord.command.*
|
|
import org.springframework.stereotype.Service
|
|
|
|
@Service
|
|
class Echo : Command("echo", usage = "echo whatever", group = CommandGroup.FUN, commandLevel = CommandLevel.MODERATOR) {
|
|
override fun handle(event: CommandMessage): CommandResult {
|
|
event.message.delete().queue()
|
|
val msg = event.params.drop(1).joinToString(" ")
|
|
if (msg.isEmpty())
|
|
return CommandResult.PARAMETERS
|
|
event.reply(msg)
|
|
return CommandResult.SUCCESS
|
|
}
|
|
} |