mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Reformat code
This commit is contained in:
parent
d41d38d49f
commit
088116e1c7
12 changed files with 18 additions and 19 deletions
|
|
@ -49,9 +49,9 @@ def get_keyboard() -> types.InlineKeyboardMarkup:
|
|||
|
||||
def format_post(post_id: str, post: dict) -> (str, types.InlineKeyboardMarkup):
|
||||
text = f"{md.hbold(post['title'])}\n" \
|
||||
f"{md.quote_html(post['body'])}\n" \
|
||||
f"\n" \
|
||||
f"Votes: {post['votes']}"
|
||||
f"{md.quote_html(post['body'])}\n" \
|
||||
f"\n" \
|
||||
f"Votes: {post['votes']}"
|
||||
|
||||
markup = types.InlineKeyboardMarkup()
|
||||
markup.row(
|
||||
|
|
|
|||
|
|
@ -2,10 +2,9 @@ import asyncio
|
|||
|
||||
from aiogram import Bot
|
||||
from aiogram import types
|
||||
from aiogram.utils import executor
|
||||
from aiogram.dispatcher import Dispatcher
|
||||
from aiogram.types.message import ContentTypes
|
||||
|
||||
from aiogram.utils import executor
|
||||
|
||||
BOT_TOKEN = 'BOT TOKEN HERE'
|
||||
PAYMENTS_PROVIDER_TOKEN = '123456789:TEST:1234567890abcdef1234567890abcdef'
|
||||
|
|
|
|||
|
|
@ -76,7 +76,8 @@ async def unknown(message: types.Message):
|
|||
"""
|
||||
Handler for unknown messages.
|
||||
"""
|
||||
return SendMessage(message.chat.id, f"I don\'t know what to do with content type `{message.content_type()}`. Sorry :c")
|
||||
return SendMessage(message.chat.id,
|
||||
f"I don\'t know what to do with content type `{message.content_type()}`. Sorry :c")
|
||||
|
||||
|
||||
async def cmd_id(message: types.Message):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue