Skip to content

takilara/MudletTelegramConnector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TelegramConnector

Mudlet Package that integrates with Telegram

Commands

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

Setup

  1. Install the Package
  2. Open telegram and open a chat with @botfather
  3. 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)
  4. Go to Mudlet, type #TELEGRAM TOKEN <paste_the_token_here>
  5. 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)
  6. Open a chat with the bot, and run the command /start
  7. Try a command like 'look', The bot will reply telling you: User '<yourusername>' not authorized
  8. In Mudlet you should now see a message about unauthorized user, run the command #TELEGRAM AUTH <yourusername>
  9. Repeat the command 'look', it should now work
  10. In Mudlet, also try '#TELEGRAM TELL <yourusername> some message' and it should show up in Telegram

TODO

  • Versioning
  • Packaging
  • Update from the script

About

Mudlet Package that integrates with Telegram

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages