using Discord.Rest;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
namespace Discord.WebSocket
{
///
/// Represents a generic WebSocket-based channel that can send and receive messages.
///
public interface ISocketMessageChannel : IMessageChannel
{
///
/// Gets all messages in this channel's cache.
///
///
/// A read-only collection of WebSocket-based messages.
///
IReadOnlyCollection CachedMessages { get; }
///
new Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null,
RequestOptions options = null, AllowedMentions allowedMentions = null, MessageReference messageReference = null,
MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null, MessageFlags flags = MessageFlags.None);
///
new Task SendFileAsync(string filePath, string text = null, bool isTTS = false, Embed embed = null,
RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null,
MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
Embed[] embeds = null, MessageFlags flags = MessageFlags.None);
///
new Task SendFileAsync(Stream stream, string filename, string text = null, bool isTTS = false,
Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null,
MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
Embed[] embeds = null, MessageFlags flags = MessageFlags.None);
///
new Task SendFileAsync(FileAttachment attachment, string text = null, bool isTTS = false,
Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null,
MessageReference messageReference = null, MessageComponent components = null, ISticker[] stickers = null,
Embed[] embeds = null, MessageFlags flags = MessageFlags.None);
///
new Task SendFilesAsync(IEnumerable attachments, string text = null,
bool isTTS = false, Embed embed = null, RequestOptions options = null,
AllowedMentions allowedMentions = null, MessageReference messageReference = null,
MessageComponent components = null, ISticker[] stickers = null, Embed[] embeds = null,
MessageFlags flags = MessageFlags.None);
///
/// Gets a cached message from this channel.
///
///
///
/// This method requires the use of cache, which is not enabled by default; if caching is not enabled,
/// this method will always return null. Please refer to
/// for more details.
///
///
/// This method retrieves the message from the local WebSocket cache and does not send any additional
/// request to Discord. This message may be a message that has been deleted.
///
///
/// The snowflake identifier of the message.
///
/// A WebSocket-based message object; null if it does not exist in the cache or if caching is not
/// enabled.
///
SocketMessage GetCachedMessage(ulong id);
///
/// Gets the last N cached messages from this message channel.
///
///
///
/// This method requires the use of cache, which is not enabled by default; if caching is not enabled,
/// this method will always return an empty collection. Please refer to
/// for more details.
///
///
/// This method retrieves the message(s) from the local WebSocket cache and does not send any additional
/// request to Discord. This read-only collection may include messages that have been deleted. The
/// maximum number of messages that can be retrieved from this method depends on the
/// set.
///
///
/// The number of messages to get.
///
/// A read-only collection of WebSocket-based messages.
///
IReadOnlyCollection GetCachedMessages(int limit = DiscordConfig.MaxMessagesPerBatch);
///
/// Gets the last N cached messages starting from a certain message in this message channel.
///
///
///
/// This method requires the use of cache, which is not enabled by default; if caching is not enabled,
/// this method will always return an empty collection. Please refer to
/// for more details.
///
///
/// This method retrieves the message(s) from the local WebSocket cache and does not send any additional
/// request to Discord. This read-only collection may include messages that have been deleted. The
/// maximum number of messages that can be retrieved from this method depends on the
/// set.
///
///
/// The message ID to start the fetching from.
/// The direction of which the message should be gotten from.
/// The number of messages to get.
///
/// A read-only collection of WebSocket-based messages.
///
IReadOnlyCollection GetCachedMessages(ulong fromMessageId, Direction dir, int limit = DiscordConfig.MaxMessagesPerBatch);
///
/// Gets the last N cached messages starting from a certain message in this message channel.
///
///
///
/// This method requires the use of cache, which is not enabled by default; if caching is not enabled,
/// this method will always return an empty collection. Please refer to
/// for more details.
///
///
/// This method retrieves the message(s) from the local WebSocket cache and does not send any additional
/// request to Discord. This read-only collection may include messages that have been deleted. The
/// maximum number of messages that can be retrieved from this method depends on the
/// set.
///
///
/// The message to start the fetching from.
/// The direction of which the message should be gotten from.
/// The number of messages to get.
///
/// A read-only collection of WebSocket-based messages.
///
IReadOnlyCollection GetCachedMessages(IMessage fromMessage, Direction dir, int limit = DiscordConfig.MaxMessagesPerBatch);
///
/// Gets a read-only collection of pinned messages in this channel.
///
///
/// This method follows the same behavior as described in .
/// Please visit its documentation for more details on this method.
///
/// The options to be used when sending the request.
///
/// A task that represents the asynchronous get operation for retrieving pinned messages in this channel.
/// The task result contains a read-only collection of messages found in the pinned messages.
///
new Task> GetPinnedMessagesAsync(RequestOptions options = null);
}
}