easy add multiple wooloo images because im even lazier

merge-requests/9/head
Julius 2019-06-25 20:41:04 +02:00
parent 8d5e064522
commit 8fbf256a91
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,6 @@ import org.slf4j.LoggerFactory
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.boot.runApplication
import java.util.jar.Manifest
val logger: Logger = LoggerFactory.getLogger("OttoBot")
lateinit var jda: ShardManager

View File

@ -17,12 +17,13 @@ class WoolooCommand : Command(
aliases = listOf("wooloo!", "sheepy"),
allowAnywhere = true
) {
val wooloos = (System.getenv("WOOLOOS") ?: "10").toIntOrNull() ?: 10
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")
.setImage("https://cdn.voidcorp.nl/otto/wooloo${rand.nextInt(wooloos)}.jpg").setFooter("Best Sheep <3")
event.reply(b.build())
return CommandResult.SUCCESS
}