Easy conversation handler for pyrogram mtproto library {for bots only}
Project description
Pyrogram-Conversation {only for bots}
Conversation in pyrogram
from pyrocon import quiz
#await quiz.ask(c,msg,ask,timeout,stop_cmd,placeholder)
c : "Client" required parameter ( Pyrogram Client )
msg : "Message" request parameter (Msg where to start conv..)
ask : "str" required parameter (Question to ask)
timeout : "int" optional parameter (default to 30 sec)
stop_cmd : "str" optional parameter (default to /cancel)
placeholder : "str" optional parameter (custom placeholder for Forcereply)
#using example:
from pyrocon import quiz
answer = await quiz.ask(c,msg,ask)
if answer.text:
print(answer.text)
answer.reply("I got answer..")
#Handle any kind of errors
from pyrocon import quiz
answer = await quiz.ask(c,msg,ask)
if answer.error:
print(answer.error)
#Handle timeout Errors
from pyrocon import quiz
answer = await quiz.ask(c,msg,ask)
if answer.timeout:
print(answer.timeout)
#Handle cancellation Errors
from pyrocon import quiz
answer = await quiz.ask(c,msg,ask)
if answer.cancel:
print(answer.cancel)
Facts:
#if successful answer is Message object otherwise an error
#answer must be in reply to orginal message and should be a text message otherwise message will be ignored
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyrocon-1.0.6.tar.gz.
File metadata
- Download URL: pyrocon-1.0.6.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d13ae31a275fd1bc652818f41b10eff07036ae3dc49063889492a358299a1e93
|
|
| MD5 |
68f2ff6623c8eb966e5fea4ccc02d485
|
|
| BLAKE2b-256 |
ab62c6b104ff64d50b6e7670b1c1a31c343fb1f857a3a2a0d8cb40300fc495d8
|
File details
Details for the file pyrocon-1.0.6-py3-none-any.whl.
File metadata
- Download URL: pyrocon-1.0.6-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f351280a4188eb8f455d11c1c0fd92c6e5723821f5c20f5821dde1fe45aa7c1
|
|
| MD5 |
8043f5f86fd7440edfb5cc3a84fe38bb
|
|
| BLAKE2b-256 |
aa18523fb0876ab3b4bd07a2c6282e797d0029d54af70c4707c9a1108b3d62cf
|