mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-05 07:30:09 +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
|
||||
@ExperimentalCoroutinesApi
|
||||
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 {
|
||||
repeat(it.toIntOrNull() ?: 1) {
|
||||
launch {
|
||||
Gentlemen.getOrPut(subject).receive().image.await().send()
|
||||
Gentlemen.provide(subject).receive().image.await().send()
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
|
Loading…
Reference in New Issue
Block a user