KAWSAR_BD
الذهاب إلى القناة على Telegram
This Channel Doesn't Promote Any Illegal Activities It's Just For Fun and Educational Purpose. TELEGRAM RULES👇 https://telegra.ph/Disclaimer-11-25-17 https://telegra.ph/Dont-support-any-illegal-activities-06-28
إظهار المزيدلم يتم تحديد البلدالفئة غير محددة
1 395
المشتركون
-1224 ساعات
-227 أيام
+31430 أيام
أرشيف المشاركات
1 395
import logging
from telegram import Update
from telegram.ext import (
Application,
MessageHandler,
ContextTypes,
filters,
)
BOT_TOKEN = "Bot token"
CHANNEL_ID = -1003627983357
logging.basicConfig(
format="%(asctime)s - %(levelname)s - %(message)s",
level=logging.INFO,
)
logger = logging.getLogger(__name__)
async def handle_channel_post(
update: Update,
context: ContextTypes.DEFAULT_TYPE
):
message = update.channel_post
if not message:
return
if message.chat.id != CHANNEL_ID:
return
if message.sender_chat is None:
return
if message.sender_chat.id != CHANNEL_ID:
return
if message.author_signature:
logger.info(
"KEEP signed post | message=%s | signature=%s",
message.message_id,
message.author_signature,
)
return
try:
await message.delete()
logger.info(
"DELETED anonymous channel post | message=%s",
message.message_id,
)
except Exception as e:
logger.error(
"Failed to delete message %s: %s",
message.message_id,
e,
)
def main():
app = (
Application.builder()
.token(BOT_TOKEN)
.build()
)
app.add_handler(
MessageHandler(
filters.UpdateType.CHANNEL_POST,
handle_channel_post
)
)
logger.info("Anonymous channel-post filter started.")
app.run_polling(
allowed_updates=["channel_post"]
)
if __name__ == "__main__":
main()1 395
Ma chuda jake mujhe kya tere gamd me itna tho dam nahi he ki channel profile chor ke real profile se msg kare
1 395
In the next time if anyone use channel's profile then he is the biggest gay of the world
1 395
Bofdike jake kahi aur jake gamd mara mera dost he vo usne leak kiya me forward karunga tuje koi problem he tho real id se ana , oh a nahi sakta na tere ko dar lagta hena
