R
R
rejiw562102020-12-23 10:20:53
Telegram
rejiw56210, 2020-12-23 10:20:53

How to create a team through!?

I always see commands in bots not through "/" but through "!"
How can this be implemented and is there such a function in Telebot at all?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-12-23
@rejiw56210

We go into the folder of our project in the pyTelegramBotAPI package
and find - https://github.com/eternnoir/pyTelegramBotAPI/blob... - such a file
where there is a method

def is_command(text):
    """
    Checks if `text` is a command. Telegram chat commands start with the '/' character.
    :param text: Text to check.
    :return: True if `text` is a command, else False.
    """
    if (text is None): return None
    return text.startswith('/')

change to ! - profit

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question