using System.Collections.Generic; using System.IO; using System.Threading.Tasks; namespace Discord.Rest { /// /// Represents a REST-based channel that can send and receive messages. /// public interface IRestMessageChannel : IMessageChannel { /// /// Sends a message to this message channel. /// /// /// This method follows the same behavior as described in . /// Please visit its documentation for more details on this method. /// /// The message to be sent. /// Determines whether the message should be read aloud by Discord or not. /// The to be sent. /// The options to be used when sending the request. /// /// Specifies if notifications are sent for mentioned users and roles in the message . /// If null, all mentioned roles and users will be notified. /// /// /// A task that represents an asynchronous send operation for delivering the message. The task result /// contains the sent message. /// new Task SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, AllowedMentions allowedMentions = null); /// /// Sends a file to this message channel with an optional caption. /// /// /// This method follows the same behavior as described in /// . Please visit /// its documentation for more details on this method. /// /// The file path of the file. /// The message to be sent. /// Whether the message should be read aloud by Discord or not. /// The to be sent. /// The options to be used when sending the request. /// Whether the message attachment should be hidden as a spoiler. /// /// Specifies if notifications are sent for mentioned users and roles in the message . /// If null, all mentioned roles and users will be notified. /// /// /// A task that represents an asynchronous send operation for delivering the message. The task result /// contains the sent message. /// new Task SendFileAsync(string filePath, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null, bool isSpoiler = false, AllowedMentions allowedMentions = null); /// /// Sends a file to this message channel with an optional caption. /// /// /// This method follows the same behavior as described in . /// Please visit its documentation for more details on this method. /// /// The of the file to be sent. /// The name of the attachment. /// The message to be sent. /// Whether the message should be read aloud by Discord or not. /// The to be sent. /// The options to be used when sending the request. /// Whether the message attachment should be hidden as a spoiler. /// /// Specifies if notifications are sent for mentioned users and roles in the message . /// If null, all mentioned roles and users will be notified. /// /// /// A task that represents an asynchronous send operation for delivering the message. The task result /// contains the sent message. /// 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); /// /// Gets a message from this message channel. /// /// /// This method follows the same behavior as described in . /// Please visit its documentation for more details on this method. /// /// The snowflake identifier of the message. /// The options to be used when sending the request. /// /// A task that represents an asynchronous get operation for retrieving the message. The task result contains /// the retrieved message; null if no message is found with the specified identifier. /// Task GetMessageAsync(ulong id, RequestOptions options = null); /// /// Gets the last N messages from this message channel. /// /// /// This method follows the same behavior as described in . /// Please visit its documentation for more details on this method. /// /// The numbers of message to be gotten from. /// The options to be used when sending the request. /// /// Paged collection of messages. /// IAsyncEnumerable> GetMessagesAsync(int limit = DiscordConfig.MaxMessagesPerBatch, RequestOptions options = null); /// /// Gets a collection of messages in this channel. /// /// /// This method follows the same behavior as described in . /// Please visit its documentation for more details on this method. /// /// The ID of the starting message to get the messages from. /// The direction of the messages to be gotten from. /// The numbers of message to be gotten from. /// The options to be used when sending the request. /// /// Paged collection of messages. /// IAsyncEnumerable> GetMessagesAsync(ulong fromMessageId, Direction dir, int limit = DiscordConfig.MaxMessagesPerBatch, RequestOptions options = null); /// /// Gets a collection of messages in this channel. /// /// /// This method follows the same behavior as described in . /// Please visit its documentation for more details on this method. /// /// The starting message to get the messages from. /// The direction of the messages to be gotten from. /// The numbers of message to be gotten from. /// The options to be used when sending the request. /// /// Paged collection of messages. /// IAsyncEnumerable> GetMessagesAsync(IMessage fromMessage, Direction dir, int limit = DiscordConfig.MaxMessagesPerBatch, RequestOptions options = null); /// /// Gets a 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 collection of messages found in the pinned messages. /// new Task> GetPinnedMessagesAsync(RequestOptions options = null); } }