mirror of
https://github.com/mamoe/mirai.git
synced 2025-04-14 23:20:49 +08:00
Fix warning
This commit is contained in:
parent
9fe26540b2
commit
25b162a0e7
@ -1,8 +1,9 @@
|
||||
@file:Suppress("EXPERIMENTAL_API_USAGE")
|
||||
|
||||
package demo.gentleman
|
||||
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.UnstableDefault
|
||||
import kotlinx.serialization.json.Json
|
||||
import net.mamoe.mirai.contact.Contact
|
||||
import net.mamoe.mirai.message.data.Image
|
||||
@ -15,7 +16,6 @@ class GentleImage(val contact: Contact, val keyword: String) {
|
||||
|
||||
val seImage: Deferred<Image> by lazy { getImage(1) }
|
||||
|
||||
@UseExperimental(UnstableDefault::class)
|
||||
fun getImage(r18: Int): Deferred<Image> {
|
||||
return GlobalScope.async {
|
||||
withTimeoutOrNull(20 * 1000) {
|
||||
|
Loading…
Reference in New Issue
Block a user