MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    想问问有办法在插件中拦截整个console的bot的sendmessage吗

    开发交流
    3
    6
    431
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • KJZH001
      KJZH001 童心未泯 last edited by

      因为很多时候会需要部署一些转发信息的服务,比如说mc或者tg和qq实现互通
      但是难免会出现有人想要利用这个特性去发送些不怀好意的东西来封号或者炸群
      所以我希望能够自己写个插件让所有发送的消息拦截下来,把所有的信息从内容审查的接口走一遍后再把过滤后的消息发出去(将敏感词替换为特定字符后再发送)
      内容审查的接口目前已经自行部署实现了
      在论坛中能找到个比较类似的项目是基于百度云的接口,不过已经很长时间没有维护且只是单纯的拦截(看反馈好像还有拦截失败的情况)
      所以我不是很确定能够参考对应的代码来实现类似的效果

      希望可以得到一个建议或者思路,谢谢!

      1 Reply Last reply Reply Quote 0
      • E
        Erzbir last edited by

        This post is deleted!
        KJZH001 1 Reply Last reply Reply Quote 0
        • KJZH001
          KJZH001 童心未泯 @Erzbir last edited by

          @Erzbir 抱歉,我理解不了你的意思,可以麻烦说的再详细点吗?
          字节码我印象里应该是编译后的产物,至于spring aop我此前没有接触过,可能需要找点资料来看看

          E cssxsh 2 Replies Last reply Reply Quote 0
          • E
            Erzbir @KJZH001 last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • cssxsh
              cssxsh @KJZH001 last edited by

              @KJZH001

              MessagePreSendEvent

              这个事件可以用来取消发送

              KJZH001 1 Reply Last reply Reply Quote 0
              • KJZH001
                KJZH001 童心未泯 @cssxsh last edited by

                @cssxsh 好的,谢谢

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact