GitHunt
DA

dadahsueh/zakook-bot

Simple KOOK bot that can subscribe to RSS feeds.

๐ŸšงZakook Bot๐Ÿšง

Status
Platform
Docker Pulls
GitHub last commit
Github Stars

  • TODOs
    • channel logging
    • fix concurrency

๐Ÿค– Simple template KOOK bot. Doesn't do much, does do RSS.

๐Ÿ“ Table of Contents

๐Ÿง About

For educational purposes. Good clean code. The bot is intended for Kook, can subscribe to RSS feeds, and ~~
definitely~~ probably plausibly maybe scalable. Uses Python v3.11.9
and khl.py.



๐ŸŽˆ Usage

To begin exploring:

/help

Commands

  • /help: get usage.
  • /jini: ping pong check.
  • /clear: clears all messages of a text channel.
  • /rss sub [url]: subscribes the current channel to a rss feed, immediately posts the newest entry and periodically
    posts new entries.
  • /rss unsub [url]: unsubscribes the current channel from a rss feed.
  • /rss list: see a list of rss feeds the current channel is subscribed to.
  • /rss unsub [all/*] or /rss unsuball: unsubscribes the current channel from all rss feeds.
  • /rss dump: dumps all rss links.

1๏ธโƒฃ Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and
testing

Prerequisites

If you need to clone the repo

git clone https://github.com/dadahsueh/zakook-bot.git
cd zakook-bot
mv .env.template .env

If you do not see a .env file just manually rename .env.template to .env and or create one with touch .env.
Then configure the .env as like below (substituting for your values).
You could also run with python main.py -t YOUR_TOKEN.

TOKEN=BOT_TOKEN_HERE

CONTAINER_NAME=zakook-bot-runner

ADMIN_USERS=["635507656"]

BOT_NAME=ZAKOOK

BOT_VERSION=v0.0.1

MUSIC_STATUS=["(็งไบบ็ฌ‘ๅฃฐ);่ต›้ฉฌๅจ˜", ";"]

CF=

Installing

  1. Create Python virtual environment or just python -m venv venv
virtualenv venv
  1. Windows POSH activate venv
./venv/Scripts/activate
  1. Linux / Mac activate venv
source venv/bin/activate
  1. Install dependencies
pip install -r requirements.txt
  1. Annnnnnnnnnd run ๐ŸŽŠ
python main.py

You can also try running with arguments -t TOKEN or --token TOKEN, and -v -vv for verbosity changes. Which would
look like python main.py -t TOKEN -vv

Also also try -cf https://xxxworker.xxxname.workers.dev/ to configure a Cloudflare Worker

๐Ÿš€ Deploying your own bot

Docker README <--Goooo.

Cloudflare Worker README <--For RSSHub.


๐ŸŽ‰ Acknowledgements

๐Ÿ’ญ Resources

dadahsueh/zakook-bot | GitHunt