diff --git a/docs/webhook-config.md b/docs/webhook-config.md index e18a05e9b..811fa1b8e 100644 --- a/docs/webhook-config.md +++ b/docs/webhook-config.md @@ -302,6 +302,7 @@ You can configure this as follows: ``` The above represents the default (`exit_fill` and `entry_fill` are optional and will default to the above configuration) - modifications are obviously possible. +To disable either of the two default values (`entry_fill` / `exit_fill`), you can assign them an empty array (`exit_fill: []`). Available fields correspond to the fields for webhooks and are documented in the corresponding webhook sections. diff --git a/freqtrade/rpc/discord.py b/freqtrade/rpc/discord.py index 36ef37d01..c0e9220b2 100644 --- a/freqtrade/rpc/discord.py +++ b/freqtrade/rpc/discord.py @@ -31,12 +31,11 @@ class Discord(Webhook): def send_msg(self, msg) -> None: - if msg['type'].value in self._config['discord']: + if (fields := self._config['discord'].get(msg['type'].value)): logger.info(f"Sending discord message: {msg}") msg['strategy'] = self.strategy msg['timeframe'] = self.timeframe - fields = self._config['discord'].get(msg['type'].value) color = 0x0000FF if msg['type'] in (RPCMessageType.EXIT, RPCMessageType.EXIT_FILL): profit_ratio = msg.get('profit_ratio')