Mudlet Package that integrates with Telegram
Command | API | Comment |
---|---|---|
#HELP | Helpfile | |
#VERSION | Version info | |
#TELEGRAM | Package Status | |
#TELEGRAM STATUS | Telegram:showStatus() | Package Status |
#TELEGRAM VERSION | Telegram:showVersion() | Version info |
#TELEGRAM HELP | Telegram:showHelp() | Helpfile |
#TELEGRAM UPGRADE | Telegram:downloadLatestVersion() | Upgrade the package |
#TELEGRAM TOKEN <token> | Telegram:SetToken(token) | Set Telegram Token" |
#TELEGRAM INTERVAL <seconds> | Telegram:SetInterval(5) | Set polling interval, default 10s |
#TELEGRAM ENABLE | Enable the package | |
#TELEGRAM DISABLE | Disable the package | |
#TELEGRAM TELL <username> <message> | Telegram:Tell("takilara","Someone is attacking me!!!") | Send a message to a telegram user |
#TELEGRAM WHISPER <username> <message> | Telegram:Tell("takilara","This message will get delivered without notification",true) | Send a message to a telegram user (no notification) |
#TELEGRAM AUTH <username> | Authorize a Telegram user | |
#TELEGRAM UNAUTH <username> | UnAuthorize a Telegram user |
The #<COMMAND> commands are meant to be used from within the game. To use these mechanics in scripts or aliases, use the API commands
- Install the Package
- Open telegram and open a chat with @botfather
- Run the command /newbot in telegram, i recommend giving it a name that in part matches the character that you will be linking to (e.g. mymud_gandalf_bot)
- Go to Mudlet, type #TELEGRAM TOKEN <paste_the_token_here>
- Run the command /mybots, then click the bot, -> Bot Settings -> Group Privacy -> Turn off (this is only required if you intend to add your bot to a chat group)
- Open a chat with the bot, and run the command /start
- Try a command like 'look', The bot will reply telling you: User '<yourusername>' not authorized
- In Mudlet you should now see a message about unauthorized user, run the command #TELEGRAM AUTH <yourusername>
- Repeat the command 'look', it should now work
- In Mudlet, also try '#TELEGRAM TELL <yourusername> some message' and it should show up in Telegram
- Versioning
- Packaging
- Update from the script