mirror of
https://github.com/mamoe/mirai.git
synced 2024-12-28 01:20:21 +08:00
Rename uploadGroupVoice to uploadVoice
This commit is contained in:
parent
80debd962a
commit
370e139221
@ -12,7 +12,9 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.contact
|
||||
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.SupervisorJob
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.io.core.Closeable
|
||||
import net.mamoe.mirai.LowLevelAPI
|
||||
import net.mamoe.mirai.contact.*
|
||||
@ -373,8 +375,10 @@ internal class GroupImpl(
|
||||
source.ensureSequenceIdAvailable()
|
||||
} catch (e: Exception) {
|
||||
bot.network.logger.warning {
|
||||
"Timeout awaiting sequenceId for group message(${message.contentToString()
|
||||
.take(10)}). Some features may not work properly"
|
||||
"Timeout awaiting sequenceId for group message(${
|
||||
message.contentToString()
|
||||
.take(10)
|
||||
}). Some features may not work properly"
|
||||
}
|
||||
bot.network.logger.warning(e)
|
||||
}
|
||||
@ -453,7 +457,8 @@ internal class GroupImpl(
|
||||
*/
|
||||
@JvmSynthetic
|
||||
@MiraiExperimentalAPI
|
||||
override suspend fun uploadGroupVoice(input: InputStream): Voice {
|
||||
@SinceMirai("1.2.0")
|
||||
override suspend fun uploadVoice(input: InputStream): Voice {
|
||||
val content = ByteArray(input.available())
|
||||
input.read(content)
|
||||
if (content.size > 1048576) {
|
||||
|
@ -182,7 +182,8 @@ public abstract class Group : Contact(), CoroutineScope {
|
||||
*/
|
||||
@JvmSynthetic
|
||||
@MiraiExperimentalAPI
|
||||
public abstract suspend fun uploadGroupVoice(input: InputStream): Voice
|
||||
@SinceMirai("1.2.0")
|
||||
public abstract suspend fun uploadVoice(input: InputStream): Voice
|
||||
|
||||
|
||||
public companion object {
|
||||
|
Loading…
Reference in New Issue
Block a user