Options
All
  • Public
  • Public/Protected
  • All
Menu

mirai-ts

mirai-ts 默认导出内容

Index

References

default

Renames and re-exports Mirai

Type aliases

Adapter

Adapter: "http" | "ws" | "reverse-ws" | "webhook"

AvatarSize

AvatarSize: 1 | 2 | 3 | 4 | 5 | 40 | 100 | 140 | 640

头像尺寸(允许传入的参数)

FileDeleteOptions

FileDeleteOptions: BaseFileOptions

FileDeleteParams

FileDeleteParams: RequestParams<BaseFileOptions>

FileInfoParams

FileInfoResponse

FileInfoResponse: AxiosResponse<ResponseType<FileInfo>>

FileListResponse

FileListResponse: AxiosResponse<ResponseType<FileInfo[]>>

FileMkdirParams

FileMoveParams

FileRenameParams

FileRenameParams: RequestParams<FileRenameOptions>

MessageAndEvent

MessageAndEvent: ChatMessage | Event

所有消息

MessageAndEventType

MessageAndEventType: ChatMessageType | EventType

所有消息类型

MiraiInstance

MiraiInstance: Mirai

Variables

StatusCodeMap

StatusCodeMap: Map<StatusCode, string> = ...

Functions

getAvatarById

  • getAvatarById(id: number, type?: "friend" | "group", size?: AvatarSize): string | null
  • 获取 QQ 头像链接

    Parameters

    • id: number
    • type: "friend" | "group" = "friend"

      类型

    • size: AvatarSize = 640

      尺寸 px (其他数字测试无法获得头像)

      • 1: 40*40
      • 2: 40*40
      • 3: 100*100
      • 4: 140*140
      • 5: 640*640
      • 40: 40*40
      • 100: 100*100

    Returns string | null

getMessageFromStatusCode

  • getMessageFromStatusCode(code: StatusCode): string

toMessageChain

Generated using TypeDoc