[Mod] Telegram [telegram]

Post Reply
User avatar
neko259
Member
Posts: 805
Joined: Sun Jun 19, 2011 06:51

[Mod] Telegram [telegram]

by neko259 » Post

This mod acts as a relay between the telegram chat and minetest. Currently it just relays messages and also accepts "ping" and "groupid" commands from chat.

To use it, you need to create a bot (using https://telegram.me/BotFather) and disable group privacy to allow it read all messages.

More functionality (e.g. announce death, more commands like get time or player list) to be done.

NB: I had to use lua JSON parser because the one in minetest.parse_json treats big ints that telegram sends incorrectly and fails to parse them for some reason.

License
Apache License.

Downloads/source
https://github.com/neko259/telegram

Dependencies
default

Usage
1. Get it from github.
2. Add telegram.token and telegram.chatid in minetest.conf. If you don't know the chatid, just run the bot without it and send "groupid" command in chat. The bot will then reply you with the id.
3. Add the mod to secure.trusted_mods (required to use the HTTP API).
4. Enjoy!

Commands from chat
ping - just responds with a Pong to ensure the server and bot are running
groupid - returns the chat id
players - shows the list of active players

TODO
Add multiple chats, not only one
Announce logins/logouts, deaths, etc
More commands to run from the chat
Setting for the updates check interval
Pass stickers as emojis or at least notify non-text messages was sent in chat

User avatar
niwla23
Member
Posts: 118
Joined: Sat Nov 17, 2018 17:40
In-game: Niwla

Re: [Mod] Telegram [telegram]

by niwla23 » Post

nice!

ronoaldo
Member
Posts: 177
Joined: Mon Dec 07, 2020 01:04
GitHub: ronoaldo
IRC: ronoaldo
In-game: RonoaldoKakashi
Location: São Paulo, Brasil
Contact:

Re: [Mod] Telegram [telegram]

by ronoaldo » Post

@neko259 could you update the version available on contentdb? The published version still has the debug print and is missing the join/leave notify feature. Mod looks very good by the way.
Servers: Mercurio | Tools: ContentDB CLI | Mods: minenews

Post Reply

Who is online

Users browsing this forum: No registered users and 48 guests