GithubHelp home page GithubHelp logo

py-gapbot / gapbot Goto Github PK

View Code? Open in Web Editor NEW
24.0 3.0 1.0 56 KB

Gap Messenger Api Bot Library for Python

License: GNU Lesser General Public License v3.0

Python 100.00%
gapbot gap bot botapi massenger python bot-library elegant gap-bot

gapbot's Introduction

GapBot
Gap Messenger Api Bot Library for Python
Documentation(coming soon) Releases

GapBot

from gapbot import Gap

app = Gap()


@app.on_update
def _update_handler(bot, update):
    print(f'{update}')


if __name__ == '__main__':
    app.run()

GapBot is an elegant, easy-to-use Gap Bot library written from the ground up in Python. It enables you to easily create custom apps.

GapBot in fully-asynchronous mode is coming soon »

GapBot in plugin base mode is coming soon »

Features

  • Easy: You can install GapBot with pip and start building your applications right away.
  • Elegant: Low-level details are abstracted and re-presented in a much nicer and easier way.

Requirements

Installing

pip3 install GapBot

Resources

Contributing

GapBot is brand new, and you are welcome to try it and help make it even better by either submitting pull requests or reporting issues/bugs as well as suggesting best practices, ideas, enhancements on both code and documentation. Any help is appreciated!

Copyright & License

  • Copyright (C) 2017-2019 MohammadMahdi Zojaji as <https://github.com/mahdizojaji>
  • Licensed under the terms of the GNU Lesser General Public License v3 or later (LGPLv3+)

gapbot's People

Contributors

mahdizojaji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

shahrooz1397

gapbot's Issues

RuntimeError: string indices must be integers

This happens to get update["from"]["id"]

  • simple code to make problem:
from gapbot import Gap
app = Gap()  
@app.on_update
def _update_handler(bot: Gap, update):  # bot: Methods;
    print(f'{update["from"]["id"]}')

if __name__ == '__main__': 
    app.run() 
  • error:
print(f'{update["from"]["id"]}')
TypeError: string indices must be integers

سرور یا هاست برای ربات

سلام دوستان.شما از چه سرور یا هاستی برای اجرای رباتتون استفاده میکنید؟
تریجیحا ارزان باشه .اگر در خارج از کشور باشه بهتر هم هست
میدونید که ربات ها رم و فضای زیادی لازم ندارن و اغلب سرویس دهنده ها سرورهای قوی ارزه میکنند که برای کارما لازم نیست والکی باید پول زیاد بدیم

این سرور های رایگان مثل این دو تا سایت زیر رو تست کردم.غیر از اینا اگر میدونید ممنون میشم بگید
https://www.heroku.com/
pythonanywhere.com

مشکل در درک مستندات

در قسمتی از مستندات بات های گپ نوشته شده : "توکن بات را در header با متد post ارسال کنید!" ، باید دقیقا چگونه عمل کرد برای فرستادن پیام به کاربر با فرض اینکه باتمون هم تعاملی باشه؟!

send file with special Name

hello
thanks a lot for this bot.it help me a lot.
how can i send file to gap with their name from my pc or set name for my file to show in gap?

سلام.تشکر فراوان از شما و دوستانتون برای ساخت این ربات.
وقتی فایلم رو که اسمش مثلا
a.pdf
هست رو با این کتابخونه ارسال میکنم.نامی که در داخل گپ بهم نشون میده بصورت
file.pdf
میباشد.اگر اسم خود فایلم یا اسمی که من بتونم انتخاب کنم باشه بهتره
تشکر

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.