move sp_kick_invite to disabled

previously it was unreleased
This commit is contained in:
udf 2018-11-01 23:16:48 +02:00
parent 9981c27415
commit f9b3c48a11
Signed by untrusted user: kate
GPG Key ID: E40724BAD73AF77B
1 changed files with 26 additions and 0 deletions

View File

@ -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
)
)
)