This commit is contained in:
Vitaliy Olkhin 2024-10-09 14:09:19 +05:00
parent 963006427e
commit d99eecd773
2 changed files with 7 additions and 0 deletions

View File

@ -10,6 +10,7 @@ telegram = {}
local token = minetest.settings:get("telegram.token") local token = minetest.settings:get("telegram.token")
local chat_id = minetest.settings:get("telegram.chatid") local chat_id = minetest.settings:get("telegram.chatid")
local updates_timeout = tonumber(minetest.settings:get("telegram.timeout")) local updates_timeout = tonumber(minetest.settings:get("telegram.timeout"))
local message_thread_id = minetest.settings:get("telegram.message_thread_id")
if not updates_timeout then if not updates_timeout then
updates_timeout = 1 updates_timeout = 1
@ -94,6 +95,7 @@ function telegram.send_message(chat_id, text)
local request_body = {} local request_body = {}
request_body.chat_id = chat_id request_body.chat_id = chat_id
request_body.message_thread_id = message_thread_id
request_body.text = tostring(text) request_body.text = tostring(text)
request_body.parse_mode = parse_mode request_body.parse_mode = parse_mode
request_body.reply_markup = "" request_body.reply_markup = ""

5
mod.conf Normal file
View File

@ -0,0 +1,5 @@
release = 6870
author = neko259
name = telegram
description = Integration with telegram messenger chat
title = Telegram