/// <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 })); }
public static IReadOnlyList <DiscordMessage> GetChannelMessages(this DiscordClient client, ulong channelId, uint limit) { return(client.GetChannelMessagesAsync(channelId, limit).GetAwaiter().GetResult()); }
public static IReadOnlyList <DiscordMessage> GetChannelMessages(this DiscordClient client, ulong channelId, MessageFilters filters = null) { return(client.GetChannelMessagesAsync(channelId, filters).GetAwaiter().GetResult()); }