|
@@ -42,26 +42,26 @@ async def create(_, message):
|
|
|
group_name = " ".join(split)
|
|
group_name = " ".join(split)
|
|
|
desc = "Welcome To My " + ("Supergroup" if group_type == "s" else "Channel")
|
|
desc = "Welcome To My " + ("Supergroup" if group_type == "s" else "Channel")
|
|
|
if group_type == "b": # for basicgroup
|
|
if group_type == "b": # for basicgroup
|
|
|
- _id = await app2.create_group(group_name, BOT_USERNAME)
|
|
|
|
|
- link = await app2.get_chat(_id["id"])
|
|
|
|
|
|
|
+ chat = await app2.create_group(group_name, BOT_USERNAME)
|
|
|
|
|
+ link = await app2.get_chat(chat.id)
|
|
|
await eor(
|
|
await eor(
|
|
|
message,
|
|
message,
|
|
|
- text=f"**Basicgroup Created: [{group_name}]({link['invite_link']})**",
|
|
|
|
|
|
|
+ text=f"**Basicgroup Created: [{group_name}]({link.invite_link})**",
|
|
|
disable_web_page_preview=True,
|
|
disable_web_page_preview=True,
|
|
|
)
|
|
)
|
|
|
elif group_type == "s": # for supergroup
|
|
elif group_type == "s": # for supergroup
|
|
|
- _id = await app2.create_supergroup(group_name, desc)
|
|
|
|
|
- link = await app2.get_chat(_id["id"])
|
|
|
|
|
|
|
+ chat = await app2.create_supergroup(group_name, desc)
|
|
|
|
|
+ link = await app2.get_chat(chat.id)
|
|
|
await eor(
|
|
await eor(
|
|
|
message,
|
|
message,
|
|
|
- text=f"**Supergroup Created: [{group_name}]({link['invite_link']})**",
|
|
|
|
|
|
|
+ text=f"**Supergroup Created: [{group_name}]({link.invite_link})**",
|
|
|
disable_web_page_preview=True,
|
|
disable_web_page_preview=True,
|
|
|
)
|
|
)
|
|
|
elif group_type == "c": # for channel
|
|
elif group_type == "c": # for channel
|
|
|
- _id = await app2.create_channel(group_name, desc)
|
|
|
|
|
- link = await app2.get_chat(_id["id"])
|
|
|
|
|
|
|
+ chat = await app2.create_channel(group_name, desc)
|
|
|
|
|
+ link = await app2.get_chat(chat.id)
|
|
|
await eor(
|
|
await eor(
|
|
|
message,
|
|
message,
|
|
|
- text=f"**Channel Created: [{group_name}]({link['invite_link']})**",
|
|
|
|
|
|
|
+ text=f"**Channel Created: [{group_name}]({link.invite_link})**",
|
|
|
disable_web_page_preview=True,
|
|
disable_web_page_preview=True,
|
|
|
)
|
|
)
|