0

我的机器人中有一个链接,我需要每个新用户机器人自动显示它们,用户不需要输入命令 /start

import telebot
from telebot import types

@bot.message_handler(commands=['start'])
def start(message):
    keyboard = types.InlineKeyboardMarkup()
    url_button_discord = types.InlineKeyboardButton(text="Discord", url="https://discord.gg/Kmzc5cAdUb")
    url_button_tiktok = types.InlineKeyboardButton(text="TikTok", url="https://www.tiktok.com/@cryptohorses.io?lang=uk-UA")
    url_button_twitter = types.InlineKeyboardButton(text="Twitter", url="https://twitter.com/chorsesgame")
    keyboard.add(url_button_discord, url_button_tiktok, url_button_twitter)

    bot.send_message(message.chat.id, "Welcome, {0.first_name}!".format((message.from_user)),reply_markup=keyboard)

if __name__ == "__main__":
    bot.polling(none_stop=True)

它的样子

4

0 回答 0