Exemplo n.º 1
0
 public static async Task <IReadOnlyList <DiscordMessage> > GetChannelMessagesAsync(this DiscordSocketClient client, ulong channelId, uint limit)
 {
     return(await client.GetChannelMessagesAsync(channelId, new MessageFilters()
     {
         Limit = limit
     }));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Gets a list of messages from a channel
 /// </summary>
 /// <param name="channelId">ID of the channel</param>
 /// <param name="limit">Max amount of messages to receive</param>
 public static IReadOnlyList <DiscordMessage> GetChannelMessages(this DiscordSocketClient client, ulong channelId, uint limit)
 {
     return(client.GetChannelMessagesAsync(channelId, limit).GetAwaiter().GetResult());
 }
Exemplo n.º 3
0
 /// <summary>
 /// Gets a list of messages from a channel.
 /// The list is ordered first -> last.
 /// </summary>
 /// <param name="channelId">ID of the channel</param>
 /// <param name="filters">Options for filtering out messages</param>
 public static IReadOnlyList <DiscordMessage> GetChannelMessages(this DiscordSocketClient client, ulong channelId, MessageFilters filters = null)
 {
     return(client.GetChannelMessagesAsync(channelId, filters).GetAwaiter().GetResult());
 }