Spaces:
Running
Running
Create join_request.py
Browse files
chatbot/plugins/join_request.py
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python
|
2 |
+
# -*- coding: utf-8 -*-
|
3 |
+
# Copyright 2020-2024 (c) Randy W @xtdevs, @xtsea
|
4 |
+
#
|
5 |
+
# from : https://github.com/TeamKillerX
|
6 |
+
# Channel : @RendyProjects
|
7 |
+
# This program is free software: you can redistribute it and/or modify
|
8 |
+
# it under the terms of the GNU Affero General Public License as published by
|
9 |
+
# the Free Software Foundation, either version 3 of the License, or
|
10 |
+
# (at your option) any later version.
|
11 |
+
#
|
12 |
+
# This program is distributed in the hope that it will be useful,
|
13 |
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 |
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15 |
+
# GNU Affero General Public License for more details.
|
16 |
+
#
|
17 |
+
# You should have received a copy of the GNU Affero General Public License
|
18 |
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
19 |
+
|
20 |
+
import time
|
21 |
+
import json
|
22 |
+
import asyncio
|
23 |
+
import io
|
24 |
+
import os
|
25 |
+
import re
|
26 |
+
|
27 |
+
from pyrogram import *
|
28 |
+
from pyrogram.enums import ChatMemberStatus
|
29 |
+
from pyrogram import enums
|
30 |
+
from pyrogram import Client, filters
|
31 |
+
from pyrogram.types import *
|
32 |
+
from pyrogram.errors import *
|
33 |
+
from database import db
|
34 |
+
from logger import LOGS
|
35 |
+
|
36 |
+
@Client.on_chat_join_request(filters.chat("KillerXSupport"))
|
37 |
+
async def join_request(client: Client, event: ChatJoinRequest):
|
38 |
+
logger.info(f"join request {event}")
|