Giter Club home page Giter Club logo

picplug's Introduction

PicPlug

一个自用的机器人发图插件

出于实际使用考虑,mirai console内建的指令系统不太适合聊天环境使用, 所以也顺便构建了一套比较简单易用的指令处理系统。

使用说明

安装

release界面下载jar包,然后放置到plugins文件下即可

==注意== : mirai-compose因为mirai版本可能过旧,无法使用此插件,推荐使用mcl

说明

出于避免打扰群友的考虑,插件默认不对任何群启用功能(除非你的群正好命中了配置文件里默认生成的示例群号), 启用插件需向groupList配置属性下添加对应的群号

配置文件结构

# 默认的图片API,可依据需求自行更改,但务必保证返回的结果是一张图片,最好是jpg,其他不做可用性保证
imageAPIList: 
  - 'https://imgapi.cn/cos.php?return=img'
# 插件生效的群列表
groupList: 
  - 1234567890
  - 9876543210
# 插件的指令前缀,仅此前缀开头的聊天信息会被识别为命令
# 示例:
#     Alice: !!ping
#      Bot:  @Alice pong
commandPrefix: '!!'
# 插件下载的图片储存位置
imageStorage: './data/image/PicPlug/'
# 指令配置开关,用于控制是否启用该指令
ping: true
getRandImage: true
# 获取图片的cd时间,单位ms
getRandImageCD: 0

当前支持的功能

  • !!help 机器人会回复帮助信息并@你
  • !!ping 机器人会回复pong并@你
  • !!gkd 机器人会从指定的图片api处获取一张图片,然后发到群里并@你

!!help指令演示:

help command demo

项目结构

Main Class : vcg.Plugin

main/
├── java/
│   └── vcg/
│       ├── Commands/
│       │   ├── Command.java
│       │   ├── CommandsManager.java
│       │   ├── GetRandImage.java
│       │   ├── Help.java
│       │   ├── Ping.java
│       │   ├── PureCommand.java
│       │   └── SimpleCommand.java
│       ├── Config/
│       │   └── Config.kt
│       ├── Plugin.java
│       └── Utils/
│           ├── ImgDownloader.java
│           └── Resources.java
└── resources/
    └── META-INF/
        └── services/
            └── net.mamoe.mirai.console.plugin.jvm.JvmPlugin

picplug's People

Contributors

vatinacharo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.