MiraiForum

    • 注册
    • 登录
    • 搜索
    • 热门
    • 最新
    • 未解决
    • 标签
    • 群组
    • 友情链接
    1. 主页
    2. xbaimiao
    3. 主题
    X
    • 资料
    • 关注 0
    • 粉丝 0
    • 主题 2
    • 帖子 4
    • 最佳 0
    • 有争议的 0
    • 群组 0

    xbaimiao 创建的主题

    • X

      Mirai-Http-Api-JavaSDK
      其他项目发布 • • xbaimiao

      3
      0
      赞同
      3
      帖子
      594
      浏览

      X

      此项目基于mirai-http-api
      请启用ws功能

      开源地址:https://github.com/xbaimiao/mirai-http-sdk

      fun main() { val wsInfo = WsInfo("http://127.0.0.1:8099/", 2157207381, "INITKEYCgTu5Bcx") bot = WebSocketBot(wsInfo).connect() bot.join() bot.eventChancel.subscribe<GroupMessageEvent> { val msg = message.contentToString() var boolean1 = false for (baseComponent in this.message.toList()) { if (baseComponent is PlainText) { if (baseComponent.string == "禁言") { boolean1 = true } } } for (baseComponent in this.message.toList()) { if (baseComponent is At) { if (boolean1) { group.getMember(baseComponent.target).thenAccept { it!!.mute(600) } } } } if (msg == "回复我") { group.quoteMessage(Component.text("好"), "${this.messageSource.messageId}") } } }
    • X

      机器人登录不了,账号密码没错
      开发交流 • • xbaimiao

      4
      0
      赞同
      4
      帖子
      1061
      浏览

      X

      net.mamoe.mirai.network.WrongPasswordException: Error(title=禁止登录, message=当前上网环境异常,请更换网络环境或在常用设备上登录或稍后再试。, errorInfo=), tips=若频繁出现, 请尝试开启设备锁

    • 1 / 1