Merge branch 'feature/fwd-slash' into 'master'
Use forward slash in commands See merge request alzheimer-gaming/publishhelperbot!5
This commit is contained in:
		
						commit
						91161eeace
					
				
					 1 changed files with 5 additions and 5 deletions
				
			
		| 
						 | 
					@ -14,8 +14,8 @@ open Telegram.Bot.Types.InputFiles
 | 
				
			||||||
module BotUpdateType =
 | 
					module BotUpdateType =
 | 
				
			||||||
    let private getRelayCaptionType (command: string) =
 | 
					    let private getRelayCaptionType (command: string) =
 | 
				
			||||||
        match command with
 | 
					        match command with
 | 
				
			||||||
        | _ when command.StartsWith "\\post anon" -> Anonymous
 | 
					        | _ when command.StartsWith "/post anon" -> Anonymous
 | 
				
			||||||
        | _ when command.StartsWith "\\post" -> WithAuthor
 | 
					        | _ when command.StartsWith "/post" -> WithAuthor
 | 
				
			||||||
        | _ -> Unknown
 | 
					        | _ -> Unknown
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    let private updateIsAMessage (update: Update) =
 | 
					    let private updateIsAMessage (update: Update) =
 | 
				
			||||||
| 
						 | 
					@ -37,7 +37,7 @@ module BotUpdateType =
 | 
				
			||||||
        | MessageType.Video -> true
 | 
					        | MessageType.Video -> true
 | 
				
			||||||
        | _ -> false
 | 
					        | _ -> false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    let [<Literal>] private YoutubeRepostMatchCmd = "\\ytdl"
 | 
					    let [<Literal>] private YoutubeRepostMatchCmd = "/ytdl"
 | 
				
			||||||
    let private isYoutubeRepost (update: Update, adminChatId: ConfigChatId) =
 | 
					    let private isYoutubeRepost (update: Update, adminChatId: ConfigChatId) =
 | 
				
			||||||
        updateIsAMessage update &&
 | 
					        updateIsAMessage update &&
 | 
				
			||||||
        fromAdminChat (update.Message, adminChatId) &&
 | 
					        fromAdminChat (update.Message, adminChatId) &&
 | 
				
			||||||
| 
						 | 
					@ -57,7 +57,7 @@ module BotUpdateType =
 | 
				
			||||||
        updateIsAMessage update &&
 | 
					        updateIsAMessage update &&
 | 
				
			||||||
        fromAdminChat (update.Message, adminChatId) &&
 | 
					        fromAdminChat (update.Message, adminChatId) &&
 | 
				
			||||||
        hasText update.Message &&
 | 
					        hasText update.Message &&
 | 
				
			||||||
        update.Message.Text.StartsWith("\ping")
 | 
					        update.Message.Text.StartsWith("/ping")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    let getUpdateType (update: Update) (config: BotConfig) =
 | 
					    let getUpdateType (update: Update) (config: BotConfig) =
 | 
				
			||||||
        match update with
 | 
					        match update with
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue