From 79deb67848ff8ed75deaba7c3b3b73a6ee3beb5d Mon Sep 17 00:00:00 2001 From: Mohammad Mahdi Mohammadi Date: Wed, 6 Nov 2024 20:08:30 +0330 Subject: [PATCH] Only send start message if the received message is from a private account --- Program.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Program.cs b/Program.cs index 96654d2..9132f2b 100755 --- a/Program.cs +++ b/Program.cs @@ -76,10 +76,10 @@ public class MastodonBot { await HandleDbBackup.HandleDbBackupAsync(bot, logger, config.DB_NAME, config.ADMIN_NUMID, db); } - else + // Send a message to prompt user to send /start and recieve their cat photo only if its from a telegram user and not a channel + else if (message.Chat.Type == ChatType.Private) { - // Send a help message to prompt user to send /start and recieve their cat photo - await bot.SendMessage(message.Chat.Id, "Send /start to get a random cat!"); + await HandleStartMessage.HandleStartMessageAsync(message, bot, db, logger); } }