forked from Pavel_Durov/python_bot
случайные числа add
This commit is contained in:
parent
e458da2f55
commit
1683e23232
9
bot.py
9
bot.py
@ -1,6 +1,7 @@
|
|||||||
from cgitb import text
|
from cgitb import text
|
||||||
import datetime
|
import datetime
|
||||||
import logging
|
import logging
|
||||||
|
from random import randint
|
||||||
|
|
||||||
from aiogram import Bot, Dispatcher, executor, types
|
from aiogram import Bot, Dispatcher, executor, types
|
||||||
from aiogram.types import ReplyKeyboardRemove, ReplyKeyboardMarkup, KeyboardButton
|
from aiogram.types import ReplyKeyboardRemove, ReplyKeyboardMarkup, KeyboardButton
|
||||||
@ -33,6 +34,14 @@ async def send_time(message: types.Message):
|
|||||||
num=(str(raznitsa) + ' ' + days[p])
|
num=(str(raznitsa) + ' ' + days[p])
|
||||||
|
|
||||||
await message.reply(f'Сегодня {cd} \nВремя: {ct2} \nДо Нового Года осталось {num}')
|
await message.reply(f'Сегодня {cd} \nВремя: {ct2} \nДо Нового Года осталось {num}')
|
||||||
|
|
||||||
|
#####______________________ПИПИСА БОТ БУДЕТ ЗДЕСЬ__________________________________
|
||||||
|
@dp.message_handler(commands=["DickUp"])
|
||||||
|
async def dickup(message: types.Message):
|
||||||
|
numb = (f"Рандомное число - {randint(-7,10)}")
|
||||||
|
await dickup.send(numb)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user