diff --git a/main.go b/main.go index bcc9bc6..614e755 100644 --- a/main.go +++ b/main.go @@ -241,7 +241,7 @@ func main() { } SKIP_RESTART: - if !startMessageSuccessful { + if !startMessageSuccessful && !cfg.Telegram.SkipStartupMessage { state.State.TelegramBot.SendMessage(cfg.Telegram.OwnerID, "Successfully started WaTgBridge", &gotgbot.SendMessageOpts{}) } diff --git a/sample_config.yaml b/sample_config.yaml index 6ddb873..dc2aaf3 100644 --- a/sample_config.yaml +++ b/sample_config.yaml @@ -26,6 +26,8 @@ telegram: silent_confirmation: true # Send a silent "Successfully sent" message emoji_confirmation: true # Reacts to the message with a "👍" emoji instead of replying + skip_startup_message: false # If set to true, then a message will NOT be sent to your Telegram DM when the bot starts + whatsapp: session_name: watgbridge # This will appear in your Linked Devices in mobile app # All these values can be obtained by running /findcontacts and /getwagroups commands diff --git a/state/config.go b/state/config.go index 548f713..95e3ea7 100644 --- a/state/config.go +++ b/state/config.go @@ -33,6 +33,7 @@ type Config struct { SendMyReadReceipts bool `yaml:"send_my_read_receipts"` SilentConfirmation bool `yaml:"silent_confirmation"` EmojiConfirmation bool `yaml:"emoji_confirmation"` + SkipStartupMessage bool `yaml:"skip_startup_message"` } `yaml:"telegram"` WhatsApp struct { diff --git a/state/state.go b/state/state.go index 041d278..9dc3c24 100644 --- a/state/state.go +++ b/state/state.go @@ -10,7 +10,7 @@ import ( "gorm.io/gorm" ) -const WATGBRIDGE_VERSION = "1.9.2" +const WATGBRIDGE_VERSION = "1.9.3" type state struct { Config *Config