Skip to content

Commit 75e94fe

Browse files
authored
Add IEnumerable collection parameters instead of arrays for MessageExtensions (#2079)
1 parent 0a672ad commit 75e94fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Discord.Net.Core/Extensions/MessageExtensions.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Collections.Generic;
12
using System.Threading.Tasks;
23

34
namespace Discord
@@ -41,7 +42,7 @@ public static string GetJumpUrl(this IMessage msg)
4142
/// </returns>
4243
/// <seealso cref="IMessage.AddReactionAsync(IEmote, RequestOptions)"/>
4344
/// <seealso cref="IEmote"/>
44-
public static async Task AddReactionsAsync(this IUserMessage msg, IEmote[] reactions, RequestOptions options = null)
45+
public static async Task AddReactionsAsync(this IUserMessage msg, IEnumerable<IEmote> reactions, RequestOptions options = null)
4546
{
4647
foreach (var rxn in reactions)
4748
await msg.AddReactionAsync(rxn, options).ConfigureAwait(false);
@@ -67,7 +68,7 @@ public static async Task AddReactionsAsync(this IUserMessage msg, IEmote[] react
6768
/// </returns>
6869
/// <seealso cref="IMessage.RemoveReactionAsync(IEmote, IUser, RequestOptions)"/>
6970
/// <seealso cref="IEmote"/>
70-
public static async Task RemoveReactionsAsync(this IUserMessage msg, IUser user, IEmote[] reactions, RequestOptions options = null)
71+
public static async Task RemoveReactionsAsync(this IUserMessage msg, IUser user, IEnumerable<IEmote> reactions, RequestOptions options = null)
7172
{
7273
foreach (var rxn in reactions)
7374
await msg.RemoveReactionAsync(rxn, user, options).ConfigureAwait(false);

0 commit comments

Comments
 (0)