diff --git a/src/main/kotlin/nl/voidcorp/discord/commands/fun/Echo.kt b/src/main/kotlin/nl/voidcorp/discord/commands/fun/Echo.kt index 0a11aeb..9875e86 100644 --- a/src/main/kotlin/nl/voidcorp/discord/commands/fun/Echo.kt +++ b/src/main/kotlin/nl/voidcorp/discord/commands/fun/Echo.kt @@ -1,14 +1,12 @@ package nl.voidcorp.discord.commands.`fun` -import nl.voidcorp.discord.command.Command -import nl.voidcorp.discord.command.CommandGroup -import nl.voidcorp.discord.command.CommandMessage -import nl.voidcorp.discord.command.CommandResult +import nl.voidcorp.discord.command.* import org.springframework.stereotype.Service @Service -class Echo : Command("echo", usage = "echo whatever", group = CommandGroup.FUN) { +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 diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index ee4d040..828d9d5 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -8,4 +8,4 @@ spring.jpa.generate-ddl=true spring.jpa.hibernate.ddl-auto=create-drop spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true -ottobot.version=1.1 \ No newline at end of file +ottobot.version=1.2 \ No newline at end of file