Discore
Show / Hide Table of Contents

Method GetChannelMessage

| Improve this Doc View Source

GetChannelMessage(Snowflake, Snowflake)

Gets a single message by ID from a channel.

Requires ReadMessageHistory.

Declaration
public Task<DiscordMessage> GetChannelMessage(Snowflake channelId, Snowflake messageId)
Parameters
Type Name Description
Snowflake channelId
Snowflake messageId
Returns
Type Description
Task<DiscordMessage>
Exceptions
Type Condition
DiscordHttpApiException
| Improve this Doc View Source

GetChannelMessage(ITextChannel, Snowflake)

Gets a single message by ID from a channel.

Requires ReadMessageHistory.

Declaration
public Task<DiscordMessage> GetChannelMessage(ITextChannel channel, Snowflake messageId)
Parameters
Type Name Description
ITextChannel channel
Snowflake messageId
Returns
Type Description
Task<DiscordMessage>
Exceptions
Type Condition
ArgumentNullException
DiscordHttpApiException
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX