All Projects → heyaaman → KazukoBot

heyaaman / KazukoBot

Licence: GPL-3.0 license
An anime themed telegram group management bot based on sqlalchemy database running on python3.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to KazukoBot

Resume-Generator
A Resume builder which allows users to build their own custom resumes with details like experience,projects , skills ,education etc. Users can also have the feature to download their resumes . To contribute send PR at development branch from where it will be merged in master once checked.
Stars: ✭ 28 (+12%)
Mutual labels:  sqlalchemy, sqlalchemy-python
mock-alchemy
SQLAlchemy mock helpers.
Stars: ✭ 44 (+76%)
Mutual labels:  sqlalchemy, sqlalchemy-python
OpenAlchemy
Define SQLAlchemy models using the OpenAPI specification.
Stars: ✭ 39 (+56%)
Mutual labels:  sqlalchemy, sqlalchemy-python
tellerbot
Telegram Bot for over-the-counter trading
Stars: ✭ 17 (-32%)
Mutual labels:  telegram-bot
bot
茶馆群内QQ机器人(小可)
Stars: ✭ 61 (+144%)
Mutual labels:  telegram-bot
telepush
可一键部署的Vercel Telegram消息推送机器人
Stars: ✭ 24 (-4%)
Mutual labels:  telegram-bot
cowin-slot-tracker
Tracker to check the covid shot slot availability in India and send mobile alerts via Telegram Bot.
Stars: ✭ 30 (+20%)
Mutual labels:  telegram-bot
FastAPI-Full-Stack-Samples
The API Application Development using Python FastAPI, including interactive API documentation
Stars: ✭ 61 (+144%)
Mutual labels:  sqlalchemy
TycotBot
TycotBot
Stars: ✭ 24 (-4%)
Mutual labels:  telegram-bot
YouTube-Viewer
A multithreaded view bot for YouTube
Stars: ✭ 529 (+2016%)
Mutual labels:  python-bot
Telegram-Music-Bot
A Telegram music catalog bot.
Stars: ✭ 19 (-24%)
Mutual labels:  telegram-bot
flask-db
A Flask CLI extension to help migrate and manage your SQL database.
Stars: ✭ 56 (+124%)
Mutual labels:  sqlalchemy
DailyAnimalsBot
Telegram bot that sends random pictures with cats and dogs
Stars: ✭ 14 (-44%)
Mutual labels:  telegram-bot
grammy-inline-menu
Inline Menus for Telegram made simple. Successor of telegraf-inline-menu.
Stars: ✭ 274 (+996%)
Mutual labels:  telegram-bot
PglRobot
No description or website provided.
Stars: ✭ 12 (-52%)
Mutual labels:  telegram-bot
telegram-bot-api-worker
Take an alternate route to Telegram Bot API :)
Stars: ✭ 75 (+200%)
Mutual labels:  telegram-bot
mqtg-bot
MQTT Client Telegram Bot
Stars: ✭ 67 (+168%)
Mutual labels:  telegram-bot
TgTwitterStreamer
Continous Integration from Twitter to Telegram.
Stars: ✭ 55 (+120%)
Mutual labels:  telegram-bot
TelegramBot
A genuine Perl 6 client for Telegram Bot API
Stars: ✭ 24 (-4%)
Mutual labels:  telegram-bot
olx-parser
Looks for new flats in Odessa and notify in the telegram through the bot
Stars: ✭ 39 (+56%)
Mutual labels:  telegram-bot

KazukoRobot

Kazuko Robot

Codacy Badge Maintenance GPLv3 license Open Source Love svg2 PRs Welcome Updates channel!

A Telegram Python bot running on python3 forked with saitama and DiasyX with a sqlalchemy database and an entirely themed persona to make Kazuko fun and good management for you in your groups.

Can be found on telegram as KazukoBot.

The Support group can be reached out to at Kazuko Support, where you can ask for help , discover new features, report bugs, and stay in the loop whenever a new update is available.

News channel as at Kazuko Updates

Deploying

Deploy via Heroku.

Deploy

How to setup/deploy.

Read these notes carefully before proceeding

  • This bot is forked from yone and saitama (which is based on marie)
  • Your code must be open source and a link to our repo
  • Fork and deploy on your own risk...
Steps to deploy on Heroku !!
Fill in all the details, Deploy!
Now go to https://dashboard.heroku.com/apps/(app-name)/resources ( Replace (app-name) with your app name )
REMEMBER: Turn on worker dyno (Don't worry It's free :D) & Webhook
Now send the bot /start, If it doesn't respond go to https://dashboard.heroku.com/apps/(app-name)/settings and remove webhook and port.
Steps to self Host!!

Setting up the bot (Read this before trying to use!):

Please make sure to use python3.6, as I cannot guarantee everything will work as expected on older Python versions! This is because markdown parsing is done by iterating through a dict, which is ordered by default in 3.6.

Configuration

There are two possible ways of configuring your bot: a config.py file, or ENV variables.

The preferred version is to use a config.py file, as it makes it easier to see all your settings grouped together. This file should be placed in your KazukoBot folder, alongside the __main__.py file. This is where your bot token will be loaded from, as well as your database URI (if you're using a database), and most of your other settings.

It is recommended to import sample_config and extend the Config class, as this will ensure your config contains all defaults set in the sample_config, hence making it easier to upgrade.

An example config.py file could be:

from KazukoBot.sample_config import Config

class Development(Config):
    OWNER_ID = 1821151467  # your telegram ID
    OWNER_USERNAME = "heyaaman"  # your telegram username
    API_KEY = "your bot api key"  # your api key, as provided by the @botfather
    SQLALCHEMY_DATABASE_URI = 'postgresql://username:password@localhost:5432/database'  # sample db credentials
    JOIN_LOGGER = '-1234567890' # some group chat that your bot is a member of
    USE_JOIN_LOGGER = True
    DRAGONS = [18673980, 83489514]  # List of id's for users which have sudo access to the bot.
    LOAD = []
    NO_LOAD = ['translation']

If you can't have a config.py file (EG on Heroku), it is also possible to use environment variables. So just go and read the config sample file.

Python dependencies

Install the necessary Python dependencies by moving to the project directory and running:

pip3 install -r requirements.txt.

This will install all the necessary python packages.

Database

If you wish to use a database-dependent module (eg: locks, notes, userinfo, users, filters, welcomes), you'll need to have a database installed on your system. I use Postgres, so I recommend using it for optimal compatibility.

In the case of Postgres, this is how you would set up a database on a Debian/ubuntu system. Other distributions may vary.

  • install postgresql:

sudo apt-get update && sudo apt-get install postgresql

  • change to the Postgres user:

sudo su - postgres

  • create a new database user (change YOUR_USER appropriately):

createuser -P -s -e YOUR_USER

This will be followed by you need to input your password.

  • create a new database table:

createdb -O YOUR_USER YOUR_DB_NAME

Change YOUR_USER and YOUR_DB_NAME appropriately.

  • finally:

psql YOUR_DB_NAME -h YOUR_HOST YOUR_USER

This will allow you to connect to your database via your terminal. By default, YOUR_HOST should be 0.0.0.0:5432.

You should now be able to build your database URI. This will be:

sqldbtype://username:pw@hostname:port/db_name

Replace sqldbtype with whichever DB you're using (eg Postgres, MySQL, SQLite, etc) repeat for your username, password, hostname (localhost?), port (5432?), and DB name.

Modules

Setting load order.

The module load order can be changed via the LOAD and NO_LOAD configuration settings. These should both represent lists.

If LOAD is an empty list, all modules in modules/ will be selected for loading by default.

If NO_LOAD is not present or is an empty list, all modules selected for loading will be loaded.

If a module is in both LOAD and NO_LOAD, the module will not be loaded - NO_LOAD takes priority.

Creating your own modules.

Creating a module has been simplified as much as possible - but do not hesitate to suggest further simplification.

All that is needed is that your .py file is in the modules folder.

To add commands, make sure to import the dispatcher via

from KazukoBot import dispatcher.

You can then add commands using the usual

dispatcher.add_handler().

Assigning the __help__ variable to a string describing this modules' available commands will allow the bot to load it and add the documentation for your module to the /help command. Setting the __mod_name__ variable will also allow you to use a nicer, user-friendly name for a module.

The __migrate__() function is used for migrating chats - when a chat is upgraded to a supergroup, the ID changes, so it is necessary to migrate it in the DB.

The __stats__() function is for retrieving module statistics, eg number of users, number of chats. This is accessed through the /stats command, which is only available to the bot owner.

Starting the bot.

Once you've set up your database and your configuration is complete, simply run the bat file(if on windows) or run (Linux):

python3 -m KazukoBot

You can use nssm to install the bot as service on windows and set it to restart on /gitpull Make sure to edit the start and restart bats to your needs. Note: the restart bat requires that User account control be disabled.

For queries or any issues regarding the bot please open an issue ticket or visit us at Kazuko Support

Credits 📍

CREDITS

❤️ Saitama = Sawada
❤️ DaisyX = Inuka
❤️ Yone = Noob kittu 
❤️ Alpha Coders = https://alphacoders.com
❤️ Developed by = heyaaman

Note : While kanging or forking this repo don't change credits.

This repository is a mix set of other bot repositorys which mentioned on credits above developed By heyaaman

Find me on telegram

Telegram

If anything missing on this repository, give a pull request :)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].