npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bot-open-im

v0.0.20

Published

Bot OpenIM SDK for Web and MiniProgram

Readme

Bot OpenIM SDK for Web、uni-app and MiniProgram

import BotOpenIMSDK from 'bot-open-im'


const openIM = new BotOpenIMSDK({
  administrators: 'string', // 可选  管理员id,用于消息
  userInfo: {
    role: 'string', // 'lecturer'讲师 | 'assistant'助教 | 'guest'嘉宾 | 'student'学员
    name: 'string', // 姓名
    id: 'string' // 真实ID
  },
  userID: 'string', // 鉴权接口返回的userID
  url: 'string', // websockt接口
  platformID: 'number', // 平台ID 1:ios 2:android 3:windows 4:osx 5:web&mini 7:linux 8:管理员
  token: 'string', // 鉴权接口返回的token
  OnRecvLectureMessage: 'function', // 监听讲师消息(当login传入groupID时候)
  OnRecvStudentMessage: 'function', // 监听所有消息
  OnRecvGroupMessage: 'function', // 监听群消息(当login传入groupID时候)
  OnRecvGlobalMessage: 'function', // 监听我的消息
  OnGroupInfoChanged: 'function', // 监听群组信息改变
})


// promise errCode: 0 成功
// 加入群聊 success后进行其它操作,groupID传则返回群组资料,不传则只是单纯登录返回其它
openIM.login(groupID)

// 修改群公告
openIM.setGroupNotice(msg)

// 学员操作: 视频连线 'videoConnection' 音频连线 'audioConnection' 加入连线 'joinConnection' 退出连线 'logoutConnection' 取消连线 ’cancelConnection' 拒绝连线邀请 ‘refuseInvite' 同意连线邀请 'agreeInvite' 提问 'question'

// 老师操作:同意 'agreeConnection', 拒绝'refuseConnection', 邀请'inviteConnection', 挂断 'knockConnection', '''禁言‘muteMember',开启直播'liveOn', 结束直播'liveOff' 开启举手 'onConnection' 关闭举手 'offConnection' 全员禁言 'onMute' 关闭全员禁言 'offMute' 回复 'reply'

// 普通文本消息’text' 'joinRoom' 'leaveRoom'
openIM.sendTypeMessage({
	type: 'string', // 参考上述
	userID: 'string',
        message?: string,
        replyData?: object,
	mutedSeconds?: 'number'
})

// 获取历史聊天消息 groupID 群聊ID,拉取群聊时传入,否则为“”,startClientMsgID 上一次拉取的最后一条消息ID或空字符串,为空字符则从最新一条开始, count 每次拉取条数, userID 用户ID,拉取单聊时传入,否则为“”,
openIM.getHistoryMessageList({
	groupID: 'string',
	startClientMsgID: 'string',
	count: 'number',
	userID: 'string'
})