Fix importing brackets from Tupperbox. Closes #123
This commit is contained in:
parent
c4d28f64c7
commit
4ce4efcc61
@ -307,8 +307,8 @@ namespace PluralKit.Bot
|
||||
AvatarUrl = AvatarUrl,
|
||||
Birthday = Birthday,
|
||||
Description = Description,
|
||||
Prefix = Brackets.FirstOrDefault(),
|
||||
Suffix = Brackets.Skip(1).FirstOrDefault() // TODO: can Tupperbox members have no proxies at all?
|
||||
Prefix = Brackets.FirstOrDefault().NullIfEmpty(),
|
||||
Suffix = Brackets.Skip(1).FirstOrDefault().NullIfEmpty() // TODO: can Tupperbox members have no proxies at all?
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -246,6 +246,11 @@ namespace PluralKit
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
public static string NullIfEmpty(this string input)
|
||||
{
|
||||
return input.Trim().Length == 0 ? null : input;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Emojis {
|
||||
|
Loading…
Reference in New Issue
Block a user