Metadata-Version: 2.1
Name: pyrocon
Version: 1.0.5
Summary: Easy conversation handler for pyrogram mtproto library {for bots only}
Home-page: https://github.com/Surendra9123/Pyrogram-Conversation
Author: SPiDER
Author-email: mindajitendra63@gmail.com
License: BSD
Keywords: example documentation tutorial
Classifier: Development Status :: 3 - Alpha
Classifier: Topic :: Utilities
Classifier: License :: OSI Approved :: BSD License
Description-Content-Type: text/markdown

# 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 


