Skip to content

CSUSTers/csust-got

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

csust-got

Go Report codebeat badge

GitHub Workflow Status GitHub Workflow Status

GitHub language count GitHub GitHub code size GitHub repo size GitHub issues GitHub closed issues

A modern Telegram bot for CSUST, developed in Go.

English | ไธญๆ–‡

Features

  • ๐Ÿค– AI Chat Conversations (supports multiple models)
  • ๐Ÿ” Message Search (powered by MeiliSearch)
  • ๐ŸŽจ Stable Diffusion Image Generation
  • ๐ŸŽฒ Gacha System
  • ๐ŸŽญ Entertainment Features
  • ๐Ÿ”ง Flexible Configuration System
  • ๐ŸŽฏ Regular Expression Triggers
  • ๐Ÿ›ก๏ธ Comprehensive Permission Management
  • ๐Ÿ”— MCP (Model Context Protocol) Support

System Requirements

  • Go 1.25+
  • Redis
  • Docker & Docker Compose (recommended)

Quick Deployment

Using Docker Compose (Recommended)

You need to install Docker first.

Clone the project:

git clone git@github.com:CSUSTers/csust-got.git
cd csust-got

Then run with Docker Compose:

docker-compose up -d

Build from Source

# Clone the project
git clone git@github.com:CSUSTers/csust-got.git
cd csust-got

# Install dependencies
make deps

# Build
make build

# Run
./got

Upgrade

Pull the latest version:

docker-compose pull
docker-compose up -d

Configuration

Please modify the configuration in config.yaml.

  • token: Change to your bot token
  • redis.pass: Change Redis password
  • requirepass in redis.conf: Change Redis password (must match the above)

Commands

Basic Functions

say_hello - A simple greeting
hello_to_all - Greet everyone
recorder - <msg> Repeat messages
info - Get bot information
id - Get user ID (private chat)
cid - Get group ID

Search Functions

google - <Key Words> Google search
bing - <Key Words> Bing search
bilibili - <Key Words> Search on Bilibili
github - <Key Words> Search on GitHub
search - <keyword> Search message history
search - -id <chat_id> <keyword> Search messages in specific group
search - -p <page> <keyword> Search with pagination

AI Chat

chat - <text> Chat with AI
think - <text> Deep thinking mode
summary - Summarize replied content (reply to a message)

Management Functions

ban_myself - Ban yourself for rand[40,120] seconds
ban - Ban command [Admin]
ban_soft - Soft ban [Admin]
fake_ban - [duration] Fake ban
fake_ban_myself - Fake ban yourself
kill - Fake kill
no_sticker - Enable traffic-saving mode
shutdown - Shutdown bot
boot - Boot up bot

Entertainment Functions

hitokoto - [type:ab..kl] Random quotes
hitowuta - Random poems
hito_netease - NetEase style quotes
mc - Minecraft mini-game
reburn - Respawn (MC game)
gacha_setting - Set JSON gacha configuration
gacha - Draw cards according to your configuration

Voice Related

getvoice - character=<character> gender=<sex> theme=<topic> type=<type> <text> 

Stable Diffusion

sd - <prompt> Generate images
sdcfg - Configure SD server
sdcfg - set <key> <value> Set configuration
sdcfg - get <key> Get configuration
sdlast - Get last used prompt

Utility Functions

forward - [msgID] Forward a historical message
sleep - Time to sleep
no_sleep - Don't sleep
run_after - <duration> <msg> Remind yourself to do something later
hoocoder - <text> Hoo encoding
decode - _[decoding]_[encoding] <text> Decode text
bye_world - [duration] Say goodbye to the world
hello_world - Say hello to the world  
iwant - f=<format> I want sticker
setiwant - f=<format> vf=<format> sf=<format> Set sticker format

Tech Stack

  • Language: Go 1.25+
  • Framework: telebot.v3
  • Database: Redis
  • Search: MeiliSearch
  • AI: OpenAI API Compatible Interface
  • Image Generation: Stable Diffusion WebUI
  • Containerization: Docker & Docker Compose

Development

Local Development

# Install dependencies
make deps

# Run tests
make test

# Build
make build

# Code check
golangci-lint run

License

This project is licensed under the MIT License.


Note: This project is for educational and communication purposes only.

About

๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰ csust new bot in go

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 10

Languages