|
4 | 4 | [](https://github.com/database64128/CubicBot/actions?query=workflow%3ARelease) |
5 | 5 |
|
6 | 6 | A stupid and annoying chatbot for your group chats. |
| 7 | + |
| 8 | +## Features |
| 9 | + |
| 10 | +- Modular architecture: Disable any module you don't need. |
| 11 | +- Adaptive design: Detect bot privacy mode and automatically disable incompatible features. |
| 12 | +- Easy maintenance: Register enabled commands on startup. |
| 13 | + |
| 14 | +## Modules |
| 15 | + |
| 16 | +### Commands |
| 17 | + |
| 18 | +#### 1. Common |
| 19 | + |
| 20 | +- `/call_cops`: 📞 Hello, this is 911. What's your emergency? |
| 21 | +- `/chant`: 🗣 Say it out loud! |
| 22 | +- `/drink`: 🥤 I'm thirsty! |
| 23 | +- `/eat`: ☃️ Do you want to eat a snowman? |
| 24 | +- `/fuck`: 😍 Feeling horny as fuck? |
| 25 | +- `/thank`: 🦃 Reply to or mention the name of the person you would like to thank. |
| 26 | +- `/thanks`: 😊 Say thanks to me! |
| 27 | + |
| 28 | +#### 2. Dice |
| 29 | + |
| 30 | +- `/dice`: 🎲 Dice it! |
| 31 | +- `/dart`: 🎯 Oh shoot! |
| 32 | +- `/basketball`: 🏀 404 Basket Not Found |
| 33 | +- `/soccer`: ⚽ It's your goal! |
| 34 | +- `/roll`: 🎰 Feeling unlucky as hell? |
| 35 | +- `/bowl`: 🎳 Can you knock them all down? |
| 36 | + |
| 37 | +#### 3. Chinese |
| 38 | + |
| 39 | +- `/interrogate`: 🔫 开门,查水表! |
| 40 | + |
| 41 | +### Stats |
| 42 | + |
| 43 | +#### 1. Grass |
| 44 | + |
| 45 | +The Chinese charater "草" is commonly seen in Chinese text messages. It could mean "Damn it!", "Oh shit!", "Fuck!", or simply "Awesome!". |
| 46 | + |
| 47 | +This stats counter counts each individual's usage of "草" in group chats and generates usage rankings. Say it so many times to unlock achievements. |
| 48 | + |
| 49 | +The counter also recognizes common typos like "cao", "艹", "c奥", "c嗷", etc. |
| 50 | + |
| 51 | +## Build |
| 52 | + |
| 53 | +Prerequisites: .NET 5 SDK |
| 54 | + |
| 55 | +Note for packagers: The application by default uses executable directory as config directory. |
| 56 | +To use user's config directory, define the constant `PACKAGED` when building. |
| 57 | + |
| 58 | +```bash |
| 59 | +# Build with Release configuration |
| 60 | +$ dotnet build -c Release |
| 61 | + |
| 62 | +# Publish as framework-dependent |
| 63 | +$ dotnet publish CubicBot.Telegram -c Release |
| 64 | + |
| 65 | +# Publish as self-contained for Linux x64 |
| 66 | +$ dotnet publish CubicBot.Telegram -c Release \ |
| 67 | + -p:PublishReadyToRun=true \ |
| 68 | + -p:PublishSingleFile=true \ |
| 69 | + -p:PublishTrimmed=true \ |
| 70 | + -p:TrimMode=link \ |
| 71 | + -p:DebuggerSupport=false \ |
| 72 | + -p:EnableUnsafeBinaryFormatterSerialization=false \ |
| 73 | + -p:EnableUnsafeUTF7Encoding=false \ |
| 74 | + -p:InvariantGlobalization=true \ |
| 75 | + -r linux-x64 --self-contained |
| 76 | + |
| 77 | +# Publish as self-contained for packaging on Linux x64 |
| 78 | +$ dotnet publish CubicBot.Telegram -c Release \ |
| 79 | + -p:DefineConstants=PACKAGED \ |
| 80 | + -p:PublishReadyToRun=true \ |
| 81 | + -p:PublishSingleFile=true \ |
| 82 | + -p:PublishTrimmed=true \ |
| 83 | + -p:TrimMode=link \ |
| 84 | + -p:DebuggerSupport=false \ |
| 85 | + -p:EnableUnsafeBinaryFormatterSerialization=false \ |
| 86 | + -p:EnableUnsafeUTF7Encoding=false \ |
| 87 | + -p:InvariantGlobalization=true \ |
| 88 | + -r linux-x64 --self-contained |
| 89 | +``` |
| 90 | + |
| 91 | +## Usage |
| 92 | + |
| 93 | +```bash |
| 94 | +# See usage guide. |
| 95 | +$ cubic-bot-telegram --help |
| 96 | + |
| 97 | +# Set bot token in config. |
| 98 | +$ cubic-bot-telegram config set --bot-token "1234567:4TT8bAc8GHUspu3ERYn-KGcvsvGB9u_n4ddy" |
| 99 | + |
| 100 | +# Disable all stats. |
| 101 | +$ cubic-bot-telegram config set --enable-stats-mod false |
| 102 | + |
| 103 | +# Check config. |
| 104 | +$ cubic-bot-telegram config get |
| 105 | + |
| 106 | +# Start bot. |
| 107 | +$ cubic-bot-telegram |
| 108 | +``` |
| 109 | + |
| 110 | +## License |
| 111 | + |
| 112 | +- This project is licensed under [GPLv3](LICENSE). |
| 113 | +- The icons are from [Material Design Icons](https://materialdesignicons.com/) and are licensed under the [Pictogrammers Free License](https://dev.materialdesignicons.com/license). |
| 114 | +- [`System.CommandLine`](https://github.com/dotnet/command-line-api) is licensed under the MIT license. |
| 115 | +- `System.Linq.Async` and `System.Interactive.Async` are from [dotnet/reactive](https://github.com/dotnet/reactive). They are licensed under the MIT license. |
| 116 | +- [`Telegram.Bot`](https://github.com/TelegramBots/Telegram.Bot) and [`Telegram.Bot.Extensions.Polling`](https://github.com/TelegramBots/Telegram.Bot.Extensions.Polling) are licensed under the MIT license. |
| 117 | + |
| 118 | +© 2021 database64128 |
0 commit comments