13 lines
324 B
Kotlin
13 lines
324 B
Kotlin
package nl.voidcorp.dbot
|
|
|
|
import com.google.gson.Gson
|
|
import com.google.gson.GsonBuilder
|
|
import java.util.*
|
|
|
|
val gson: Gson = GsonBuilder().setPrettyPrinting().create()
|
|
|
|
val random = Random()
|
|
|
|
fun <E> MutableList<E>.addAll(vararg e: E) = this.addAll(listOf(*e))
|
|
|
|
fun <E> List<E>.random(): E = this[random.nextInt(this.size)] |