D++ (DPP)
C++ Discord API Bot Library
|
A definition of a discord thread. A thread is a superset of a channel. Not to be confused with std::thread
!
More...
#include <channel.h>
Public Member Functions | |
thread () | |
Construct a new thread object. More... | |
bool | is_news_thread () const |
Returns true if the channel is a news thread. More... | |
bool | is_public_thread () const |
Returns true if the channel is a public thread. More... | |
bool | is_private_thread () const |
Returns true if the channel is a private thread. More... | |
thread & | fill_from_json (nlohmann::json *j) |
virtual | ~thread () |
Destroy the thread object. More... | |
virtual std::string | build_json (bool with_id=false) const |
Build json for this thread object. More... | |
std::string | get_mention () const |
Get the mention ping for the channel. More... | |
uint64_t | get_user_permissions (const class user *member) const |
Get the user permissions for a user on this channel. More... | |
std::map< snowflake, class guild_member * > | get_members () |
Return a map of members on the channel, built from the guild's member list based on which members have the VIEW_CHANNEL permission. Does not return reliable information for voice channels, use dpp::channel::get_voice_members() instead for this. More... | |
std::map< snowflake, voicestate > | get_voice_members () |
Get a map of members in this channel, if it is a voice channel. The map is keyed by snowflake id of the user. More... | |
bool | is_nsfw () const |
Returns true if the channel is NSFW gated. More... | |
bool | is_text_channel () const |
Returns true if the channel is a text channel. More... | |
bool | is_dm () const |
Returns true if the channel is a DM. More... | |
bool | is_voice_channel () const |
Returns true if the channel is a voice channel. More... | |
bool | is_group_dm () const |
Returns true if the channel is a group DM channel. More... | |
bool | is_category () const |
Returns true if the channel is a category. More... | |
bool | is_news_channel () const |
Returns true if the channel is a news channel. More... | |
bool | is_store_channel () const |
Returns true if the channel is a store channel. More... | |
bool | is_stage_channel () const |
Returns true if the channel is a stage channel. More... | |
bool | is_video_auto () const |
Returns true if video quality is auto. More... | |
bool | is_video_720p () const |
Returns true if video quality is 720p. More... | |
double | get_creation_time () const |
Get the creation time of this object according to Discord. More... | |
Public Attributes | |
uint8_t | message_count |
uint8_t | member_count |
thread_metadata | metadata |
thread_member | member |
Thread member of current user if joined to the thread. Note this is only set by certain api calls otherwise contains default data. More... | |
uint16_t | flags |
snowflake | guild_id |
uint16_t | position |
std::string | name |
std::string | topic |
snowflake | last_message_id |
uint8_t | user_limit |
uint16_t | bitrate |
uint16_t | rate_limit_per_user |
snowflake | owner_id |
snowflake | parent_id |
time_t | last_pin_timestamp |
std::vector< snowflake > | recipients |
std::vector< permission_overwrite > | permission_overwrites |
uint64_t | permissions |
This is only filled when the channel is part of the resolved set sent within an interaction. Any other time it contains zero. When filled, it contains the calculated permission bitmask of the user issuing the command within this channel. More... | |
std::string | rtc_region |
Voice region if set for voice channel, otherwise empty string. More... | |
utility::iconhash | icon |
Channel icon (for group DMs) More... | |
utility::iconhash | banner |
Channel banner (boost level locked) More... | |
snowflake | id |
Unique ID of object set by Discord. This value contains a timestamp, worker ID, internal server ID, and an incrementing value. Only the timestamp is relavent to us as useful metadata. More... | |
A definition of a discord thread. A thread is a superset of a channel. Not to be confused with std::thread
!
dpp::thread::thread | ( | ) |
Construct a new thread object.
|
virtual |
Destroy the thread object.
|
virtual |
Build json for this thread object.
with_id | include the ID in the json |
Reimplemented from dpp::channel.
thread & dpp::thread::fill_from_json | ( | nlohmann::json * | j | ) |
Read class values from json object
j | A json object to read from |
|
inherited |
Get the creation time of this object according to Discord.
|
inherited |
Return a map of members on the channel, built from the guild's member list based on which members have the VIEW_CHANNEL permission. Does not return reliable information for voice channels, use dpp::channel::get_voice_members() instead for this.
|
inherited |
Get the mention ping for the channel.
|
inherited |
Get the user permissions for a user on this channel.
member | The user to return permissions for |
|
inherited |
Get a map of members in this channel, if it is a voice channel. The map is keyed by snowflake id of the user.
|
inherited |
Returns true if the channel is a category.
|
inherited |
Returns true if the channel is a DM.
|
inherited |
Returns true if the channel is a group DM channel.
|
inherited |
Returns true if the channel is a news channel.
bool dpp::thread::is_news_thread | ( | ) | const |
Returns true if the channel is a news thread.
|
inherited |
Returns true if the channel is NSFW gated.
bool dpp::thread::is_private_thread | ( | ) | const |
Returns true if the channel is a private thread.
bool dpp::thread::is_public_thread | ( | ) | const |
Returns true if the channel is a public thread.
|
inherited |
Returns true if the channel is a stage channel.
|
inherited |
Returns true if the channel is a store channel.
|
inherited |
Returns true if the channel is a text channel.
|
inherited |
Returns true if video quality is 720p.
|
inherited |
Returns true if video quality is auto.
|
inherited |
Returns true if the channel is a voice channel.
|
inherited |
Channel banner (boost level locked)
|
inherited |
the bitrate (in bits) of the voice channel
|
inherited |
Flags bitmap
|
inherited |
Guild id of the guild that owns the channel
|
inherited |
Channel icon (for group DMs)
|
inherited |
Unique ID of object set by Discord. This value contains a timestamp, worker ID, internal server ID, and an incrementing value. Only the timestamp is relavent to us as useful metadata.
|
inherited |
ID of last message to be sent to the channel
|
inherited |
Timestamp of last pinned message
thread_member dpp::thread::member |
Thread member of current user if joined to the thread. Note this is only set by certain api calls otherwise contains default data.
uint8_t dpp::thread::member_count |
Approximate count of members in a thread (threads)
uint8_t dpp::thread::message_count |
Approximate count of messages in a thread (threads)
thread_metadata dpp::thread::metadata |
Thread metadata (threads)
|
inherited |
Channel name
|
inherited |
User ID of owner for group DMs
|
inherited |
Parent ID (category)
|
inherited |
Permission overwrites to apply to base permissions
|
inherited |
This is only filled when the channel is part of the resolved
set sent within an interaction. Any other time it contains zero. When filled, it contains the calculated permission bitmask of the user issuing the command within this channel.
|
inherited |
Sorting position, lower number means higher up the list
|
inherited |
amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages or manage_channel, are unaffected
|
inherited |
DM recipients
|
inherited |
Voice region if set for voice channel, otherwise empty string.
|
inherited |
Channel topic
|
inherited |
Maximum user limit for voice channels (0-99)