Skip to content

ask is blocking another command #47

@Alnyz

Description

@Alnyz

i have 2 commands inside my plugins

register.py

async def callback_tutor1(bot: Bot, message: Message):
	profile = bot.mongodb.find_user(message.from_user.id)
	msg = f'{q1.description} \n' f'\n{q1.sort_desc}'
	chat = message.chat
	answer = await chat.ask('please type /profile')
	if answer.text == '/profile':
	    await bot.send_message(chat.id, msg)
	
@Bot.on_message(filters.text & filters.command(['start', 'register']) & filters.private)
async def register(bot: Bot, message: Message):
    # my logic here
     callback(bot, message)

profile.py

@Bot.on_message(filters.text & filters.command('profile') & filters.private)
async def profile(bot: Bot, message: Message):
	p = bot.mongodb.find_user(message.from_user.id)
	msg = f'**{p.username.title()}**''
	await bot.send_message(message.chat.id, msg)

first user will type /start and then bot will ask user to type /profile which is /profile is command from plugins, but command /profile didnt get execute after bot asking to the user, but command /profile work just fine.

i dont know why this happend, and cannot figure out to fix this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions