mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-29 09:10:11 +08:00
effective function name
This commit is contained in:
parent
9854000492
commit
b9129576bb
@ -18,7 +18,7 @@ private const val IMAGE_BUFFER_CAPACITY: Int = 5
|
|||||||
@ExperimentalUnsignedTypes
|
@ExperimentalUnsignedTypes
|
||||||
@ExperimentalCoroutinesApi
|
@ExperimentalCoroutinesApi
|
||||||
object Gentlemen : MutableMap<UInt, Gentleman> by mutableMapOf() {
|
object Gentlemen : MutableMap<UInt, Gentleman> by mutableMapOf() {
|
||||||
fun getOrPut(key: Contact): Gentleman = this.getOrPut(key.id) { Gentleman(key) }
|
fun provide(key: Contact): Gentleman = this.getOrPut(key.id) { Gentleman(key) }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -43,7 +43,7 @@ suspend fun main() {
|
|||||||
try {
|
try {
|
||||||
repeat(it.toIntOrNull() ?: 1) {
|
repeat(it.toIntOrNull() ?: 1) {
|
||||||
launch {
|
launch {
|
||||||
Gentlemen.getOrPut(subject).receive().image.await().send()
|
Gentlemen.provide(subject).receive().image.await().send()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
Loading…
Reference in New Issue
Block a user