Telegram
Integration with Telegram allows for sending messages (Telegram ↔ Minecraft) between the Minecraft server and Telegram.

Message Types
| Type | Explanation |
|---|---|
CHAT_GLOBAL | Message from the global chat |
CHAT_LOCAL | Message from the local chat |
AFK | Message from the afk action |
ADVANCEMENT | Message from an advancement |
DEATH | Message from death |
JOIN | Message when a player joins the server |
QUIT | Message when a player leaves the server |
FROM_DISCORD_TO_MINECRAFT | Message from Discord to Minecraft |
FROM_TWITCH_TO_MINECRAFT | Message from Twitch to Minecraft |
FROM_TELEGRAM_TO_MINECRAFT | Message from Telegram to Minecraft |
COMMAND_ME | Message from the /me command |
COMMAND_BALL | Message from the /ball command |
COMMAND_BAN | Message from the /ban command |
COMMAND_BROADCAST | Message from the /broadcast command |
COMMAND_COIN | Message from the /coin command |
COMMAND_DICE | Message from the /dice command |
COMMAND_DO | Message from the /do command |
COMMAND_HELPER | Message from the /helper command |
COMMAND_MUTE | Message from the /mute command |
COMMAND_POLL_CREATE_MESSAGE | Message from the /poll command |
COMMAND_SPY | Player monitoring sent to /spy |
COMMAND_STREAM | Message from the /stream command |
COMMAND_TRANSLATETO | Message from the /translateto command |
COMMAND_TRY | Message from the /try command |
COMMAND_WARN | Message from the /warn command |
COMMAND_KICK | Message from the /kick command |
SERVER_ENABLE | Message when the server starts |
SERVER_DISABLE | Message when the server shuts down |
If you have custom chats with your own names, for example admin, you will need to specify CHAT_ADMIN. If you have your own groups from the vanilla module, you need to specify their names.
🌍 Localization
Pathlocalizations → language.yml → integration.telegram
telegram:
null_player: "This player does not exist"
format_reply: "<fcolor:4><hover:show_text:'<fcolor:4><reply_message>'>[Reply to @<reply_user>]</hover> "
custom_command:
id: "Channel id: <id>"
ping: "<player>'s ping is <replacement:ping>"
info_channel:
id: "TPS <replacement:tps>"
message_channel:
FROM_TELEGRAM_TO_MINECRAFT: "<fcolor:2><user_name> <fcolor:1>» <fcolor:4><reply><message>"
CHAT_GLOBAL: "<final_message>"telegram:
null_player: "Игрок не найден"
format_reply: "<fcolor:4><hover:show_text:'<fcolor:4><reply_message>'>[Ответ на @<reply_user>]</hover> "
custom_command:
id: "Айди чата: <id>"
ping: "Пинг игрока <player> равен <replacement:ping>"
info_channel:
айди: "ТПС <replacement:tps>"
message_channel:
FROM_TELEGRAM_TO_MINECRAFT: "<fcolor:2><user_name> <fcolor:1>» <fcolor:4><reply><message>"
CHAT_GLOBAL: "<final_message>"null_player
Message shown if the player entered via custom_command is not found
format_reply
The message format for the <reply> tag when a message is a reply to another one
custom_command
A list of custom integration commands, where the key is the command name and the value is its message format
custom_command:
tps:
content: "<tps>"A command to get the tps value on the server. Don't forget to define it in integration.yml
Placeholders
You can use all the placeholders that are used in the initial Minecraft message.
There is a <reason> placeholder there, which means I can use <reason> inside Telegram messages.
There are also placeholders that are GUARANTEED to be replaced in any message:
<final_message>the message sent to Minecraft<final_clear_message>the message sent to Minecraft without unicode emojis<player>the nickname of the player who sent the message<message>the raw message written by the player<plain_message>the formatted message written by the player<reply>the formatted reply message; it will be empty if the main message is not a reply- Obviously, all placeholders from
PlaceholderAPIandFlectonePulsewill also work
A message sent from Telegram to Minecraft has its own placeholders:
| Placeholder | What it returns |
|---|---|
<name> | Telegram username handle |
<user_name> | Telegram username handle |
<first_name> | Telegram user's first name |
<last_name> | Telegram user's last name |
<chat> | Telegram chat title (where the message originated) |
info_channel
A list of channel IDs and their names for displaying specific information, such as TPS
message_channel
A list of messages with the final message format
Take the name from the message types list
Insert it into message_channel
message_name: "<final_message>"⚙️ Setting
Pathintegration.yml → telegram
telegram:
enable: false
parse_mode: "NONE"
token: ""
custom_command:
id:
need_player: false
aliases:
- "!id"
ping:
need_player: true
aliases:
- "!ping"
channel_info:
enable: false
ticker:
enable: true
period: 1200
message_channel:
FROM_TELEGRAM_TO_MINECRAFT:
- "123456"
CHAT_GLOBAL:
- "123456"
destination:
type: "CHAT"
sound:
enable: falseenable
Enables or disables the functionality of the module
- Before enabling, insert your Telegram bot token
- After enabling, it is RECOMMENDED to restart the server
parse_mode
The mode in which the message will be sent to Telegram
| Mode | Description |
|---|---|
MARKDOWN | The message will be formatted according to the legacy Markdown format |
MARKDOWN_V2 | The message will be formatted according to the new Markdown V2 format |
HTML | The message will be formatted according to the HTML format |
NONE | The message will not be formatted at all |
token
The bot token for connection. Environment variables can be used, e.g., ${VALUE}
custom_command
A list of custom integration commands; the key is the command name and can be anything. Commands can ONLY be informational; they do not and will not execute anything on the server.
| Parameter | Explanation |
|---|---|
need_player | Whether to check the first argument of the command for a player name, e.g., !ping TheFaser |
aliases | A list of aliases for using the command |
custom_command:
tps:
need_player: false
aliases:
- "!tps"
- "!tickpersecond"A command to get the tps value on the server using !tps or !tickpersecond. Don't forget to create the message in the localization file
channel_info
Configuration for information channels
enable
Whether the information channel is required
ticker
Updating every specific interval of time
message_channel
A list of message types and Telegram chat IDs
- Copy the chat ID where the message should be sent (
-1002341720267_49)
If the bot is connected and added to the channel, you can use the /id command in Telegram to find out the channel ID.
- Configure it:
message_channel:
COMMAND_BAN:
- "-1002341720267_49"There can be any number of chats, as long as the bot has access to them from secrets. Localization configuration is optional; by default, the message will be sent with the <final_message> format.
If your channel is a Forum (Topic), the MAIN channel ID must be specified without the _ suffix.
- My main channel ID (which always ends in
_1) is-1002341720267_1 - Therefore, you should enter ONLY
-1002341720267
This rule does not apply to other chats within the forum, where the FULL ID must be entered.
destination
Where the message will be sent
| Type | Explanation | Requires additional configuration? |
|---|---|---|
ACTION_BAR | Message above the player's inventory | Yes |
BOSS_BAR | Message at the top of the screen | Yes |
BRAND | Message in F3 | No |
CHAT | Message in chat | No |
TEXT_SCREEN | Message anywhere on the screen | Yes |
TITLE | Full-screen message | Yes |
SUBTITLE | Full-screen message (bottom line) | Yes |
TAB_HEADER | Message in TAB (top) | No |
TAB_FOOTER | Message in TAB (bottom) | No |
TOAST | Message in the top right corner (achievement) | Yes |
sound
Sound playback
🔐 Permissions
Pathpermission.yml → integration.telegram
telegram:
name: "flectonepulse.module.integration.telegram"
type: "TRUE"
sound:
name: "flectonepulse.module.integration.telegram.sound"
type: "TRUE"name
Permission name
type
Permission type
| Type | Explanation |
|---|---|
TRUE | Available to any player |
FALSE | Available to no one, must be granted separately (e.g., using LuckPerms) |
OP | Available to server operators |
NOT_OP | Available to NON-operators of the server |
sound
Permission to use the sound
Last updated on
Edit on GitHub
FlectonePulse