Files
Discord.Net/src/Discord.Net.WebSocket/Entities/Channels/ISocketMessageChannel.cs
Hawx bbbac85c46 Update Dependencies and support NS2.0 builds (#1046)
* Update deps, fix test warnings.

* Support ns2.0

* Fix typo

* Remove ns1.1 support

* Net.Http and Net.Websockets.Client are not needed in ns2.0

* Move to net46 per volt

* Remove ns1.3 constants
2018-05-25 08:14:28 -04:00

32 lines
1.9 KiB
C#

using Discord.Rest;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
namespace Discord.WebSocket
{
public interface ISocketMessageChannel : IMessageChannel
{
/// <summary> Gets all messages in this channel's cache. </summary>
IReadOnlyCollection<SocketMessage> CachedMessages { get; }
/// <summary> Sends a message to this message channel. </summary>
new Task<RestUserMessage> SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null);
/// <summary> Sends a file to this text channel, with an optional caption. </summary>
new Task<RestUserMessage> SendFileAsync(string filePath, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null);
/// <summary> Sends a file to this text channel, with an optional caption. </summary>
new Task<RestUserMessage> SendFileAsync(Stream stream, string filename, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null);
SocketMessage GetCachedMessage(ulong id);
/// <summary> Gets the last N messages from this message channel. </summary>
IReadOnlyCollection<SocketMessage> GetCachedMessages(int limit = DiscordConfig.MaxMessagesPerBatch);
/// <summary> Gets a collection of messages in this channel. </summary>
IReadOnlyCollection<SocketMessage> GetCachedMessages(ulong fromMessageId, Direction dir, int limit = DiscordConfig.MaxMessagesPerBatch);
/// <summary> Gets a collection of messages in this channel. </summary>
IReadOnlyCollection<SocketMessage> GetCachedMessages(IMessage fromMessage, Direction dir, int limit = DiscordConfig.MaxMessagesPerBatch);
/// <summary> Gets a collection of pinned messages in this channel. </summary>
new Task<IReadOnlyCollection<RestMessage>> GetPinnedMessagesAsync(RequestOptions options = null);
}
}