updating msg for rankCheck for proper null detection of discordId
This commit is contained in:
parent
59525c4c63
commit
082e7a0741
@ -28,6 +28,8 @@ namespace ChaosBot.Discord.Modules.Admin
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
await Context.Channel.TriggerTypingAsync();
|
||||||
|
|
||||||
List<LodestoneRank> ranks = await GetRank();
|
List<LodestoneRank> ranks = await GetRank();
|
||||||
|
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
@ -44,7 +46,7 @@ namespace ChaosBot.Discord.Modules.Admin
|
|||||||
foreach (var lsID in ranks.FindAll(x => x.IngameRole == ERole.Recruit))
|
foreach (var lsID in ranks.FindAll(x => x.IngameRole == ERole.Recruit))
|
||||||
{
|
{
|
||||||
if ((lsID.ShouldBeRole != lsID.IngameRole) && (lsID.ShouldBeRole != null))
|
if ((lsID.ShouldBeRole != lsID.IngameRole) && (lsID.ShouldBeRole != null))
|
||||||
sb.AppendLine(string.Format("{0} {1}", lsID.DisplayName, $"linked to <@{lsID.DiscordId}>"));
|
sb.AppendLine(string.Format("{0} {1}", lsID.DisplayName, (lsID.DiscordId != null ? $"linked to <@{lsID.DiscordId}>)" : "")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -57,7 +59,7 @@ namespace ChaosBot.Discord.Modules.Admin
|
|||||||
foreach (var lsID in ranks.FindAll(x => x.IngameRole == ERole.Initiate))
|
foreach (var lsID in ranks.FindAll(x => x.IngameRole == ERole.Initiate))
|
||||||
{
|
{
|
||||||
if ((lsID.ShouldBeRole != lsID.IngameRole) && (lsID.ShouldBeRole != null))
|
if ((lsID.ShouldBeRole != lsID.IngameRole) && (lsID.ShouldBeRole != null))
|
||||||
sb.AppendLine(string.Format("{0} {1}", lsID.DisplayName, $"linked to <@{lsID.DiscordId}>"));
|
sb.AppendLine(string.Format("{0} {1}", lsID.DisplayName, (lsID.DiscordId != null ? $"linked to <@{lsID.DiscordId}>)" : "")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user