mirror of
https://github.com/ada-dmitry/kurator_bot.git
synced 2026-09-25 16:50:15 +00:00
Init
This commit is contained in:
@@ -0,0 +1 @@
|
||||
pip
|
||||
@@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Kyle Walker
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
Metadata-Version: 2.1
|
||||
Name: telebot
|
||||
Version: 0.0.5
|
||||
Summary: A Telegram bot library, with simple route decorators.
|
||||
Home-page: https://github.com/KyleJamesWalker/telebot
|
||||
Author: Kyle James Walker
|
||||
Author-email: KyleJamesWalker@gmail.com
|
||||
License: MIT
|
||||
Platform: UNKNOWN
|
||||
Classifier: Development Status :: 2 - Pre-Alpha
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: License :: OSI Approved :: MIT License
|
||||
Classifier: Natural Language :: English
|
||||
Classifier: Programming Language :: Python :: 3.8
|
||||
Classifier: Programming Language :: Python :: 3.9
|
||||
Classifier: Programming Language :: Python :: 3.10
|
||||
Classifier: Programming Language :: Python :: 3.11
|
||||
License-File: LICENSE
|
||||
Requires-Dist: pyTelegramBotAPI
|
||||
Requires-Dist: requests
|
||||
|
||||
Telebot
|
||||
-------
|
||||
|
||||
Note: This is not `pyTelegramBotAPI <https://github.com/eternnoir/pyTelegramBotAPI>`_, but do to often confusion I have included
|
||||
it within this package. So if you accidentally install this instead of `pyTelegramBotAPI <https://github.com/eternnoir/pyTelegramBotAPI>`_
|
||||
the examples, etc will still work.
|
||||
|
||||
This originally was telegram bot library, with simple route decorators, and will now
|
||||
be imported as telebot_router, to separate `pyTelegramBotAPI <https://github.com/eternnoir/pyTelegramBotAPI>`_ and this package from
|
||||
collision.
|
||||
|
||||
Currently a work in progress, doesn't do much now, but will register and send messages.
|
||||
|
||||
Example Setup
|
||||
^^^^^^^^^^^^^
|
||||
::
|
||||
|
||||
from telebot_router import TeleBot
|
||||
|
||||
app = TeleBot(__name__)
|
||||
|
||||
|
||||
@app.route('/command ?(.*)')
|
||||
def example_command(message, cmd):
|
||||
chat_dest = message['chat']['id']
|
||||
msg = "Command Recieved: {}".format(cmd)
|
||||
|
||||
app.send_message(chat_dest, msg)
|
||||
|
||||
|
||||
@app.route('(?!/).+')
|
||||
def parrot(message):
|
||||
chat_dest = message['chat']['id']
|
||||
user_msg = message['text']
|
||||
|
||||
msg = "Parrot Says: {}".format(user_msg)
|
||||
app.send_message(chat_dest, msg)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.config['api_key'] = 'xxxxxxxx:enterYourBotKeyHereToTest'
|
||||
app.poll(debug=True)
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
telebot-0.0.5.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
telebot-0.0.5.dist-info/LICENSE,sha256=7IXwfzlWbbVCi-lVp0cl8yzm1P2PETwCcrN7cdT1Bas,1079
|
||||
telebot-0.0.5.dist-info/METADATA,sha256=xqqkiHPY5PQByi5JrhOGAkdeGxQPAOqSiawhUfC5KFI,1979
|
||||
telebot-0.0.5.dist-info/RECORD,,
|
||||
telebot-0.0.5.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
telebot-0.0.5.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
||||
telebot-0.0.5.dist-info/top_level.txt,sha256=_FGV5C3-n-iGZer1zT5k6scK_UN2zc_cOJwJ5uRb31k,15
|
||||
telebot_router/__init__.py,sha256=tY6xDx_1TNfaunKQRpffBVqu1GXREwRTaUXnRasgM6s,6684
|
||||
telebot_router/__pycache__/__init__.cpython-311.pyc,,
|
||||
@@ -0,0 +1,5 @@
|
||||
Wheel-Version: 1.0
|
||||
Generator: bdist_wheel (0.38.4)
|
||||
Root-Is-Purelib: true
|
||||
Tag: py3-none-any
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
telebot_router
|
||||
Reference in New Issue
Block a user