zaanposni / discord-masz

MASZ is a selfhostable highly sophisticated moderation bot for Discord. Includes a web dashboard and a discord bot.
https://discord.gg/5zjpzw6h3S
Other
72 stars 17 forks source link

too many attachments automod webhook fails #539

Closed zaanposni closed 2 years ago

zaanposni commented 2 years ago

if there is no message content, the generated embed is invalid, thus the internal webhook fails

Error while announcing automod event 

Field value must not be null or empty. (Parameter 'Value')
   at Discord.EmbedFieldBuilder.set_Value(Object value)
   at Discord.EmbedBuilder.AddField(String name, Object value, Boolean inline)
   at MASZ.Services.EmbedCreator.CreateInternalAutomodEmbed(AutoModerationEvent autoModerationEvent, GuildConfig guildConfig, IUser user, ITextChannel channel, IServiceProvider provider, Nullable`1 punishmentType) in /app/MASZ/Exceptions/EmbedCreator.cs:line 331
   at MASZ.Services.DiscordAnnouncer.AnnounceAutomoderation(AutoModerationEvent modEvent, AutoModerationConfig moderationConfig, GuildConfig guildConfig, ITextChannel channel, IUser author) in /app/MASZ/Services/DiscordAnnouncer.cs:line 338
zaanposni commented 2 years ago

fixed in release branch