Browse Source

Change exception message

pull/1724/head
Paulo 4 years ago
parent
commit
51d31d0589
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Discord.Net.Rest/Entities/Messages/MessageHelper.cs

+ 1
- 1
src/Discord.Net.Rest/Entities/Messages/MessageHelper.cs View File

@@ -31,7 +31,7 @@ namespace Discord.Rest
func(args);

if (msg.Author.Id != client.CurrentUser.Id && (args.Content.IsSpecified || args.Embed.IsSpecified || args.AllowedMentions.IsSpecified))
throw new InvalidOperationException("Only the author of a message may modify the message content or allowed mentions.");
throw new InvalidOperationException("Only the author of a message may modify the message content, embed, or allowed mentions.");

bool hasText = args.Content.IsSpecified ? !string.IsNullOrEmpty(args.Content.Value) : !string.IsNullOrEmpty(msg.Content);
bool hasEmbed = args.Embed.IsSpecified ? args.Embed.Value != null : msg.Embeds.Any();


Loading…
Cancel
Save