Fix Build Errors
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
using System.Linq;
|
||||
using ArgumentException = System.ArgumentException;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Discord;
|
||||
using DSharpPlus.Entities;
|
||||
|
||||
using NodaTime;
|
||||
|
||||
@@ -88,9 +89,14 @@ namespace PluralKit.Bot
|
||||
stringToAdd =
|
||||
$"**{membersStr}** ({DateTimeFormats.ZonedDateTimeFormat.Format(sw.Timestamp.InZone(system.Zone))}, {DateTimeFormats.DurationFormat.Format(switchSince)} ago)\n";
|
||||
}
|
||||
|
||||
if (outputStr.Length + stringToAdd.Length > EmbedBuilder.MaxDescriptionLength) break;
|
||||
outputStr += stringToAdd;
|
||||
try // Unfortunately the only way to test DiscordEmbedBuilder.Description max length is this
|
||||
{
|
||||
builder.Description += stringToAdd;
|
||||
}
|
||||
catch (ArgumentException)
|
||||
{
|
||||
break;
|
||||
}// TODO: Make sure this works
|
||||
}
|
||||
|
||||
builder.Description = outputStr;
|
||||
|
Reference in New Issue
Block a user