Skip to content

0.1.dev3

Choose a tag to compare

@x72x x72x released this 22 Nov 18:06
· 6 commits to master since this release

Full Changelog: 0.1.dev2...0.1.dev3

Changelog: 馃
+ add snake case syntax (
send_message, send_photo, send_sticker, etc . for methods
on_message, on_callback_query, on_inline_query, etc . for handlers
)

+ add new handlers : onChatJoinRequest , onMyChatMember , onChatMember , onPoll , onPollAnswer , onShippingQuery , onPreCheckoutQuery

+ add Listener method

  • Example to use:

from zdgram import types, enums, Bot

bot = Bot(bot_token="")

def filter_text_and_private(m: types.Message):
    return bool(m.text and m.chat.type == enums.ChatType.PRIVATE)

@bot.onMessage(func=filter_text_and_private)
async def on_message(bot: Bot, message: types.Message):
    await bot.sendMessage(
        message.chat.id,
        "Send your name",
        reply_to_message_id=message.id
    )
    msg = await bot.listen(filter_text_and_private)
    return await bot.sendMessage(
        message.chat.id,
        "Your name is : " + msg.text
    )

+ Change package name :

  • The package renamed from "shitgram" to "zdgram"

+ add inline queries method and types :

  • Added ( InlineQueryResultArticle, InlineQueryResultsButton, InputTextMessageContent, InputLocationMessageContent, InputVenueMessageContent, InputContactMessageContent, InputInvoiceMessageContent, LabeledPrice, InlineQueryResultAudio, InlineQueryResultGif, InlineQueryResultMpeg4Gif, InlineQueryResultPhoto, InlineQueryResultVideo and InlineQueryResultVoice ) types.
  • Added (answerInlineQuery, answer_inline_query ) . How to use?

+ more : add sendVenue method, add allowed_updates, disable_notifaction, protect_content, parse_mode and disable_web_page_preview to Bot object, add doc string to methods., use GET method instead of POST to send requests while no files to upload.