TempUser

@MiraiInternalApi(message = "其他渠道的临时会话暂未支持. ")
interface TempUser : User

临时会话用户, 非群成员.

#429

Functions

Link copied to clipboard
@JvmName(name = "getAvatarUrl")
open fun avatarUrl(spec: AvatarSpec): String

头像下载链接.

Link copied to clipboard
fun CoroutineScope.globalEventChannel(coroutineContext: CoroutineContext = EmptyCoroutineContext): EventChannel<Event>

在此 CoroutineScope 下创建一个监听所有事件的 EventChannel. 相当于 GlobalEventChannel.parentScope(this).context(coroutineContext).

Link copied to clipboard
abstract override fun nudge(): UserNudge

创建一个 "戳一戳" 消息

Link copied to clipboard
open suspend fun queryProfile(): UserProfile

查询用户信息.

Link copied to clipboard
inline suspend fun Contact.recallMessage(source: MessageChain)
inline suspend fun Contact.recallMessage(source: MessageSource)
Link copied to clipboard
open suspend override fun sendMessage(message: String): MessageReceipt<User>

发送纯文本消息

abstract suspend override fun sendMessage(message: Message): MessageReceipt<User>

向这个对象发送消息.

Link copied to clipboard
suspend fun Contact.sendNudge(nudge: Nudge): Boolean

发送戳一戳消息.

Link copied to clipboard
expect abstract suspend fun uploadImage(resource: ExternalResource): Image

上传一个 资源 作为图片以备发送.

Link copied to clipboard
expect suspend fun Contact.uploadImage(resource: ExternalResource): Image

将文件作为图片上传, 但不发送

actual suspend fun Contact.uploadImage(resource: ExternalResource): Image
suspend fun Contact.uploadImage(file: File, formatName: String? = null): Image

将文件作为图片上传, 但不发送

suspend fun Contact.uploadImage(imageStream: InputStream, formatName: String? = null): Image

读取 InputStream 到临时文件并将其作为图片上传, 但不发送

actual suspend fun Contact.uploadImage(resource: ExternalResource): Image

将文件作为图片上传, 但不发送

Properties

Link copied to clipboard
open val avatarUrl: String

头像下载链接, 规格默认为 AvatarSpec.LARGEST

Link copied to clipboard
expect abstract override val bot: Bot

这个联系对象所属 Bot.

Link copied to clipboard
Link copied to clipboard
abstract override val id: Long

QQ 号码

Link copied to clipboard

获取非空群名片或昵称.

Link copied to clipboard
abstract val nick: String

获取昵称

Link copied to clipboard
abstract val remark: String

备注信息

Link copied to clipboard

获取非空备注或昵称.