mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-14 15:53:30 -07:00
Clean up formatting
This commit is contained in:
parent
9601e0acea
commit
ccdf082689
|
|
@ -67,16 +67,14 @@ public partial record Channel
|
|||
var name =
|
||||
// Guild channel
|
||||
json.GetPropertyOrNull("name")?.GetNonWhiteSpaceStringOrNull()
|
||||
??
|
||||
// DM channel
|
||||
json.GetPropertyOrNull("recipients")
|
||||
?? json.GetPropertyOrNull("recipients")
|
||||
?.EnumerateArrayOrNull()
|
||||
?.Select(User.Parse)
|
||||
.Select(u => u.DisplayName)
|
||||
.Pipe(s => string.Join(", ", s))
|
||||
??
|
||||
// Fallback
|
||||
id.ToString();
|
||||
?? id.ToString();
|
||||
|
||||
var position = positionHint ?? json.GetPropertyOrNull("position")?.GetInt32OrNull();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue