Killua Save

Source code for the discord bot Killua

Project README

Killua Discord Bot

Killua

Games, Moderation, todo lists and much more.

Discord Server Lines discord.py Support Killua on Patreon! Language grade: Python

What is Killua?

I started Killua as a way to learn python and different programming concepts. It definitely was not the easiest way to do it, but it got me to a good level of python knowledge plus having a cool bot! As a result, I greatly appreciate issues, PRs and contributions enhancing my code.

Algorithms

Killua contains a number of interesting algorithms which I have explained more and gone into detail in the algorithms folder.

Programming concepts list

As explained previously, I use Killua as a tool to learn more about python and programming. Here is a list of programming concepts Killua uses and which ones it is planned to use at some point in the future.

  • OOP (Object Oriented Programming)
  • Web scraping
  • IPC (Inter Process Communication)
  • Providing and requesting REST-APIs
  • Image manipulation
  • Asyncronous Programming
  • logging
  • NonSQL databases
  • Python typing library
  • GitHub PRs, branches, issues, todo-lists, CLI
  • caching
  • Website with backend
  • CSS
  • Threading
  • Github workflows

Contributors

I would like to give a big thank you to everyone who has helped me on this journey, each in their different way.

Who has been with the project since the start, creating the website and supporting it through Patreon.

An incredibly talented artist who made many artworks which make Killua look and feel so much better for little to no price.

Contributed initial parts of the web scraping code.

Helped to change the incredibly bad mess of everything in one file into an organised, dynamic system and helped out with git commands.

He contributed a lot to one of the best looking commands, book which uses image generation to make your collection book filled with cards. More recently he also helped a lot with making voting confirmations look much better!

Helped write some of the action texts, topics, 8ball responses and would you rather questions.

Found a lot of hug images and also tracked down most artists of previously used ones to give them credit making Killua a much more considerate bot.

Gave me the original idea for this bot and helped me in the early stages, enduring lots of pings and stupid questions.

Running Killua locally

First, set up a virtual environment. Do so with python3 -m venv env; source env/bin/activate. To leave the virtual environment after you are done, simply run deactivate

requirements.txt contains the libraries you'll need. To install them use pip3 install -r requirements.txt

You will need a Mongodb account. Why do I use mongodb and not SQL? In my opinion, mongo is easier to use and you can manually add and remove data.

You will have to create a mongodb account here, then follow the instructions in setup.py and then run python3 setup.py or choose the "setup database" option in the menu to get the database set up

You will also need a file named config.json having the layout like this:

{
    "token": "token",
    
    "mongodb": "your-mongodb-token",
    "pxlapi": "pxlapi-token",
    "patreon": "patreon-api-token",
    "dbl_token": "dbl-token",
    "topgg_token": "topgg-token",
    "password": "vote-pages-password",
    "port": 8000,
    "ipc": "ipc-token"
}

You can finally run the bot in development or production environment in a menu by running ./run.sh

If you add any commands, please make sure to also add tests for it. A document explaining how tests for Killua work can be found here

If you don't like me using one of your images for the hug command, please contact me on discord Kile#0606 or on [email protected]

If you have any further questions, join my discord server or dm me!

Open Source Agenda is not affiliated with "Killua" Project. README Source: Kile/Killua
Stars
31
Open Issues
10
Last Commit
1 month ago
Repository
License

Open Source Agenda Badge

Open Source Agenda Rating