#include <TextChannel.h>
|
enum | Type {
GUILD_TEXT = 0
, DM = 1
, GUILD_VOICE = 2
, GROUP_DM = 3
,
GUILD_CATEGORY = 4
, GUILD_NEWS = 5
, GUILD_NEWS_THREAD = 10
, GUILD_PUBLIC_THREAD = 11
,
GUILD_PRIVATE_THREAD = 12
, GUILD_STAGE_VOICE = 13
, GUILD_DIRECTORY = 14
, GUILD_FORUM = 15
} |
|
std::string | get_token () const |
|
json | api_call (const std::string &url, const std::string &method="GET", const json &data=json(), const std::string &content_type="", const bool cache=true) |
| helper function to communicate with the http api
|
|
◆ TextChannel() [1/4]
DiscordCPP::TextChannel::TextChannel |
( |
const json & | data, |
|
|
const std::string & | token ) |
◆ TextChannel() [2/4]
DiscordCPP::TextChannel::TextChannel |
( |
const std::string & | id, |
|
|
const std::string & | token ) |
◆ TextChannel() [3/4]
DiscordCPP::TextChannel::TextChannel |
( |
const std::string & | token | ) |
|
|
explicit |
◆ TextChannel() [4/4]
DiscordCPP::TextChannel::TextChannel |
( |
| ) |
|
|
default |
◆ _set_last_message_id()
void DiscordCPP::TextChannel::_set_last_message_id |
( |
std::string | message_id | ) |
|
|
inline |
◆ _set_last_pin_timestamp()
void DiscordCPP::TextChannel::_set_last_pin_timestamp |
( |
std::string | timestamp | ) |
|
|
inline |
◆ delete_messages()
void DiscordCPP::TextChannel::delete_messages |
( |
const std::vector< std::shared_ptr< Message > > & | messages | ) |
|
Delete multiple messages from this channel.
- Parameters
-
[in] | messages | vector containing the messages to delete |
- Exceptions
-
◆ get_last_message_id()
std::string DiscordCPP::TextChannel::get_last_message_id |
( |
| ) |
|
|
inline |
- Returns
- The id of the last message
◆ get_last_pin_timestamp()
std::string DiscordCPP::TextChannel::get_last_pin_timestamp |
( |
| ) |
|
|
inline |
- Returns
- When the last message was pinned
◆ get_rate_limit_per_user()
int DiscordCPP::TextChannel::get_rate_limit_per_user |
( |
| ) |
|
|
inline |
- Returns
- Amount of seconds a User has to wait before sending another message(0-120).
◆ get_topic()
std::string DiscordCPP::TextChannel::get_topic |
( |
| ) |
|
|
inline |
- Returns
- The topic of the channel
◆ history()
std::vector< std::shared_ptr< DiscordCPP::Message > > DiscordCPP::TextChannel::history |
( |
const int | limit = 100, |
|
|
const std::string & | before = "", |
|
|
const std::string & | after = "", |
|
|
const std::string & | around = "" ) |
Get messages from channel history.
- Parameters
-
[in] | limit | Max number of messages to retrieve (1-100) |
[in] | before | Get messages before this message id |
[in] | after | Get messages after this message id |
[in] | around | Get messages around this message id |
- Returns
- Array of messages
◆ is_nsfw()
bool DiscordCPP::TextChannel::is_nsfw |
( |
| ) |
|
|
inline |
- Returns
- True if nsfw is enabled
◆ send() [1/2]
DiscordCPP::Message DiscordCPP::TextChannel::send |
( |
const std::string & | content, |
|
|
const bool | tts = false ) |
Send a Message to this channel.
- Parameters
-
[in] | content | The string message to send. |
[in] | tts | (optional) Wether to send as tts-message or not. Default is false. |
- Returns
- The message that was sent.
◆ send() [2/2]
Send an Embed to this channel.
- Parameters
-
[in] | embed | The Embed to send. |
- Returns
- The message that was sent.
The documentation for this class was generated from the following files: