Giter Club home page Giter Club logo

kookbotx's Introduction

KookBot X

Developing KOOK bots with Python made easy

Features

  • Simple & easy-to-maintain project structure. While you still get your working hello world function in 4 lines, scaling up is much easier.
def init(_bot: Bot):
    @_bot.command(name="hello")
    async def hello_world(msg, *args):
        await msg.reply("... world!")
  • Lots of examples to help you get started, including a wide range of applications from LLMs to music streaming and from file serving to currency systems.
  • Easy to use and maintain. The framework is designed to be easy to use and maintain. You can never get lost in your codebase.

Quick Start

Prerequisites

Python 3.9 or higher is required to run this framework. The project is developed and tested on Python 3.9.2, but it should work on any Python 3.9+ version.

Run the following command to install the required packages:

pip install -r requirements.txt

Warning

Please note: KookBot X uses a customized version of khl.py. We've made modifications to the library and are not affiliated with its original author. For issues related to this customized version, please do not contact the original author of khl.py.

Running the bot

On Linux, simply run:

KOOKBOT_WS_TOKEN='<REPLACE_WITH_YOUR_BOT_TOKEN>' python3 main.py

On Windows, run:

$env:KOOKBOT_WS_TOKEN='<REPLACE_WITH_YOUR_BOT_TOKEN>'; python main.py

Note

Make sure to replace <REPLACE_WITH_YOUR_BOT_TOKEN> with your own bot token. Grab a token from KOOK developer platform. Never share your bot token with anyone. It's like a password to your bot.

If you see a success message, congratulations! You have successfully set up your bot. Now send some message to a shared channel with your bot to see it in action.

Set KOOKBOTX_DEBUG=1 to see debug messages logged to the log file (default: logs/kookbotx.log).

Database setup (coming soon)

Database integration is planned in future updates.

Contributing

We welcome contributions from the community, whether it's some improvements to code structure, a utility module, or more examples. Please read the contributing guide to get started.

Credits

Contributors

kookbotx's People

Contributors

gennadiyev avatar

Stargazers

 avatar Chlorie avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

fanqino1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.