🎚
Force Join Channel in Group [Telebot Creator Code]❓ Using this you can mute the users in your group until they join your Telegram channel once they join and they can click unmute button then the bot will unmute the user if he join the channel and if he / she left the channel then fhe bot will automatically mute the user back in group until they join your channel.
👻
Command: *
☢️
TPY: def check():
channels = "
@Privates_Bots"#edit with channel username or with id
for i in channels:
check = bot.getChatMember(str(i), u)
if check.status != 'left':
pass
else:
return False
return True
usernm = f"""
{message.from_user.first_name} {message.from_user.last_name}"""
if message.from_user.last_name is None:
usernm = f"""
{message.from_user.first_name}"""
markup = InlineKeyboardMarkup()
markup.add(InlineKeyboardButton(
text="🟢 Joined",
callback_data=f"/joined {u}"))
tim = int(time.time())
until = tim + 600
if not check():
bot.deleteMessage(chat_id=message.chat.id, message_id=message.message_id)
bot.restrictChatMember(chat_id=message.chat.id, user_id=u, can_send_messages=False, until_date=until)
txt = f"""
📛 Hello {usernm}, Please Join Our Channel To Send Message in This Group
➤ {channels}
❇️ After Joining, Click 🟢 Joined"""
bot.replyText(chat_id=message.chat.id, text=txt, reply_markup=markup)
👻 Command: /joined
☢️ TPY:if params != str(u):
bot.answerCallbackQuery(call.id, '⛔ This Message is Not For You', show_alert=True)
raise ReturnCommand()
def check():
channels = ["
@Privates_Bots"] # edit with channel username
for i in channels:
member = bot.getChatMember(str(i), u)
if member.status != 'left':
pass
else:
return False
return True
usernm = f"""
{call.from_user.first_name} {call.from_user.last_name}"""
if call.from_user.last_name is None:
usernm = f"""
{call.from_user.first_name}"""
if check():
bot.restrictChatMember(chat_id=message.chat.id, user_id=u,
can_send_messages=True,
can_send_media_messages=True, # This includes audios, videos, photos, etc.
can_send_other_messages=True) # This includes polls and documents
bot.editMessageText(chat_id=message.chat.id, message_id=message.message_id,
text=f"
🚀 {usernm}, Thanks For Joining Our Channel\n\n💬 Now You Can Send Message")
else:
bot.answerCallbackQuery(call.id, '❌ Must Join Our Channels', show_alert=True)
➖➖➖➖
➖➖➖➖➖➖➖➖➖➖➖➖➖
⚠️ Give credit if you are posting on your channel.
👨💻 Created By: Swastik
© Credit: @Privates_Bots.