S
S
SiezurE2021-10-11 15:56:25
Python
SiezurE, 2021-10-11 15:56:25

Telebot, creating referral link in Python?

import telebot       
client = telebot.TeleBot(config.token) 
def subject(call):
        invite_link = client.create_chat_invite_link(chat.id, member_limit=1)

        bot.send_message(message.chat.id, invite_link)

When creating a link, a long message is displayed with all the details on how to make sure that these details are not there and only one link is displayed.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2021-10-11
@SiezurE

See what the link is made of
https://core.telegram.org/bots/api#chatinvitelink
And refer to the required field.

bot.send_message(message.chat.id, invite_link.invite_link)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question