Exposed RequestOptions

This commit is contained in:
RogueException
2016-10-06 02:44:41 -03:00
parent aa7d9ad414
commit f41df1f966
54 changed files with 793 additions and 766 deletions

View File

@@ -9,7 +9,7 @@ namespace Discord.WebSocket
internal static class SocketChannelHelper
{
public static IAsyncEnumerable<IReadOnlyCollection<IMessage>> GetMessagesAsync(SocketChannel channel, DiscordSocketClient discord, MessageCache messages,
ulong? fromMessageId, Direction dir, int limit, CacheMode mode)
ulong? fromMessageId, Direction dir, int limit, CacheMode mode, RequestOptions options)
{
IReadOnlyCollection<SocketMessage> cachedMessages;
IAsyncEnumerable<IReadOnlyCollection<IMessage>> result;
@@ -28,7 +28,7 @@ namespace Discord.WebSocket
fromMessageId = cachedMessages.Min(x => x.Id);
else
fromMessageId = cachedMessages.Max(x => x.Id);
var downloadedMessages = ChannelHelper.GetMessagesAsync(channel, discord, fromMessageId, dir, limit);
var downloadedMessages = ChannelHelper.GetMessagesAsync(channel, discord, fromMessageId, dir, limit, options);
return result.Concat(downloadedMessages);
}
public static IReadOnlyCollection<SocketMessage> GetCachedMessages(SocketChannel channel, DiscordSocketClient discord, MessageCache messages,