- 88
- 19
- Версия MoonLoader
- Другое
я хочу вывести содержимое диалогового окна в тг, но не получается, подскажите пожалуйста
Например, человек пишет в тг бота !stats, скрипт прописывает в игре /stats (у меня это сделаное), отправляет содержимое в тг, и закрывает диалог окно
Например, человек пишет в тг бота !stats, скрипт прописывает в игре /stats (у меня это сделаное), отправляет содержимое в тг, и закрывает диалог окно
Lua:
function processing_telegram_messages(result)
if active.v then
if result then
local proc_table = decodeJson(result)
if proc_table.ok then
if #proc_table.result > 0 then
local res_table = proc_table.result[1]
if res_table then
if res_table.update_id ~= updateid then
updateid = res_table.update_id
local message_from_user = res_table.message.text
if message_from_user then
local text = u8:decode(message_from_user) .. ' '
if text:match('^!qq') then
sendTelegramNotification('Ку')
elseif text:match('^!q') then
sendTelegramNotification('Привет!')
elseif text:match('^!radius') then
sendTelegramNotification('Игроки в радиусе:')
sendigrokradiusTg()
elseif text:match('^!status') then
sendStatusTg()
elseif text:match('^!stats') then
sampSendChat('/stats')
else -- если же не найдется ни одна из команд выше, выведем сообщение
sendTelegramNotification('Неизвестная команда!')
end
end
end
end
end
end
end
end
end