mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-15 19:32:31 +00:00
Refactor string checks and fix exception when exporting multiple channels
Fix #164
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
namespace DiscordChatExporter.Core.Models
|
||||
using Tyrrrz.Extensions;
|
||||
|
||||
namespace DiscordChatExporter.Core.Models
|
||||
{
|
||||
// https://discordapp.com/developers/docs/resources/guild#guild-object
|
||||
|
||||
@@ -28,7 +30,7 @@
|
||||
{
|
||||
public static string GetIconUrl(string id, string iconHash)
|
||||
{
|
||||
return iconHash != null
|
||||
return !iconHash.IsNullOrWhiteSpace()
|
||||
? $"https://cdn.discordapp.com/icons/{id}/{iconHash}.png"
|
||||
: "https://cdn.discordapp.com/embed/avatars/0.png";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user