Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Pmaru-top committed Jan 28, 2023
0 parents commit ee8e291
Show file tree
Hide file tree
Showing 16 changed files with 810 additions and 0 deletions.
131 changes: 131 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# User-specific stuff
.idea/

*.iml
*.ipr
*.iws

# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

.gradle
build/

# Ignore Gradle GUI config
gradle-app.setting

# Cache of project
.gradletasknamecache

**/build/

# Common working directory
run/

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar


# Local Test Launch point
src/test/kotlin/RunTerminal.kt

# Mirai console files with direct bootstrap
/config
/data
/plugins
/bots

# Local Test Launch Point working directory
/debug-sandbox
62 changes: 62 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# AntiRecall 反撤回插件

这是一个基于[`mirai`](https://github.com/mamoe/mirai) 机器人框架的插件

不想折腾模块? 在mirai上安装本插件进行简单配置即可实现

![image](images/show.png)

## 下载
[![image](https://img.shields.io/github/downloads/MX233/AntiRecall/total)](https://github.com/MX233/AntiRecall/releases)

# 一定要先看完README

## 本插件功能
- 获取被撤回的消息
- 闪照破解

## 前置插件
- [chat-command](https://github.com/project-mirai/chat-command)

## 指令
**前缀一般是 `/`**

| 指令 | 作用 | 示例 |
|:-------------------------|:-------------|:-------------------------------------------|
| `ar` `en` `<true/false>` | `设置开启或关闭` | ar en true |
| `ar` `ca` `<time>` | `设置消息缓存时间` | ar ca 30 |
| `ar` `fm` `<text>` | `设置转发消息的消息链` | ar fm ${sender}发送了一条${type}消息:\n${message} |
| `ar` `reload` | `重载配置` | - |

## 首次使用
请使用[Mirai Console Backend - Permissions](https://docs.mirai.mamoe.net/console/Permissions.html)
设置权限

### 添加一个被监听者
> 当被监听者发送消息后会被缓存或转发
```
perm add m<群号>.* top.cutestar.antirecall:monitored
//一个示例:perm add m123456789.* top.cutestar.antirecall:monitored
```
监听所有群
```
perm add m* top.cutestar.antirecall:monitored
```

### 添加一个消息接收者
> 当出现选中类型的消息时,此消息会被转发给消息接收者
```
perm add <被许可人ID> top.cutestar.antirecall:receiver
//一个转发到好友的示例:perm add f123456789 top.cutestar.antirecall:receiver
//一个转发到群的示例:perm add g123456789 top.cutestar.antirecall:receiver
```

### 添加命令使用权限
```
perm add u<qq号> top.cutestar.antirecall:command.ar
```

设置权限后请使用`ar reload`重载

### 配置
> 请见配置文件注释
14 changes: 14 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.6.21'
id 'org.jetbrains.kotlin.plugin.serialization' version '1.6.21'

id 'net.mamoe.mirai-console' version '2.10.1'
}

group = 'top.cutestar.antiRecall'
version = '1.0.3'

repositories {
maven { url 'https://maven.aliyun.com/repository/public' }
mavenCentral()
}
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kotlin.code.style=official
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit ee8e291

Please sign in to comment.