def inline(self, callback):
        """
        Set callback for inline queries

        :Example:

        >>> @bot.inline
        >>> def echo(iq):
        >>>     return iq.answer([
        >>>         {"type": "text", "title": "test", "id": "0"}
        >>>     ])

        >>> @bot.inline(r"myinline-(.+)")
        >>> def echo(chat, iq, match):
        >>>     return iq.answer([
        >>>         {"type": "text", "title": "test", "id": "0"}
        >>>     ])
        """
        if callable(callback):
            self._default_inline = callback
            return callback
        elif isinstance(callback, str):

            def decorator(fn):
                self.add_inline(callback, fn)
                return fn

            return decorator
        else:
            raise TypeError("str expected {} given".format(type(callback)))
def inline ( self , callback ) : if callable ( callback ) : self . _default_inline = callback return callback elif isinstance ( callback , str ) : def decorator ( fn ) : self . add_inline ( callback , fn ) return fn return decorator else : raise TypeError ( "str expected {} given" . format ( type ( callback ) ) )
Set callback for inline queries

        :Example:

        >>> @bot.inline
        >>> def echo(iq):
        >>>     return iq.answer([
        >>>         {"type": "text", "title": "test", "id": "0"}
        >>>     ])

        >>> @bot.inline(r"myinline-(.+)")
        >>> def echo(chat, iq, match):
        >>>     return iq.answer([
        >>>         {"type": "text", "title": "test", "id": "0"}
        >>>     ])