MiraiForum

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

    Mirai-BotCensor —— 基于百度智能云内容审核平台实现机器人消息审查并拦截的插件

    插件发布
    3
    3
    1107
    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.
    • WYH2004
      WYH2004 last edited by WYH2004

      Mirai-BotCensor

      https://github.com/WYH2004-MC/Mirai-BotCensor

      提示

      本插件在2.14.0中存在无法拦截消息的Bug,详情请看#2525
      因此请使用2.15.0-RC或更高的Mirai版本

      主要功能:

      在Bot把消息发出去之前过一遍百度的内容审核,防止不合法的内容传到QQ群里,避免Bot风控,同时防止群跟着暴毙

      下载&使用 Download & Use

      1. 从Releases下载最新的插件,并将其安装到Mirai运行环境的/plugins/目录下,并启动Mirai
      2. 第一次使用请前往/config/moe.wyh2004.bot-censor/Config.yml修改配置文件
      3. 填写百度智能云内容审核提供给你的AppID,AppKey,SecretKey
      4. 完成后重启你的Mirai,或者使用/botcensor reload重载配置文件

      指令 Command

      指令 用途 权限
      /BotCensor info 输出插件信息 moe.wyh2004.bot-censor:command.botcensor
      /BotCensor reload 重载配置文件 moe.wyh2004.bot-censor:command.botcensor

      配置文件 Config

      # 此处填写百度云平台的APP_ID
      App_Id: 114514
      # 此处填写百度云平台的APP_Key
      App_Key: 9191810
      # 此处填写百度云平台的SecretKey
      Secret_Key: ababababababab
      # 此处填写建立连接的超时时间(单位:毫秒)
      Connection_Timeout: 10000
      # 此处填写连接传输数据的超时时间(单位:毫秒)
      Socket_Timeout: 60000
      # 号码白名单(列表内的QQ号或者QQ群号将不进行拦截)
      QQWhiteList: 
        - 123456789
        - 123456789
        - 123456789
      # 消息白名单(列表内的文本在聊天中时将不进行拦截,不区分大小写)
      MessageWhiteList: 
        - botcensor
        - hello
        - world
      # 审核不通过发出下面的内容
      BlockMessage: '*Filtered*'
      # 是否对图片进行审核
      ImageCensor: true
      # 是否在触发拦截的时候在后台输出日志
      EnableLogger: true
      # 是否在触发拦截的时候在消息中输出拦截原因
      BlockInfo: true
      

      效果图

      QQ截图20230709200936.png

      最后求个Star

      QAQ

      1 Reply Last reply Reply Quote 0
      • M
        mfygod last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • X
          xuefeng last edited by

          mirai-http的消息也能审核吗

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