Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Corrected command recognition pattern |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
e9bc359947c21b4529b6461d22106ac2 |
User & Date: | murphy 2020-04-29 11:51:44.000 |
Context
2020-05-01
| ||
18:06 | Additional race (and language) options from Ixalan and Arkadia check-in: 350b0e4e3f user: murphy tags: trunk | |
2020-04-29
| ||
11:51 | Corrected command recognition pattern check-in: e9bc359947 user: murphy tags: trunk | |
09:34 | Frontend tweaks, split help text into multiple topics rather than bombarding the user with messages check-in: 76166a5ce7 user: murphy tags: trunk | |
Changes
Changes to DragonDice.Bot/Worker.fs.
︙ | ︙ | |||
28 29 30 31 32 33 34 | open Telegram.Bot.Types.Enums open Telegram.Bot.Types.ReplyMarkups /// Service worker implementing the interface between Telegram and the backend sessions. type Worker(environment:IHostEnvironment, config:IConfiguration, logger:ILogger<Worker>) = inherit BackgroundService() | | | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | open Telegram.Bot.Types.Enums open Telegram.Bot.Types.ReplyMarkups /// Service worker implementing the interface between Telegram and the backend sessions. type Worker(environment:IHostEnvironment, config:IConfiguration, logger:ILogger<Worker>) = inherit BackgroundService() static let CommandPattern = Regex(@"^\s*((/[^@\s]+)(?:@(\S+))?)(?:\s+(.+))?\s*$", RegexOptions.CultureInvariant) static let SeparatorPattern = Regex(@"\s*,\s*", RegexOptions.CultureInvariant) static let splitCommand (me:User) (cmd:string) = let cmd, args = let it = CommandPattern.Match(cmd) if it.Success then if it.Groups.[3].Success && it.Groups.[3].Value = me.Username then it.Groups.[2].Value, it.Groups.[4].Value |
︙ | ︙ |