forked from kate/uniborg
move sp_kick_invite to disabled
previously it was unreleased
This commit is contained in:
parent
9981c27415
commit
f9b3c48a11
|
@ -0,0 +1,26 @@
|
|||
# kicks people who join a group by invite
|
||||
|
||||
import asyncio
|
||||
from telethon import events
|
||||
|
||||
from telethon.tl.functions.channels import EditBannedRequest
|
||||
from telethon.tl.types import ChannelBannedRights
|
||||
|
||||
import time
|
||||
|
||||
channel_id = 1252035294
|
||||
|
||||
|
||||
@borg.on(events.ChatAction(chats=channel_id))
|
||||
async def on_join(event):
|
||||
if event.user_joined:
|
||||
await borg(
|
||||
EditBannedRequest(
|
||||
channel=channel_id,
|
||||
user_id=await event.get_user(),
|
||||
banned_rights=ChannelBannedRights(
|
||||
time.time() + 60,
|
||||
True, True, True, True, True, True, True, True
|
||||
)
|
||||
)
|
||||
)
|
Loading…
Reference in New Issue