`@loader.tds
class testr(loader.Module):
'''name'''
strings = {
"name": "test",
}
async def client_ready(self, client, db):
self.test_channel, _ = await utils.asset_channel(
self._client,
"Test - chat",
"check descr",
silent=True,
archive=True,
_folder="m",
)
await self.client(functions.channels.InviteToChannelRequest(self.test_channel, ['@my_bot']))
await self.client(functions.channels.EditAdminRequest(
channel=self.test_channel,
user_id="@my_bot",
admin_rights=ChatAdminRights(ban_users=True, post_messages=True, edit_messages=True),
rank="xTest",
)
)
def __init__(self):`
I’m trying to create a group and topics in it using a user bot on a teletone. I can’t find anywhere in the documentation how to properly work with topics. I only figured out how to write messages in a certain topic. But I can’t figure out how to create it and find out the topic id.
Here is a pre-launch code that successfully creates a group and invites the necessary users to it
2
Answers
What is telethon…?
I’m trying to create a group and topics in it using a user bot on a teletone. I can’t find anywhere in the documentation how to properly work with topics. I only figured out how to write messages in a certain topic. But I can’t figure out how to create it and find out the topic id. Here is a pre-launch code that successfully creates a group and invites the necessary users to it
You can create a forum using CreateChannelRequest
Create a topic using CreateForumTopicRequest
You can also convert an existing group into a forum using ToggleForumRequest