mirror of
https://github.com/RPCS3/discord-bot.git
synced 2025-03-03 23:37:03 +00:00
allow decoding product codes without numbers again
This commit is contained in:
parent
9be3dfe0c2
commit
02b7a973e1
@ -450,8 +450,9 @@ namespace CompatBot.Commands
|
||||
[Description("Describe Playstation product code")]
|
||||
public async Task ProductCode(CommandContext ctx, [RemainingText, Description("Product code such as BLUS12345 or SCES")] string productCode)
|
||||
{
|
||||
productCode = ProductCodeLookup.GetProductIds(productCode).FirstOrDefault()?.ToUpperInvariant();
|
||||
if (productCode?.Length > 4)
|
||||
productCode = ProductCodeLookup.GetProductIds(productCode).FirstOrDefault() ?? productCode;
|
||||
productCode = productCode?.ToUpperInvariant();
|
||||
if (productCode?.Length > 3)
|
||||
{
|
||||
var dsc = ProductCodeDecoder.Decode(productCode);
|
||||
var info = string.Join('\n', dsc);
|
||||
|
Loading…
x
Reference in New Issue
Block a user