-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
82 additions
and
7 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
GO_BUTTON = "GO" | ||
NEXT_TIME_BUTTON = "В следующий раз" | ||
START_BUTTON = "Start" |
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,9 @@ | ||
import enum | ||
|
||
|
||
class States(str, enum.Enum): | ||
"""111.""" | ||
|
||
START = "start" | ||
GO = "go" | ||
NEXT_TIME = "next_time" |
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,21 @@ | ||
from telegram import Update | ||
from telegram.ext import CallbackContext | ||
|
||
from bot.constants.messages import NEXT_TIME_MESSAGE | ||
from bot.constants.states import States | ||
|
||
|
||
async def go(update: Update, context: CallbackContext): | ||
"""123.""" | ||
query = update.callback_query | ||
await query.answer() | ||
await query.edit_message_text("Тут будет логика для GO") | ||
|
||
|
||
async def next_time(update: Update, context: CallbackContext): | ||
"""1234.""" | ||
query = update.callback_query | ||
await query.answer() | ||
await query.edit_message_reply_markup(reply_markup=None) | ||
await query.message.reply_text(NEXT_TIME_MESSAGE) | ||
return States.NEXT_TIME |
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 telegram import InlineKeyboardButton, InlineKeyboardMarkup | ||
|
||
from bot.constants.buttons import START_BUTTON | ||
|
||
next_time_keyboard = InlineKeyboardMarkup( | ||
[[InlineKeyboardButton(text=START_BUTTON, callback_data="start")]] | ||
) |