Class RevoltClientChannels
Assembly: Revolt.Net.dll​
View Source​
Declaration
public class RevoltClientChannels
Properties​
Client​
View Source​
Declaration
public RevoltClient Client { get; }
Methods​
Get(String)​
Gets a channel from cache by id, if not cached, fetches it.
View Source​
Declaration
public Channel Get(string id)
Returns​
Parameters​
| Type | Name |
|---|---|
System.String | id |
GetCached(String)​
View Source​
Declaration
public Channel GetCached(string id)
Returns​
Parameters​
| Type | Name |
|---|---|
System.String | id |
SendMessageAsync(String, String, List<String>, MessageReply[], MessageMasquerade)​
View Source​
Declaration
public Task<SelfMessage> SendMessageAsync(string channelId, string content, List<string> attachmentIds = null, MessageReply[] replies = null, MessageMasquerade mask = null)
Returns​
System.Threading.Tasks.Task<Revolt.SelfMessage>
Parameters​
| Type | Name |
|---|---|
System.String | channelId |
System.String | content |
System.Collections.Generic.List<System.String> | attachmentIds |
Revolt.MessageReply[] | replies |
| Revolt.MessageMasquerade | mask |
BeginTypingAsync(String)​
View Source​
Declaration
public Task BeginTypingAsync(string channelId)
Returns​
System.Threading.Tasks.Task
Parameters​
| Type | Name |
|---|---|
System.String | channelId |
EndTypingAsync(String)​
View Source​
Declaration
public Task EndTypingAsync(string channelId)
Returns​
System.Threading.Tasks.Task
Parameters​
| Type | Name |
|---|---|
System.String | channelId |
LeaveAsync(String)​
Closes DM channel or leaves group channel
View Source​
Declaration
public Task LeaveAsync(string channelId)
Returns​
System.Threading.Tasks.Task
Parameters​
| Type | Name |
|---|---|
System.String | channelId |
AddGroupMemberAsync(String, String)​
View Source​
Declaration
public Task AddGroupMemberAsync(string channelId, string userId)
Returns​
System.Threading.Tasks.Task
Parameters​
| Type | Name |
|---|---|
System.String | channelId |
System.String | userId |
RemoveGroupMemberAsync(String, String)​
View Source​
Declaration
public Task RemoveGroupMemberAsync(string channelId, string userId)
Returns​
System.Threading.Tasks.Task
Parameters​
| Type | Name |
|---|---|
System.String | channelId |
System.String | userId |
EditMessageAsync(String, String, String)​
View Source​
Declaration
public Task EditMessageAsync(string channelId, string messageId, string newContent)
Returns​
System.Threading.Tasks.Task
Parameters​
| Type | Name |
|---|---|
System.String | channelId |
System.String | messageId |
System.String | newContent |
DeleteMessageAsync(String, String)​
View Source​
Declaration
public Task DeleteMessageAsync(string channelId, string id)
Returns​
System.Threading.Tasks.Task
Parameters​
| Type | Name |
|---|---|
System.String | channelId |
System.String | id |
GetMessagesAsync(String, Int32, String, String, MessageSort)​
View Source​
Declaration
public async Task<Message[]> GetMessagesAsync(string channelId, int limit, string before = null, string after = null, MessageSort sort = MessageSort.Latest)
Returns​
System.Threading.Tasks.Task<Revolt.Message[]>
Parameters​
| Type | Name |
|---|---|
System.String | channelId |
System.Int32 | limit |
System.String | before |
System.String | after |
| Revolt.MessageSort | sort |
GetMembersAsync(String)​
View Source​
Declaration
public async Task<User[]> GetMembersAsync(string id)
Returns​
System.Threading.Tasks.Task<Revolt.User[]>
Parameters​
| Type | Name |
|---|---|
System.String | id |