Interface ISocketMessageChannel
Assembly: cs.temp.dll.dll
Syntax
public interface ISocketMessageChannel : IMessageChannel, IChannel, ISnowflakeEntity, IEntity<ulong>
Properties
CachedMessages
Gets all messages in this channel's cache.
Declaration
IReadOnlyCollection<SocketMessage> CachedMessages { get; }
Property Value
Methods
GetCachedMessage(UInt64)
Declaration
SocketMessage GetCachedMessage(ulong id)
Parameters
Type |
Name |
Description |
System.UInt64 |
id |
|
Returns
GetCachedMessages(IMessage, Direction, Int32)
Gets a collection of messages in this channel.
Declaration
IReadOnlyCollection<SocketMessage> GetCachedMessages(IMessage fromMessage, Direction dir, int limit = 100)
Parameters
Returns
GetCachedMessages(Int32)
Gets the last N messages from this message channel.
Declaration
IReadOnlyCollection<SocketMessage> GetCachedMessages(int limit = 100)
Parameters
Type |
Name |
Description |
System.Int32 |
limit |
|
Returns
GetCachedMessages(UInt64, Direction, Int32)
Gets a collection of messages in this channel.
Declaration
IReadOnlyCollection<SocketMessage> GetCachedMessages(ulong fromMessageId, Direction dir, int limit = 100)
Parameters
Type |
Name |
Description |
System.UInt64 |
fromMessageId |
|
Direction |
dir |
|
System.Int32 |
limit |
|
Returns
GetPinnedMessagesAsync(RequestOptions)
Gets a collection of pinned messages in this channel.
Declaration
Task<IReadOnlyCollection<RestMessage>> GetPinnedMessagesAsync(RequestOptions options = null)
Parameters
Returns
Type |
Description |
Task<IReadOnlyCollection<RestMessage>> |
|
SendFileAsync(Stream, String, String, Boolean, RequestOptions)
Sends a file to this text channel, with an optional caption.
Declaration
Task<RestUserMessage> SendFileAsync(Stream stream, string filename, string text = null, bool isTTS = false, RequestOptions options = null)
Parameters
Type |
Name |
Description |
Stream |
stream |
|
System.String |
filename |
|
System.String |
text |
|
System.Boolean |
isTTS |
|
RequestOptions |
options |
|
Returns
Type |
Description |
Task<RestUserMessage> |
|
SendMessageAsync(String, Boolean, Embed, RequestOptions)
Sends a message to this message channel.
Declaration
Task<RestUserMessage> SendMessageAsync(string text, bool isTTS = false, Embed embed = null, RequestOptions options = null)
Parameters
Type |
Name |
Description |
System.String |
text |
|
System.Boolean |
isTTS |
|
Embed |
embed |
|
RequestOptions |
options |
|
Returns
Type |
Description |
Task<RestUserMessage> |
|