Merge branch 'smallchange' into 'master'
easy add multiple wooloo images because im even lazier See merge request jdejeu/ottobotv2!9
This commit is contained in:
commit
ec30827b24
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue