1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-01-18 05:18:06 +02:00
OpenIntegrations/docs/en/examples/Telegram/CreateInviteLink.txt
2024-08-13 14:35:37 +03:00

11 lines
427 B
Plaintext

Token = FunctionParameters["Telegram_Token"];
ChannelID = FunctionParameters["Telegram_ChannelID"];
Day = 86400;
CurrentDate = OPI_Tools.GetCurrentDate();
Title = "Link " + String(CurrentDate);
Expiration = CurrentDate + Day;
UnixExpiration = OPI_Tools.UNIXTime(Expiration);
Result = OPI_Telegram.CreateInvitationLink(Token, ChannelID, Title, Expiration, 200);