This is an old revision of the document!
This addon requires Cherry core, a free store addon. get it here.
Seamlessly connect Final Fantasy XIV's chat system with your Telegram account, ensuring you never miss a beat, even when you're not in the game. Type messages directly into Telegram, and watch as they're instantly relayed into the game's chat, allowing you to communicate with your teammates as if you were there. Plus, stay updated with real-time notifications of in-game events and conversations.
This add-on utilizes Telegram's bot technology to transfer messages back and forth to the game. Telegram is free and creating a bot is free as well as easy. No coding skills are needed. Follow the instructions carefully to ensure that you don't have any issues.
This add-on requires that you have a Telegram account. Telegram accounts are free and easy to sign up for.
Follow this link to create your bot Step-by-step Telegram bot creation. The username and description of the bot can be anything you choose and do not affect the operation of the add-on. The important part of this is to get the bot token. Keep the bot token safe as we will be using it in later steps.
Once the bot is created and you have obtained the bot token and while you're still interacting with @botfather, use the
/setjoingroups
command to turn off group access. Cherry Telegram will only respond to chats directly from the Telegram username that you provide to it, so there's no worry that other users will be able to communicate with your game or see your in-game messages, But using the set join groups command will ensure that other users don't try to add it to a group and interact with it in that fashion.
Once those settings are entered in-game, go into Telegram and start a conversation with your bot. You do this by entering the search section and typing in an “@” and your bots username: Example “@ffxivchattingbot”. Send the
/start
Command to your bot to start interacting with the game client. If you don't enable “Auto-connect to last chat instance” then you will need to send the start command every time you reopen the game.
Once the bot has been connected for a few minutes you should see a list of commands appear in telegram:
Any 3rd party add-on developer can develop an add-on that connects to Cherry Core. That add-on can then send and receive messages and commands from any cherry communication add-on. Cherry Core provides a simple interface for allowing the 3rd party add-on to communicate and at the same time gives the end user full control over what messages they receive and to what platform the messages are routed.
Follow the instructions below to build your first mod.
Download cherry_modchattest.zip And install it in Mmo Minion in the LuaMods folder. As long as you have Cherry Core installed as well as at least one communication client installed and configured the sample code should work out of the box.
The Cherry Connect API is fairly simple and is accessed by the global variable
Cherry Connect
Cherry Connect functions are explained below:
Usage: Registers a mod through the Cherry Connect platform to enable an add-on to send/receive messages and commands with a user's installed communication clients.
local CherryConnect.Register(author, cmd_func, mod_name, desc)
returns
On errors:
{ mode = result_modes.error, err_code = error.error_code, message = message, }
See below for possible error codes and messages
On success:
{ mode = "new_id", message = "MOD_ID", }
Notes
The mod name cannot conflict with any other mod or command. Mods do not share a 1 to 1 relationship with an add-on, so a single add-on can register multiple mods. MOD_ID Will be used in all the other API calls to identify which mod is making the call. The MOD_ID must be saved for as long as Cherry Core is not unloaded or until the mod is unregistered. Once the mod is unregistered you must re-register the mod to access a new MOD_ID
Usage:
CherryConnect.Unregister(mod_id)
Unregisters the mod from Cherry Connect
Notes Most of the time you will not need to unregister a mod. The mod will need to be re-registered anytime the addons are all reloaded and a new mod_id will be generated. If you're going to lose the mod_id and you need to re-register your mod without reloading Cherry Core, Then you will need to unregister the mod.
Usage:
CherryConnect.Message(mod_id, message)
Sends a message to all clients that the user has allowed the message to be sent to.
returns
On errors:
{ mode = result_modes.error, err_code = error.error_code, message = message, }
See below for possible error codes and messages
On success:
{ mode = "success", message = "Message sent.", }
Notes Sends a message to the user. This function does not allow a return function because there's no way for the user to directly reply to the message. If you need to give the user options to select then use the CherryConnect.MessageOptions function.
Usage:
CherryConnect.MessageOptions(mod_id, options, message, callback_func)
Sends a message that includes options that the user can select.
* mod_id - required
returns
On errors:
{ mode = result_modes.error, err_code = error.error_code, message = message, }
See below for possible error codes and messages
On success:
{ mode = "success", message = "Message sent.", }
Notes The option that is returned will exactly match one of the options that was sent. the callback id should be immediately used when an option is selected. Some clients use this data to give the user ui feedback.
Usage:
CherryConnect.MessageResponse(mod_id, response_id, message)
* mod_id - required
returns
On errors:
{ mode = result_modes.error, err_code = error.error_code, message = message, }
See below for possible error codes and messages
On success:
{ mode = "success", message = "Message sent.", }
Notes The option that is returned will exactly match one of the options that was sent. the callback id should be immediately used when an option is selected. Some clients use this data to give the user ui feedback.
Result Modes
result_modes = { new_id = "new_id", success = "success", error = "error", message = "message", }
Error Codes
errors = { setting_commands = { error_code = 1001, message = "Error Setting Commands." }, missing_fields = { error_code = 1002, message = "Please provide an author, command function, mod name, and description." }, mod_name_spaces = { error_code = 1003, message = "Mod name cannot contain spaces." }, cmdFunc_not_function = { error_code = 1004, message = "[cmdFunc] must be a function." }, duplicate_mod = { error_code = 1005, message = "Mod already registered. Please use a different author / name combination." }, mod_not_found = { error_code = 1006, message = "Mod not found." }, id_not_supplied = { error_code = 1007, message = "ID not supplied." }, mod_not_allow_posting = { error_code = 1008, message = "Mod does not allow posting." }, message_not_supplied = { error_code = 1009, message = "Please supply a message." }, no_registered_clients = { error_code = 1010, message = "The user has not registered any communication clients." }, }
If you have any questions or need help, please visit the Cherry discord server: Cherry Discord