An open API service indexing awesome lists of open source software.

https://github.com/database64128/cubicbot

A stupid and annoying chatbot for your group chats.
https://github.com/database64128/cubicbot

Last synced: about 1 year ago
JSON representation

A stupid and annoying chatbot for your group chats.

Awesome Lists containing this project

README

          

# Cubic Bot Logo Cubic Bot

[![Build](https://github.com/database64128/CubicBot/actions/workflows/build.yml/badge.svg)](https://github.com/database64128/CubicBot/actions/workflows/build.yml)
[![Release](https://github.com/database64128/CubicBot/actions/workflows/release.yml/badge.svg)](https://github.com/database64128/CubicBot/actions/workflows/release.yml)
[![AUR badge for cubic-bot-telegram-git](https://img.shields.io/aur/version/cubic-bot-telegram-git?label=AUR%20cubic-bot-telegram-git)](https://aur.archlinux.org/packages/cubic-bot-telegram-git/)

A stupid and annoying chatbot for your group chats.

## Features

- Modular architecture: Disable any module you don't need.
- Adaptive design: Detect bot privacy mode and automatically disable incompatible features.
- Easy maintenance: Register enabled commands on startup.

## Modules

### Commands

#### 0. Personal

- `/add_pronouns`: โž• Add pronouns.
- `/remove_pronouns`: โž– Remove pronouns.
- `/get_pronouns`: โค๏ธ Get someone's pronouns by replying to someone's message, or display your own pronoun settings.
- `/set_default_pronouns`: ๐Ÿ“› Set or unset default pronouns for all chats.
- `/set_preferred_pronouns`: ๐Ÿ•ถ๏ธ Set or unset preferred pronouns for this chat.

#### 1. Common

- `/apologize`: ๐Ÿฅบ Sorry about last night.
- `/chant`: ๐Ÿ—ฃ Say it out loud!
- `/drink`: ๐Ÿฅค I'm thirsty!
- `/me`: ๐Ÿคณ What the hell am I doing?
- `/thank`: ๐Ÿฆƒ Reply to or mention the name of the person you would like to thank.
- `/thanks`: ๐Ÿ˜Š Say thanks to me!
- `/vax`: ๐Ÿ’‰ This ain't Space Needle!

#### 2. Dice

- `/dice`: ๐ŸŽฒ Dice it!
- `/dart`: ๐ŸŽฏ Oh shoot!
- `/basketball`: ๐Ÿ€ 404 Basket Not Found
- `/soccer`: โšฝ It's your goal!
- `/roll`: ๐ŸŽฐ Feeling unlucky as hell?
- `/bowl`: ๐ŸŽณ Can you knock them all down?

#### 3. Consent Not Needed

- `/cook`: ๐Ÿ˜‹ Who cooks the best food in the world? Me!
- `/throw`: ๐Ÿฅบ Throw me a bone.
- `/catch`: ๐Ÿ˜ Catch me if you can.
- `/force`: โ˜ฎ๏ธ Use of force not recommended.
- `/touch`: ๐Ÿฅฒ No touching.
- `/fuck`: ๐Ÿ˜ Feeling horny as fuck?

#### 4. Not A Vegan

- `/eat`: โ˜ƒ๏ธ Do you want to eat a snowman?

#### 5. Law Enforcement

- `/call_cops`: ๐Ÿ“ž Hello, this is 911. What's your emergency?
- `/arrest`: ๐Ÿš“ Do I still have the right to remain silent?
- `/guilty_or_not`: ๐Ÿง‘โ€โš–๏ธ Yes, your honor.
- `/overthrow`: ๐Ÿ›๏ธ Welcome to Capitol Hill!

#### 6. Public Services

- `/call_ambulance`: ๐Ÿš‘ Busy saving lives?
- `/call_fire_dept`: ๐Ÿš’ The flames! Beautiful, aren't they?

#### 7. Chinese

- `/interrogate`: ๐Ÿ”ซ ๅผ€้—จ๏ผŒๆŸฅๆฐด่กจ๏ผ

#### 8. Chinese Tasks

- `/ok`: ๐Ÿ‘Œ ๅฅฝ็š„๏ผŒๆฒก้—ฎ้ข˜๏ผ
- `/assign`: ๐Ÿ“› ไบค็ป™ไฝ ไบ†๏ผ
- `/unassign`: ๐Ÿ’ข ไธๅนฒไบ†๏ผ

#### 9. Systemd

- `/systemctl`: `โžก๏ธ systemctl [unit]`

#### 10. Query Stats

- `/get_stats`: ๐Ÿ“… View your stats in this chat, or reply to a message to view the sender's stats in this chat.
- `/leaderboard_grass`: ๐Ÿ€ View grass growth rankings in this chat.
- `/leaderboard_demanding`: ๐Ÿ‘‰ Who's the most demanding person in this chat?
- `/leaderboard_talkative`: ๐Ÿ—ฃ๏ธ Who's the most talkative person in this chat?

### Stats

#### 1. Grass

The Chinese charater "่‰" is commonly seen in Chinese text messages. It could mean "Damn.", "Shit.", "Fuck!", or simply "Awesome!".

This stats counter counts each individual's usage of "่‰" in group chats and generates usage rankings. Say it when you feel like it to unlock achievements.

The counter also recognizes common variants and typos like "cao", "่‰น", "cๅฅฅ", "cๅ—ท", etc.

#### 2. Command Usage Stats

Counts command usage and generates the demanding leaderboard.

#### 3. Message Counter

Counts text messages and generates the talkative leaderboard.

## Build

Prerequisites: .NET 8 SDK

### Build with Release configuration

```bash
dotnet build -c Release
```

### Publish as framework-dependent

```bash
dotnet publish CubicBot.Telegram.App -c Release
dotnet publish CubicBot.Telegram.Tool -c Release
```

### Publish as self-contained for Linux x64

```bash
dotnet publish CubicBot.Telegram.App -c Release \
-p:PublishSingleFile=true \
-p:PublishTrimmed=true \
-p:DebuggerSupport=false \
-p:EnableUnsafeBinaryFormatterSerialization=false \
-p:EnableUnsafeUTF7Encoding=false \
-p:InvariantGlobalization=true \
-r linux-x64 --self-contained
dotnet publish CubicBot.Telegram.Tool -c Release \
-p:PublishSingleFile=true \
-p:PublishTrimmed=true \
-p:DebuggerSupport=false \
-p:EnableUnsafeBinaryFormatterSerialization=false \
-p:EnableUnsafeUTF7Encoding=false \
-p:InvariantGlobalization=true \
-r linux-x64 --self-contained
```

## Usage

```bash
# See usage guide.
$ cubic-bot-telegram-tool --help

# Set bot token in config.
$ cubic-bot-telegram-tool config set --bot-token "1234567:4TT8bAc8GHUspu3ERYn-KGcvsvGB9u_n4ddy"

# Disable all stats.
$ cubic-bot-telegram-tool config set --enable-stats-mod false

# Check config.
$ cubic-bot-telegram-tool config get

# Start bot.
$ cubic-bot-telegram-app
```

## License

- This project is licensed under [GPLv3](LICENSE).
- The icons are from [Material Design Icons](https://materialdesignicons.com/) and are licensed under the [Pictogrammers Free License](https://dev.materialdesignicons.com/license).
- [`System.CommandLine`](https://github.com/dotnet/command-line-api) is licensed under the MIT license.
- `System.Linq.Async` and `System.Interactive.Async` are from [dotnet/reactive](https://github.com/dotnet/reactive). They are licensed under the MIT license.
- [`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.

ยฉ 2024 database64128