This is OPQ based QQbot for watching group member's Dota2 game record.
This project is developed under Python3.9.
This bot also integrates a plugin manage system, you can develop any plugin you want.
Notice: All the command are insensitive to half-width
!and full-width!.
| 已支持插件 | 插件说明 |
|---|---|
| Dota2Watcher | Dota2战绩监视 |
| Dota2Fortune | Dota2每日运势 |
!插件列表: List all the plugins and their status(On or Off).
!启用插件 [index]: Enable a plugin by its index in the list.
!禁用插件 [index]: Disable a plugin by its index in the list.
!帮助: Display help content.
!插件帮助 [plugin_name]: Display help content for a given plugin.
!查看监视: List all the players that is been watched.
!添加监视 [nickname] [steam_id] [QQ account id]: Add a player to be watched, by nickname, steam_id and QQ account id.
!移除监视 [index]: Remove a player from the watching list by its index.
!今日运势: Today's fortune of Dota2.
!幸运英雄: Today's lucky hero.
Install and run OPQ
Install Docker or Python, see the details below.
You can run python command directly for debug, but I strongly suggest you to use docker, because it's better to run this bot in background.
Using docker, you can pull docker image from DockerHub or build your own image from this repo.
Pull docker image from DockerHub
docker pull zegwe/dota2bot:latest
Create botInfo.db file.
mkdir Dota2Bot
cd Dota2Bot
touch botInfo.db
Create and edit config.json file
vim config.json
Here's an example for config.json, you can also see this as config.example.json in repo
{
"api_key": "xxxxx",
"bot_qq": 1234567890,
"groups": [1234567890],
"opq_url": "http://127.0.0.1:8080/v1/LuaApiCaller",
"ws_url": "http://127.0.0.1:8080",
"debug": false
}
Run with Docker.
docker run -itd -v $(pwd)/config.json:/opt/dota2bot/config.json -v $(pwd)/botInfo.db:/opt/dota2bot/botInfo.db --name dota2bot zegwe/dota2bot:latest
Clone this repo
git clone https://github.com/ZegWe/Dota2Bot.git
Edit config.json
cd Dota2Bot
cp config.example.json config.json
vim config.json
Create botInfo.db.db file.
touch botInfo.db
Run with docker-compose
docker-compose up -d
Install Python3.9
Clone this repo
git clone https://github.com/ZegWe/Dota2Bot.git
Edit config.json
cd Dota2Bot
cp config.example.json config.json
vim config.json
Run with Python directly
pip install -r requirements.txt
python app.py
To develop your own plugin, you should follow these rules:
Plugin in the model folder.__init__ method. You can reference other plugins in plugins folder.add_plugin method.Content type
Image
Digest
Size
22 MB
Last updated
over 4 years ago
docker pull zegwe/dota2bot