This is a QQ robot back-end for group chatting. The robot will try matching the keywords. Once the keyword is hit, the robot will reply the preset paragraph.
This readme file is still under construction.
- On-the-fly keyword modifying.
- Operators supported. (They can access the server settings via private (or group) conversations with the robot.)
- Blacklist supported. Users in blacklist will be ignored.
- A simple command prompt.
- Keywords loading and saving.
- Keywords isolation among conversations.
- Cool down time limitation.
NOTE: If the instruction make you confused, don't be worried. The README file needs supplement, and I will try to make it more clear in the following days.
If you have any questions about build and deployment, please open an issue. Thanks for your support.
Add following lines to build.gradle
.
For the dependencies
section, please modify:
dependencies{
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation "com.squareup.moshi:moshi:1.8.0"
compile "org.jetbrains.kotlin:kotlin-reflect:1.3.41"
compile group: 'khttp', name: 'khttp', version: '1.0.0'
testCompile group: 'junit', name: 'junit', version: '4.12'
}
And don't forget to add jcenter
to the repositories
section:
repositories{
mavenCentral()
jcenter()
}
If you've done the instructions above, now you can build this project with gradle successfully.
NOTE: Our robot is referred as "back-end" in the following instructions.
- Download CoolQ Air (Official website), and install the plugin CoolQ HTTP API. (Pro is better but not necessary.)
- Deploy the plugin as HTTP server, and set
post_url
in configuration file as our Kotlin back-end's address. (default port is defined as1080
, which lies in/src/main/data/Global.kt
,the varlocalPort
) Official docs here. - Modify
remoteAddress
(defined in/src/main/data/Global.kt
) to the CoolQ HTTP API listening address. (e.g. for users whose CoolQ runs on localhost, at the port of 5700, the remote address may be 127.0.0.1:5700) - Now launch our back-end, CoolQ Air and enable CoolQ HTTP API plugin.
- As a test. you can send a message
syn
to your bot. If your configuration is correct, you'll receiveack
from the robot.