Package: unified-message-relay
UnifiedMessageRelayUnifiedMessageRelay is a framework for the purpose of bringing messages from different chat platform together. With UnifiedMessageRelay,
user no longer need to view messages on different platform, or different groups. UnifiedMessageRelay brings powerful
message forwarding functionality and flexible plugin API to meet your custom need. A driver API specification is also
provided, so one can compose their own backend driver, and the framework will load and utilize the driver automatically.DemoTelegram <-> QQ:Telegram <-> Discord:All four platforms: QQ, Telegram, Line and Discord can forward between each other directly.Supported platformsQQ API based onCoolQ HTTP APIaiocqhttpMirai API based on multiple repos fromMamoe TechnologiesTelegram API based onaiogramLine API based onlinebotxlinebotDiscord API based onDiscord.pyUpdateChangeLog.mdFeaturesForward text and image between all supported platformsImage is converted to supported format automaticallyReply is preserved with best effortMarkdown format is preserved for supported platformsCommand API for customize triggersMessage Hook API for even more customized needsLimited support for Coolq Air. image sending is available for Coolq Pro.InstallationFramework SetupInstall python dependencies on host osMake sure Python 3.7+ andpipare installed. Run:pip3 install unified-message-relayTLDRTo install every python module in one line:pip3 install -U umr_telegram_driver umr_line_driver umr_discord_driver umr_coolq_driver umr_mirai_driver umr_extensions_demoInstall other required package on host osapt install libcairo2 ffmpeg libmagickwand-devConfigurationsCreate~/.umr/mkdir~/.umrCopy config.yaml to~/.umrWhy yaml instead of json?Full Example configThe "QQ", "Telegram" or "Line" above are all custom names. Real bot driver should be configure throgh "Driver" list.Follow the guide for your platformQQMiraiTelegramLineDiscordStart the botViewing CLI Helpunified-message-relay-hBackground processStart background serviceunified-message-relaystartorunified-message-relayrestartBy default, log will be stored in/var/log/umr/bot.log, and cache will be cleared out upon start.Stop the background serviceunified-message-relaystopForeground process (for debugging purpose)If you need to see the log output for debugging purpose, stop the running daemon first. Then follow this command.Remember to enable debug option in config.unified-message-relayrunHit Ctrl + C to stop.Extensions and CommandsExample extensions and commands now require extensionumr-extensions-demo:pipinstallumr-extensions-demoand put- umr_extensions_demounderExtensionssection ofconfig.yaml.Available commandsHelpSend!!helpto show available commands.This command requires no extra module.Show chat idSend!!idanywhere to see chat id.Reply message with!!idto reveal source chat id.This command requirescmd_id.pyunder umr_extension_demo.Delete QQ MessageReply to the message you want to delete with!!delThis command requiresQQ_recall.pyunder umr_extension_demo and using coolq driver.
Mirai recall is not supported at this time.Add telegram blocked keywordMessage containing these keyword will not be forwarded to any other chatSend!!bkand keywords separated by spaceThis command requiresTelegram_watermeter.pyunder umr_extension_demo and using telegram driver.Add telegram blocked channelMessage originated from these channel will not be forwarded to any other chatReply forwarded channel message with!!bcThis command requiresTelegram_watermeter.pyunder umr_extension_demo and using telegram driver.To modify saved keywords and channels, editExtensionConfigsection inconfig.yaml.Available ExtensionsComment filterAdd//at the beginning of the message to avoid forwarding to any other chat.Issue FormatCheck these before opening an issueUseunified-message-relay runto print log to stdoutCheck if you are using Python 3.7+Check if binary dependencies are installed (search apt in this page)(If using Coolq) Check if cq-http-api is enabled in CoolqCheck if the log suggests any missing configurationCheck if you are on Dev branch, please switch back to master (dev may be unstable)Issues must provideDescriptions about the issueLogs of python3 daemon.py run (Desensitization)Steps to reproduce