Hey there! This is Kattbot. It's a small bot I developed for fun, and it comes with a handful of nifty features. If you're checking out this repo, here's a rundown of what Kattbot does:
- Chatting with ChatGPT: Kattbot uses ChatGPT to chat. It's not perfect, but it's decent company on a quiet day.
- Image Creation with DALL-E: You can give Kattbot text prompts, and it'll use DALL-E to turn them into images. It can also make variations of existing pics.
- Image Effects: Beyond creating images, Kattbot can tweak them a bit. It can deepfry, oil paint, twirl, and pet emojis, avatars, or other images. Need a super-sized emoji? It does that too.
- Emote Tracking: Just a little feature that tracks which server emotes are used on the server. Fun for some quick stats on user and emote activity.
- A Simple Meow: If you ask nicely with
kattpls meow
, Kattbot will give you a meow. Why? Why not?
If you're a dev and think of any improvements or have some cool ideas, contributions are always welcome. Thanks for checking out Kattbot!
- .NET 8 SDK
- Visual Studio (or any other preferred editor + dotnet command line tool)
- PostgreSQL 15+
Configure the bot token, the "Open"AI key, and connection string in user secrets:
"Kattbot:BotToken": "TOKEN_GOES_HERE"
"Kattbot:OpenAiApiKey": "API_KEY_GOES_HERE"
"Kattbot:ConnectionString": "CONN_STRING_GOES_HERE"
or as environment variables:
Kattbot__BotToken=TOKEN_GOES_HERE
Kattbot__OpenAiApiKey=API_KEY_GOES_HERE
Kattbot__ConnectionString=CONN_STRING_GOES_HERE
Server=_DB_SERVER_IP_;Database=_DB_NAME_;User Id=_DB_USER_;Password=_DB_PASSWORD_;
Set Kattbot
as the startup project and run the project using Kattbot
profile.
dotnet run --project Kattbot
Set Kattbot
as the startup project and run the project using Docker
profile.
Set docker-vs
as the startup project and run the project using Docker Compose
profile.
Optionally, use Compose \W PgAdmin
profile to include a PgAdmin container.
docker build -t kattbot -f docker/Dockerfile .
docker run -d --name kattbot kattbot
docker-compose -f docker/docker-compose.yml up
Optionally, pass the --profile tools
flag to include a PgAdmin container.
- DSharp+ .NET Discord wrapper
- ImageSharp used for image manipulation
- CommandLineParser used for parsing bot command arguments
- MediatR used in CQRS pattern implementation
- Npgsql .NET data provider for PostgreSQL
- PuppeteerSharp .NET port of Puppeteer Node library used for petting images
- NSubstitute used for mocking in unit tests
- TiktokenSharp used for calculating token count of OpenAI chat messages