Full code:
from tgcore import Client
tg = Client(api_key="")
user = await tg.platform.tools\
.types()\
.platform("instagram")\
.url(
"https://www.instagram.com/reel/...."
).send(via_result=True)
video = tg.writer(
"mp4",
image_bytes=(await tg._ensure_client().get(
user.ig_url()[0])).content
)
return await tg.raw.sendVideoUpload()\
.chat_id(id)\
.video(video)\
.reply_markup(
tg.kb().url(
"View Coder",
"https://t.me/meme_your_username"
).build()
)\
.caption(
"Siapa yang pernah kena parameter hell? 🗿"
).skip()
How to learn chaining in tgcore?
You can learn easily
Examples Usage
• only POST
You can learn easily
Examples Usage
• only POST
from tgcore import Client
tg = Client(api_key="something", base_url="https://meme_your_domain.com")
result = await (
tg.use.default
.types("/api/todo")
.step()
.step2()
.execute()
)
print(result)
How to Automatically Save base_url?
You can set
1. During initialization:
2. Or by assigning it directly:
This value will be saved and will persist.
Code Example:
You can set
base_url when using the userbot:1. During initialization:
tg = Client(base_url="https://tgcore.ryzenths.dpdns.org")
2. Or by assigning it directly:
tg.base_url = "https://tgcore.ryzenths.dpdns.org"
This value will be saved and will persist.
Code Example:
MEME_IG_URL = "https://www.instagram.com/reel/......"
result = await tg.use.default\
.types("/api/web/platform/download")\
.platform("instagram")\
.url(MEME_IG_URL)\
.send(allow_object=True)
return result
ev kb = tg.kb().copy_text("Pyrogram same", "maybe").build()
result = await tg.use.default\
.types("/api/v2/sendMessage")\
.chat_id(message.chat.id)\
.text("hello world")\
.reply_markup(kb)\
.skip()
return result
result = await tg.use.default\
.types("/api/v2/sendMessage")\
.chat_id(message.chat.id)\
.text("hello world")\
.reply_markup(kb)\
.skip()
return result
TgCore Final Updated
List methods: https://teamkillerx.github.io/tgcore/docs/#list-methods
RequestCall:
https://teamkillerx.github.io/tgcore/docs/#requestcall
List methods: https://teamkillerx.github.io/tgcore/docs/#list-methods
RequestCall:
https://teamkillerx.github.io/tgcore/docs/#requestcall
Finally I've finished everything.
tgcore
Level architecture
TgCore • Enterprise Telegram SDK framework with fluent builder API, platform tools, and AI integrations.