Add support for dp.send_msg() to webhooks

This commit is contained in:
froggleston
2022-10-07 16:06:30 +01:00
parent d42fb15608
commit 8fcb80df69
3 changed files with 32 additions and 4 deletions

View File

@@ -88,10 +88,13 @@ class RPCManager:
"""
while queue:
msg = queue.popleft()
self.send_msg({
'type': RPCMessageType.STRATEGY_MSG,
'msg': msg,
})
for mod in self.registered_modules:
if mod._config.get(mod.name, {}).get('allow_custom_messages', False):
mod.send_msg({
'type': RPCMessageType.STRATEGY_MSG,
'msg': msg,
})
def startup_messages(self, config: Config, pairlist, protections) -> None:
if config['dry_run']: