Discore
Show / Hide Table of Contents

Method GetChannelMessages

| Improve this Doc View Source

GetChannelMessages(Snowflake, Snowflake?, int?, MessageGetStrategy)

Gets messages from a text channel.

Requires ReadMessages.

Declaration
public Task<IReadOnlyList<DiscordMessage>> GetChannelMessages(Snowflake channelId, Snowflake? baseMessageId = null, int? limit = null, MessageGetStrategy getStrategy = MessageGetStrategy.Before)
Parameters
Type Name Description
Snowflake channelId
Snowflake? baseMessageId
int? limit
MessageGetStrategy getStrategy
Returns
Type Description
Task<IReadOnlyList<DiscordMessage>>
Exceptions
Type Condition
DiscordHttpApiException
| Improve this Doc View Source

GetChannelMessages(ITextChannel, Snowflake?, int?, MessageGetStrategy)

Gets messages from a text channel.

Requires ReadMessages.

Declaration
public Task<IReadOnlyList<DiscordMessage>> GetChannelMessages(ITextChannel channel, Snowflake? baseMessageId = null, int? limit = null, MessageGetStrategy getStrategy = MessageGetStrategy.Before)
Parameters
Type Name Description
ITextChannel channel
Snowflake? baseMessageId
int? limit
MessageGetStrategy getStrategy
Returns
Type Description
Task<IReadOnlyList<DiscordMessage>>
Exceptions
Type Condition
ArgumentNullException
DiscordHttpApiException
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX