From 81c763e57fe6334ce56085281346b23fe54e9d5f Mon Sep 17 00:00:00 2001 From: Julius de Jeu Date: Tue, 25 Jun 2019 20:24:08 +0200 Subject: [PATCH] add wooloo because victor kept complaining --- .../discord/commands/fun/WoolooCommand.kt | 29 +++++++++++++++++++ src/main/resources/application.properties | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 src/main/kotlin/nl/voidcorp/discord/commands/fun/WoolooCommand.kt diff --git a/src/main/kotlin/nl/voidcorp/discord/commands/fun/WoolooCommand.kt b/src/main/kotlin/nl/voidcorp/discord/commands/fun/WoolooCommand.kt new file mode 100644 index 0000000..762fccb --- /dev/null +++ b/src/main/kotlin/nl/voidcorp/discord/commands/fun/WoolooCommand.kt @@ -0,0 +1,29 @@ +package nl.voidcorp.discord.commands.`fun` + +import net.dv8tion.jda.api.EmbedBuilder +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 org.springframework.stereotype.Service +import kotlin.random.Random + +@Service +class WoolooCommand : Command( + "wooloo", + helpMesage = "WOOLOO!", + usage = "wooloo", + group = CommandGroup.FUN, + aliases = listOf("wooloo!", "sheepy"), + allowAnywhere = true +) { + + val rand = Random(System.currentTimeMillis()) + override fun handle(event: CommandMessage): CommandResult { + + val b = EmbedBuilder().setTitle("Wooloo best sheepy") + .setImage("https://cdn.voidcorp.nl/otto/wooloo${rand.nextInt(1, 4)}.jpg").setFooter("Best Sheep <3") + event.reply(b.build()) + return CommandResult.SUCCESS + } +} \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 2ea6e81..268492c 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.5 \ No newline at end of file +ottobot.version=1.6 \ No newline at end of file