forked from z44d/tgram
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use smart-plugins in webhook example
- Loading branch information
Showing
4 changed files
with
23 additions
and
44 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from tgram import TgBot | ||
from tgram.types import CallbackQuery | ||
|
||
|
||
@TgBot.on_callback_query() | ||
async def on_c(bot: TgBot, query: CallbackQuery) -> bool: | ||
return await query.answer("Hi.", show_alert=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from tgram import TgBot, filters | ||
|
||
from tgram.types import Message, InlineKeyboardMarkup, InlineKeyboardButton | ||
|
||
|
||
@TgBot.on_message(filters.command("start")) | ||
async def on_start(bot: TgBot, message: Message) -> Message: | ||
return await message.reply_text( | ||
"Hi from Tgram", | ||
reply_markup=InlineKeyboardMarkup( | ||
[[InlineKeyboardButton("Buttonn", callback_data="yay")]] | ||
), | ||
) |