mirror of
https://github.com/house-of-vanity/desubot.git
synced 2025-07-07 12:44:08 +00:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
739109e5f7 | |||
4ac7920815 | |||
47f1ab9348 | |||
28cdf4be2e | |||
0bcb99089b |
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "desubot"
|
||||
version = "0.5.11"
|
||||
version = "0.5.12"
|
||||
authors = ["AB <ab@hexor.ru>"]
|
||||
edition = "2018"
|
||||
|
||||
@ -30,7 +30,7 @@ log = { version = "^0.4.5", features = ["std"] }
|
||||
subprocess = "0.2.6"
|
||||
serde_json = "1.0"
|
||||
markov = "1.1.0"
|
||||
rand = "0.7.3"
|
||||
rand = "0.8.5"
|
||||
mystem = "^0.2"
|
||||
#mystem = { path = "../mystem-rs" }
|
||||
async-trait = "0.1.42"
|
||||
|
31
README.md
31
README.md
@ -1,19 +1,26 @@
|
||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fhouse-of-vanity%2Fdesubot?ref=badge_shield)
|
||||
|
||||
Desubot
|
||||
Telegram bot with light group statistic and heavy spy features.
|
||||
# Desubot Telegram Bot
|
||||
|
||||
== Features ==
|
||||
* Collect all the messages sent to group.
|
||||
* Collect all the media sent to group including voice, stickers, video, video notes, documents.
|
||||
* /here command to mention all members.
|
||||
* Alongside with saving whole message bot perform blacklist filter and stemming for every word (only Russian). "Красивую собаку мыли негры" -> "красивый собака мыть негр"
|
||||
* Generate sentences using Markov Chains trained on history with /markov_all.
|
||||
* Syntax highlighting for CODE exported to image.
|
||||
**Desubot** is a Telegram bot with light group statistics and powerful spy features.
|
||||
|
||||
## Features
|
||||
|
||||
- **Collect all messages**: The bot collects all messages sent to the group.
|
||||
- **Collect all media**: The bot saves all media sent to the group, including voice messages, stickers, videos, video notes, and documents.
|
||||
- **/here command**: Mention all group members.
|
||||
- **Blacklist filter and stemming**: The bot saves the entire message, performs blacklist filtering, and stems every word (Russian only). For example, "Красивую собаку мыли негры" -> "красивый собака мыть негр".
|
||||
- **Markov Chain sentence generation**: The bot generates sentences using Markov Chains trained on the history with the `/markov_all` command.
|
||||
- **Syntax highlighting for CODE**: Export code with syntax highlighting to an image.
|
||||
|
||||
## Important
|
||||
|
||||
- **MyStem**: Desubot uses MyStem by Yandex for word stemming and assumes that the `mystem` binary is available in the PATH.
|
||||
- **Ubuntu dependencies**: The following packages are required:
|
||||
|
||||
```bash
|
||||
libssl-dev libsqlite3-dev cmake libfreetype-dev pkg-config
|
||||
|
||||
== Important ==
|
||||
* Desubot uses MyStem by Yandex for word stemming and assume that mystem binary is available in PATH.
|
||||
* ubuntu deps: libssl-dev libsqlite3-dev cmake libfreetype-dev pkg-config
|
||||
|
||||
[Docker Hub](https://hub.docker.com/repository/docker/ultradesu/desubot/general)
|
||||
|
||||
|
@ -439,7 +439,7 @@ impl Execute for MarkovAll {
|
||||
chain.feed(messages);
|
||||
let mut sentences = chain.generate();
|
||||
let mut msg = String::new();
|
||||
for _ in 1..rand::thread_rng().gen_range(2, 10) {
|
||||
for _ in 1..rand::thread_rng().gen_range(2..10) {
|
||||
msg = format!("{} {}", msg, sentences.pop().unwrap());
|
||||
}
|
||||
match api
|
||||
@ -477,7 +477,7 @@ impl Execute for Markov {
|
||||
chain.feed(messages);
|
||||
let mut sentences = chain.generate();
|
||||
let mut msg = String::new();
|
||||
for _ in 1..rand::thread_rng().gen_range(2, 10) {
|
||||
for _ in 1..rand::thread_rng().gen_range(2..10) {
|
||||
msg = format!("{} {}", msg, sentences.pop().unwrap_or(" ".into()));
|
||||
}
|
||||
match api
|
||||
|
Reference in New Issue
Block a user