Skip to main content

pygroupbot is python library that can you help to create your own simple telegram group manage bot

Project description

Python Version

pygroupbot is python library that can you help to create your own simple telegram group manage bot.

Table of Contents

Installation

To integrate pygroupbot into your project, you can use pip:

pip install pygroupbot

pygroupbot using pytelegrambotapi library for connect with telegram api. If it's not installed after installing pygroupbot, then install it :

pip install pytelegrambotapi

For use pygroupbot you have to install python 3 on your device.(Python 2 is not supported!)

How To Use

Importing The Module

To import pygroupbot to your projects just use import :

import pygroupbot

Examples

Genaral example:

import pygroupbot # Importing PyGroupBot

pygroupbot.bot.token("<BOT_TOKEN>", mode= "html") # Initializing Bot Token and parse_mode. Also you can use 'Markdown' to parse_mode

start_message = "Hi I'm group manage bot" # Message you want to show when user said /start
menu_message = "Here is a my all commands" # Message you want to show when user said /menu
help_message = "Get my help" # Message you want to show when user said /help
info_message = "This is the Group Manage bot" # Message you want to show when user said /info
kick_message = "User kicked from group" # Message you want to show after user kick
ban_message = "User banned from group" # Message you want to show after user ban
unban_message = "User unbanned from group" # Message you want to show after  user unban

# Input variables to bot
pygroupbot.start_message(start_message)
pygroupbot.menu_message(menu_message)
pygroupbot.help_message(help_message)
pygroupbot.info_message(info_message)
pygroupbot.kick_message(kick_message)
pygroupbot.ban_message(ban_message)
pygroupbot.unban_message(unban_message)

# Run bot without stoping
pygroupbot.run(True)

How to Bold / Italic and Create Links:

With the Pygroupbot v1.2.2 we initialized parse_mode to bot. Telegram bots has two parse_mode. First one is Markdown. In this parse mode you can bold text using '**' symbol and italic text using '__' like in the bellow example:

pygroupbot.bot.token("<TOKEN>", mode= "Markdown")

paygroupbot.start_message("*Hello Dear!* _I am the PyGroupBot_")

We suggest to you use html as parse_mode. You can bold text with '', italic text with '' and create links with 'a' tag using in html like in the bellow example:

pygroupbot.bot.token("<TOKEN>", mode= "html")

paygroupbot.start_message("<b>Hello Dear!</b>   <i>I am the PyGroupBot</i>   <a href='https://github.com/ranujasanmir/pygroupbot'>Go to github</a>")

Errors

You will face some errors while using pygroupbot.

  1. Something Wrong. ERROR_523 - Something messing in the bot. Check bot admin rights..

  2. Bad request from telegram api. [Cannot run bot. check your internet connection]. ERROR_400 - This error saying bot has problem with connecting to the telegram api. Check your device internet connection. Or create new bot token from Bot Father and give it to the bot.

pygroupbot.bot.token("<NEW_BOT_TOKEN>")
  1. Python version error. PyGroupBot bot need python3 - If you see this error you have to update your python version. pygroupbot can't run on python 2. It's very old version. All potato pc's can run python 3.2. So why are you using python2?

  2. .run() only need boolean value! - It's mean you entered wrong value to run() function. run() only need True or False values.

pygroupbot.run(True)
  1. pygroupbot token must not be a null - This saying you didn't entered token.

  2. pygroupbot mode must not be a null - To fix this error pass the parse_mode.

  3. PyGroupBot Server Not Started Yet - Bot is Offline... - If bot didn't running this error will be show. Make sure to make pygroupbot.run(True). If you entered False, bot will not run.

This errors only showing with pygroupbot. The errors from pytelegrambotapi not here!

Terms And Condition

  1. Use Responsibly: This python library is developed for only education purpose.

  2. Privacy: We do not store any details about you.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About Us

We are PixCap TM. We are from Sri Lanka. We interest on programming and software development. pygroupbot is our first python library. We have created some computer softwares. And we are developing telegram bots. You can find Medusa bot on telegram(Username : @medusa_rs45_bot). This bot has awesome tools for interact with donghua and anime world. Check it out!

Copyright © 2020-2023 PixCap TM. All rights Reserved.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PygroupBot-1.2.5.tar.gz (5.8 kB view details)

Uploaded Source

File details

Details for the file PygroupBot-1.2.5.tar.gz.

File metadata

  • Download URL: PygroupBot-1.2.5.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for PygroupBot-1.2.5.tar.gz
Algorithm Hash digest
SHA256 67c23a0100a8e234a32ca2f65e6f7dc56226f027adbe4ca836e05fba1f69b50a
MD5 25e115824436ab07da5cb1efbb56d171
BLAKE2b-256 1337c8e80b666ea435dd73677c16ec9d09b3f3c753e20a876b3393006fadebaf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page