From 4d87d39431b0cc2d2f233b9a227b6fc2804299c7 Mon Sep 17 00:00:00 2001 From: Alexander Pushkov Date: Sat, 4 Mar 2023 11:40:25 +0000 Subject: [PATCH] Use forward slash in commands --- PublishHelperBot/Telegram.fs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PublishHelperBot/Telegram.fs b/PublishHelperBot/Telegram.fs index f02b277..42b2dde 100644 --- a/PublishHelperBot/Telegram.fs +++ b/PublishHelperBot/Telegram.fs @@ -14,8 +14,8 @@ open Telegram.Bot.Types.InputFiles module BotUpdateType = let private getRelayCaptionType (command: string) = match command with - | _ when command.StartsWith "\\post anon" -> Anonymous - | _ when command.StartsWith "\\post" -> WithAuthor + | _ when command.StartsWith "/post anon" -> Anonymous + | _ when command.StartsWith "/post" -> WithAuthor | _ -> Unknown let private updateIsAMessage (update: Update) = @@ -37,7 +37,7 @@ module BotUpdateType = | MessageType.Video -> true | _ -> false - let [] private YoutubeRepostMatchCmd = "\\ytdl" + let [] private YoutubeRepostMatchCmd = "/ytdl" let private isYoutubeRepost (update: Update, adminChatId: ConfigChatId) = updateIsAMessage update && fromAdminChat (update.Message, adminChatId) && @@ -57,7 +57,7 @@ module BotUpdateType = updateIsAMessage update && fromAdminChat (update.Message, adminChatId) && hasText update.Message && - update.Message.Text.StartsWith("\ping") + update.Message.Text.StartsWith("/ping") let getUpdateType (update: Update) (config: BotConfig) = match update with @@ -318,4 +318,4 @@ module TgUpdateHandler = let inbox = createInbox config service ytService { new ITgUpdateHandler with member this.PostUpdate update = - inbox.Post(NewUpdate(update)) } \ No newline at end of file + inbox.Post(NewUpdate(update)) }