mirror of
https://github.com/Redume/Shirino.git
synced 2024-11-23 08:46:21 +03:00
вернул старт команд
This commit is contained in:
parent
5360377375
commit
c2d675aa09
1 changed files with 10 additions and 0 deletions
10
main.py
10
main.py
|
@ -11,6 +11,7 @@ import logging
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from aiogram import Dispatcher, types, Bot
|
from aiogram import Dispatcher, types, Bot
|
||||||
|
from aiogram.filters import CommandStart
|
||||||
|
|
||||||
# Constants
|
# Constants
|
||||||
DDG_URL = 'https://duckduckgo.com/js/spice/currency'
|
DDG_URL = 'https://duckduckgo.com/js/spice/currency'
|
||||||
|
@ -189,6 +190,15 @@ async def currency(inline_query: types.InlineQuery):
|
||||||
await inline_reply(result_id, result, None, inline_query)
|
await inline_reply(result_id, result, None, inline_query)
|
||||||
|
|
||||||
|
|
||||||
|
@dp.message(CommandStart())
|
||||||
|
async def start(message: types.Message):
|
||||||
|
await message.answer("Привет! Бот может показывать курс обмена криптовалюты и фиатной валюты. "
|
||||||
|
"Бот используется с помощью инлайн-команд: "
|
||||||
|
"`@shirino_bot 12 usd rub` или `@shirino_bot usd rub`"
|
||||||
|
"\n\nИсходный код опубликован на [Github](https://github.com/redume/shirino)",
|
||||||
|
parse_mode="markdown")
|
||||||
|
|
||||||
|
|
||||||
async def main() -> None:
|
async def main() -> None:
|
||||||
log.debug(config)
|
log.debug(config)
|
||||||
bot = Bot(config['telegram_token'])
|
bot = Bot(config['telegram_token'])
|
||||||
|
|
Loading…
Add table
Reference in a new issue