Dates in UTC, remove trailing spaces
This commit is contained in:
parent
c317e0b973
commit
c0636b82fa
@ -34,7 +34,7 @@ let RelayCaptionType (command: string) =
|
|||||||
| _ when command.StartsWith "\\post" -> WithAuthor
|
| _ when command.StartsWith "\\post" -> WithAuthor
|
||||||
| _ -> Unknown
|
| _ -> Unknown
|
||||||
|
|
||||||
let RelayCaption (name: string, url: string) = $"<a href=\"{url}\"> Прислал </a> {name}"
|
let RelayCaption (name: string, url: string) = $"<a href=\"{url}\">Прислал</a> {name}"
|
||||||
let RelayParseMode = ParseMode.Html;
|
let RelayParseMode = ParseMode.Html;
|
||||||
|
|
||||||
let RelayResolveCaption (mode: RelayCaptionMode, username: string, linkUrl: string) =
|
let RelayResolveCaption (mode: RelayCaptionMode, username: string, linkUrl: string) =
|
||||||
@ -52,7 +52,7 @@ let public RelayMatch: HandlerRequirements = fun (u, c) ->
|
|||||||
let public RelayHandler: Handler = fun (u, c, tg) ->
|
let public RelayHandler: Handler = fun (u, c, tg) ->
|
||||||
let reply = u.Message.ReplyToMessage
|
let reply = u.Message.ReplyToMessage
|
||||||
let channelId = c.chanelId
|
let channelId = c.chanelId
|
||||||
let author = reply.From.FirstName
|
let author = $"{reply.From.FirstName} {reply.From.LastName}"
|
||||||
let captionMode = RelayCaptionType u.Message.Text
|
let captionMode = RelayCaptionType u.Message.Text
|
||||||
|
|
||||||
let photoMedia = lazy Array.get (ExtractPhotoFromMessage reply) 0
|
let photoMedia = lazy Array.get (ExtractPhotoFromMessage reply) 0
|
||||||
|
@ -14,7 +14,7 @@ open Telegram.Bot.Types.Enums
|
|||||||
let CreateBot (config: BotConfig, http: HttpClient) = TelegramBotClient(config.token, http)
|
let CreateBot (config: BotConfig, http: HttpClient) = TelegramBotClient(config.token, http)
|
||||||
let config = CreateConfig <| "SBPB_CONFIG_PATH";
|
let config = CreateConfig <| "SBPB_CONFIG_PATH";
|
||||||
let botClient = CreateBot <| (config, new HttpClient())
|
let botClient = CreateBot <| (config, new HttpClient())
|
||||||
let startDate = DateTime.Now
|
let startDate = DateTime.UtcNow
|
||||||
|
|
||||||
let updateHandle (bc: ITelegramBotClient) (u: Update) (ct: CancellationToken): Task =
|
let updateHandle (bc: ITelegramBotClient) (u: Update) (ct: CancellationToken): Task =
|
||||||
match u with
|
match u with
|
||||||
|
Loading…
Reference in New Issue
Block a user