Ich benutze Pytelegrambotapi. Und mein Code lautet wie folgt: < /p>
Code: Select all
from telebot import TeleBot, types
bot = TeleBot(token=TOKEN)
@bot.message_handler(commands=['start'])
def start_bot(message):
text = "My friend contact"
markup = types.InlineKeyboardMarkup()
markup.add(types.InlineKeyboardButton(text='Contact', url="tg://user?id="))
bot.send_message(message.chat.id, text=text, reply_markup=markup)
bot.polling()
< /code>
Ich habe im Internet gelesen, wie man URL verwendet. Aber ich mache Fehler. Weil: url = "tg: // user? Id = "