You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

IRestMessageChannel.cs 2.1 kB

12345678910111213141516171819202122232425262728
  1. using System.Collections.Generic;
  2. using System.IO;
  3. using System.Threading.Tasks;
  4. namespace Discord.Rest
  5. {
  6. public interface IRestMessageChannel : IMessageChannel
  7. {
  8. /// <summary> Sends a message to this message channel. </summary>
  9. new Task<RestUserMessage> SendMessageAsync(string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null);
  10. /// <summary> Sends a file to this text channel, with an optional caption. </summary>
  11. new Task<RestUserMessage> SendFileAsync(string filePath, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null);
  12. /// <summary> Sends a file to this text channel, with an optional caption. </summary>
  13. new Task<RestUserMessage> SendFileAsync(Stream stream, string filename, string text = null, bool isTTS = false, Embed embed = null, RequestOptions options = null);
  14. /// <summary> Gets a message from this message channel with the given id, or null if not found. </summary>
  15. Task<RestMessage> GetMessageAsync(ulong id, RequestOptions options = null);
  16. /// <summary> Gets the last N messages from this message channel. </summary>
  17. IAsyncEnumerable<IReadOnlyCollection<RestMessage>> GetMessagesAsync(int limit = DiscordConfig.MaxMessagesPerBatch, RequestOptions options = null);
  18. /// <summary> Gets a collection of messages in this channel. </summary>
  19. IAsyncEnumerable<IReadOnlyCollection<RestMessage>> GetMessagesAsync(ulong fromMessageId, Direction dir, int limit = DiscordConfig.MaxMessagesPerBatch, RequestOptions options = null);
  20. /// <summary> Gets a collection of messages in this channel. </summary>
  21. IAsyncEnumerable<IReadOnlyCollection<RestMessage>> GetMessagesAsync(IMessage fromMessage, Direction dir, int limit = DiscordConfig.MaxMessagesPerBatch, RequestOptions options = null);
  22. /// <summary> Gets a collection of pinned messages in this channel. </summary>
  23. new Task<IReadOnlyCollection<RestMessage>> GetPinnedMessagesAsync(RequestOptions options = null);
  24. }
  25. }