diff --git a/src/Discord.Net/DiscordAPIClient.cs b/src/Discord.Net/DiscordAPIClient.cs index 6614eefbf..438f4edf7 100644 --- a/src/Discord.Net/DiscordAPIClient.cs +++ b/src/Discord.Net/DiscordAPIClient.cs @@ -173,12 +173,12 @@ namespace Discord } //Messages - public Task SendMessage(string channelId, string message, string[] mentions = null, string nonce = null, bool isTTS = false) + public Task SendMessage(string channelId, string message, string[] mentionedUserIds = null, string nonce = null, bool isTTS = false) { if (channelId == null) throw new ArgumentNullException(nameof(channelId)); if (message == null) throw new ArgumentNullException(nameof(message)); - var request = new SendMessageRequest { Content = message, Mentions = mentions ?? new string[0], Nonce = nonce, IsTTS = isTTS ? true : false }; + var request = new SendMessageRequest { Content = message, Mentions = mentionedUserIds ?? new string[0], Nonce = nonce, IsTTS = isTTS ? true : false }; return _rest.Post(Endpoints.ChannelMessages(channelId), request); } public Task SendFile(string channelId, string filePath) diff --git a/src/Discord.Net/DiscordClient.API.cs b/src/Discord.Net/DiscordClient.API.cs index 2f9f7ca53..b5620af6f 100644 --- a/src/Discord.Net/DiscordClient.API.cs +++ b/src/Discord.Net/DiscordClient.API.cs @@ -297,28 +297,28 @@ namespace Discord //Messages /// Sends a message to the provided channel, optionally mentioning certain users. /// While not required, it is recommended to include a mention reference in the text (see User.Mention). - public Task SendMessage(Channel channel, string text, params string[] mentions) - => SendMessage(channel, text, mentions, false); + public Task SendMessage(Channel channel, string text, params string[] mentionedUserIds) + => SendMessage(channel, text, mentionedUserIds, false); /// Sends a message to the provided channel, optionally mentioning certain users. /// While not required, it is recommended to include a mention reference in the text (see User.Mention). - public Task SendMessage(string channelId, string text, params string[] mentions) - => SendMessage(_channels[channelId], text, mentions, false); + public Task SendMessage(string channelId, string text, params string[] mentionedUserIds) + => SendMessage(_channels[channelId], text, mentionedUserIds, false); /// Sends a message to the provided channel, optionally mentioning certain users. /// While not required, it is recommended to include a mention reference in the text (see User.Mention). - public Task SendTTSMessage(Channel channel, string text, params string[] mentions) - => SendMessage(channel, text, mentions, true); + public Task SendTTSMessage(Channel channel, string text, params string[] mentionedUserIds) + => SendMessage(channel, text, mentionedUserIds, true); /// Sends a message to the provided channel, optionally mentioning certain users. /// While not required, it is recommended to include a mention reference in the text (see User.Mention). - public Task SendTTSMessage(string channelId, string text, params string[] mentions) - => SendMessage(_channels[channelId], text, mentions, true); + public Task SendTTSMessage(string channelId, string text, params string[] mentionedUserIds) + => SendMessage(_channels[channelId], text, mentionedUserIds, true); /// Sends a message to the provided channel, optionally mentioning certain users. /// While not required, it is recommended to include a mention reference in the text (see User.Mention). - private async Task SendMessage(Channel channel, string text, string[] mentions, bool isTextToSpeech) + private async Task SendMessage(Channel channel, string text, string[] mentionedUserIds, bool isTextToSpeech) { CheckReady(); if (channel == null) throw new ArgumentNullException(nameof(channel)); if (text == null) throw new ArgumentNullException(nameof(text)); - mentions = mentions ?? new string[0]; + mentionedUserIds = mentionedUserIds ?? new string[0]; int blockCount = (int)Math.Ceiling(text.Length / (double)MaxMessageSize); Message[] result = new Message[blockCount]; @@ -346,7 +346,7 @@ namespace Discord } else { - var model = await _api.SendMessage(channel.Id, blockText, mentions, nonce, isTextToSpeech).ConfigureAwait(false); + var model = await _api.SendMessage(channel.Id, blockText, mentionedUserIds, nonce, isTextToSpeech).ConfigureAwait(false); var msg = _messages.GetOrAdd(model.Id, channel.Id, model.Author.Id); msg.Update(model); RaiseMessageSent(msg);