Compare commits

..

No commits in common. "f49233b811d459108d8e74e01f0d8bd242eaa4e8" and "0278189dedac17546829dd8b680d742a0f378f55" have entirely different histories.

2 changed files with 15 additions and 21 deletions

View File

@ -1,8 +1,7 @@
from handlers import pipisa from handlers import pipisa
from handlers import start_help from handlers import davinci
from handlers import time_new_year from handlers import time_new_year
from handlers import sendalarm from handlers import sendalarm
from handlers import davinci from handlers import start_help

View File

@ -1,27 +1,22 @@
from aiogram import types, Dispatcher from aiogram import types, Dispatcher
from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
from create_bot import dp, bot from create_bot import dp, bot
@dp.message_handler(commands=['start']) @dp.message_handler(commands=['start'])
async def start_func(message: types.Message): async def start_func(message: types.Message):
if message.chat.type == 'private': await message.reply('похуй')
lkb = InlineKeyboardMarkup(row_width=1).add(InlineKeyboardButton(text = 'Добавить в группу', callback_data='add_2_group'))
await message.answer(f'<b>Добро пожаловать, {message.from_user.full_name}!</b>\n'
'Это бот, который растит члены. Чтобы начать, добавь бота в чат'\
, reply_markup=lkb
)
# TODO добавить кнопку, по которой смогут добавлять юзера в чат
@dp.callback_query_handler(text = 'add_2_group')
async def addgroup(callback: types.CallbackQuery):
await callback.answer('жмав')
@dp.message_handler(commands=['photo'])
async def send_image(message: types.Message):
await bot.send_photo(message.chat.id, photo='https://memepedia.ru/wp-content/uploads/2018/08/ya-pidoras.jpg', reply_to_message_id=message.message_id)
@dp.message_handler(content_types=types.ContentTypes.TEXT)
async def send_faggot(message: types.Message):
print(message.text)
if message.text == 'хто я':
await bot.send_photo(message.chat.id, photo='https://www.meme-arsenal.com/memes/ecebd2339c7eab40e09874bd86a38a09.jpg')
def register_handlers_StartHelp(dp: Dispatcher):
dp.register_message_handler(start_func)
dp.register_message_handler(send_faggot)
dp.register_message_handler(send_image)