コード例 #1
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 async Task <IReadOnlyList <DiscordMessage> > GetChannelMessagesAsync(this DiscordClient client, ulong channelId, uint limit)
 {
     return(await client.GetChannelMessagesAsync(channelId, new MessageFilters()
     {
         Limit = limit
     }));
 }
コード例 #2
0
 public static IReadOnlyList <DiscordMessage> GetChannelMessages(this DiscordClient client, ulong channelId, uint limit)
 {
     return(client.GetChannelMessagesAsync(channelId, limit).GetAwaiter().GetResult());
 }
コード例 #3
0
 public static IReadOnlyList <DiscordMessage> GetChannelMessages(this DiscordClient client, ulong channelId, MessageFilters filters = null)
 {
     return(client.GetChannelMessagesAsync(channelId, filters).GetAwaiter().GetResult());
 }