/
kewerborliert
/
Computer-15
Обзор
Документация
Войти
/
kewerborliert
/
Computer-15
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
TelegramBot/Bot/Commands/cmd_exec.lua
18 строк
533 B
afyyar
upload
29 дек 2024, 08:26
29 дек 2024, 08:26
099515e
Код
Авторство
О чём код?
local Tg = require "Bot.Service.TelegramService" local Us = require "Bot.Service.UsersService" require "const" return function(actions, chat_id) if Us.CheckAdmin(chat_id) then Tg.SendMessage(chat_id, "Send me the program name with absolute path") actions[chat_id] = function(msg_text) shell.run(msg_text) Tg.SendMessage(chat_id, "Everything is going as planned, Master") actions[chat_id] = nil end else Tg.SendMessage(chat_id, MSG_NOT_ADMIN) end end