Script Python Bot Telegram

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

import telebot

import os
import sys
from colored import fg, bg, attr
color = bg('indian_red_1a') + fg('white')

api = 'INPUT YOUR API TELEGRAM HERE'


bot = telebot.TeleBot(api)

text_messages = {

'welcome':
'Selamat Datang!' ' '
'<b>{name} {name1}.</b>' ' ' 'Welcome to join this group!',
}

@bot.message_handler(commands=['start'])
def send_welcome(message):
check_reply = message.reply_to_message
reply = str(check_reply)
name = message.from_user.first_name
name1 = message.from_user.last_name
texxt = message.text.lower()
no_id = str(message.chat.id)
group_id = message.chat.id
if no_id == 'YOUR ID GROUP BOT' :
bot.send_message(message.chat.id,
text_messages['welcome'].format(name=name, name1=name1), parse_mode="HTML")

You might also like