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,
|
AvatarUrl = AvatarUrl,
|
||||||
Birthday = Birthday,
|
Birthday = Birthday,
|
||||||
Description = Description,
|
Description = Description,
|
||||||
Prefix = Brackets.FirstOrDefault(),
|
Prefix = Brackets.FirstOrDefault().NullIfEmpty(),
|
||||||
Suffix = Brackets.Skip(1).FirstOrDefault() // TODO: can Tupperbox members have no proxies at all?
|
Suffix = Brackets.Skip(1).FirstOrDefault().NullIfEmpty() // TODO: can Tupperbox members have no proxies at all?
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -246,6 +246,11 @@ namespace PluralKit
|
|||||||
yield break;
|
yield break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string NullIfEmpty(this string input)
|
||||||
|
{
|
||||||
|
return input.Trim().Length == 0 ? null : input;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Emojis {
|
public static class Emojis {
|
||||||
|
Loading…
Reference in New Issue
Block a user