In MagicTradeBot, if a notification platform (like Telegram or Discord) is set to null, that channel is completely disabled and ignored by the system.
No messages, alerts, or logs will be sent to that platform.
๐น How It Works
- The bot checks the configuration for each supported channel.
- If a channel is configured with valid credentials โ it is activated.
- If a channel is set to
nullor left empty โ it is skipped entirely. - Only platforms with proper configuration receive notifications.
This ensures that unused or inactive channels do not generate errors or interfere with active messaging.
๐น Practical Examples
Example 1: Only Telegram Enabled
telegram_bot_token: "123456:ABCDEF"
telegram_chat_id: "987654321"
discord_webhook_url: null
- Telegram โ Active, receives all notifications
- Discord โ Disabled, ignored
Example 2: Only Discord Enabled
telegram_bot_token: null
telegram_chat_id: null
discord_webhook_url: "https://discord.com/api/webhooks/..."
- Discord โ Active, receives all notifications
- Telegram โ Disabled, ignored
๐น Why This Matters
- Prevents the bot from attempting to send messages to misconfigured platforms
- Avoids unnecessary error logs
- Keeps notification logic clean and efficient
- Allows selective multi-platform configuration
๐น Key Takeaway
Setting a platform to null disables it completely.
Only channels with valid credentials will receive messages, giving you full control over which platforms are used for alerts, while preventing unnecessary errors or inactive notifications.