dpp
dpp::active_thread_info
dpp::activity
dpp::activity_assets
dpp::activity_button
dpp::activity_party
dpp::activity_secrets
dpp::address_t
dpp::app_team
dpp::application
dpp::application_install_params
dpp::application_role_connection
dpp::application_role_connection_metadata
dpp::async
dpp::async_dummy
dpp::attachment
dpp::audio_mixer
dpp::audit_change
dpp::audit_entry
dpp::audit_extra
dpp::auditlog
dpp::autocomplete_interaction
dpp::autocomplete_t
dpp::automod_action
dpp::automod_metadata
dpp::automod_rule
dpp::automod_rule_create_t
dpp::automod_rule_delete_t
dpp::automod_rule_execute_t
dpp::automod_rule_update_t
dpp::awaitable
dpp::awaitable_dummy
dpp::ban
dpp::basic_awaitable
dpp::basic_promise
dpp::bignumber
dpp::bucket_t
dpp::button_click_t
dpp::cache
dpp::cache_exception
dpp::cache_policy_t
dpp::channel
dpp::channel_collector
dpp::channel_create_t
dpp::channel_delete_t
dpp::channel_pins_update_t
dpp::channel_update_t
dpp::cluster
dpp::collected_reaction
dpp::collector
dpp::command_data_option
dpp::command_info_t
dpp::command_interaction
dpp::command_option
dpp::command_option_choice
dpp::command_permission
dpp::command_resolved
dpp::command_source
dpp::component
dpp::component_default_value
dpp::component_interaction
dpp::confirmation
dpp::confirmation_callback_t
dpp::connection
dpp::connection_exception
dpp::context_menu_t
dpp::coroutine
dpp::coroutine_dummy
dpp::dave_binary_header_t
dpp::discord_client
dpp::discord_voice_client
dpp::discord_webhook_server
dpp::dns_cache_entry
dpp::dtemplate
dpp::embed
dpp::embed_author
dpp::embed_field
dpp::embed_footer
dpp::embed_image
dpp::embed_provider
dpp::emoji
dpp::entitlement
dpp::entitlement_create_t
dpp::entitlement_delete_t
dpp::entitlement_update_t
dpp::error_detail
dpp::error_info
dpp::etf_buffer
dpp::etf_parser
dpp::event_dispatch_t
dpp::event_entities
dpp::event_member
dpp::event_router_t
dpp::exception
dpp::file_exception
dpp::form_submit_t
dpp::forum_tag
dpp::gateway
dpp::guild
dpp::guild_audit_log_entry_create_t
dpp::guild_ban_add_t
dpp::guild_ban_remove_t
dpp::guild_command_permissions
dpp::guild_create_t
dpp::guild_delete_t
dpp::guild_emojis_update_t
dpp::guild_integrations_update_t
dpp::guild_join_request_delete_t
dpp::guild_member
dpp::guild_member_add_t
dpp::guild_member_remove_t
dpp::guild_member_update_t
dpp::guild_members_chunk_t
dpp::guild_role_create_t
dpp::guild_role_delete_t
dpp::guild_role_update_t
dpp::guild_scheduled_event_create_t
dpp::guild_scheduled_event_delete_t
dpp::guild_scheduled_event_update_t
dpp::guild_scheduled_event_user_add_t
dpp::guild_scheduled_event_user_remove_t
dpp::guild_stickers_update_t
dpp::guild_update_t
dpp::guild_widget
dpp::http_connect_info
dpp::http_request
dpp::http_request_completion_t
dpp::http_server
dpp::http_server_request
dpp::https_client
dpp::integration
dpp::integration_account
dpp::integration_app
dpp::integration_configuration
dpp::integration_create_t
dpp::integration_delete_t
dpp::integration_update_t
dpp::interaction
dpp::interaction_create_t
dpp::interaction_metadata_type
dpp::interaction_modal_response
dpp::interaction_response
dpp::invalid_token_exception
dpp::invite
dpp::invite_create_t
dpp::invite_delete_t
dpp::job
dpp::job_dummy
dpp::json_interface
dpp::length_exception
dpp::log_t
dpp::logic_exception
dpp::managed
dpp::message
dpp::message_collector
dpp::message_context_menu_t
dpp::message_create_t
dpp::message_delete_bulk_t
dpp::message_delete_t
dpp::message_file_data
dpp::message_pin
dpp::message_poll_vote_add_t
dpp::message_poll_vote_remove_t
dpp::message_reaction_add_t
dpp::message_reaction_remove_all_t
dpp::message_reaction_remove_emoji_t
dpp::message_reaction_remove_t
dpp::message_search_params
dpp::message_search_result
dpp::message_snapshot
dpp::message_update_t
dpp::moveable_promise
dpp::moving_averager
dpp::multipart_content
dpp::onboarding
dpp::onboarding_prompt
dpp::onboarding_prompt_option
dpp::oneshot_timer
dpp::param_info
dpp::parse_exception
dpp::partial_emoji
dpp::permission
dpp::permission_overwrite
dpp::poll
dpp::poll_answer
dpp::poll_media
dpp::poll_results
dpp::presence
dpp::presence_update_t
dpp::prune
dpp::raii_socket
dpp::reaction
dpp::reaction_collector
dpp::ready_t
dpp::request_concurrency_queue
dpp::request_queue
dpp::resolved_user
dpp::rest_exception
dpp::resumed_t
dpp::role
dpp::role_collector
dpp::scheduled_event
dpp::scheduled_event_collector
dpp::select_click_t
dpp::select_option
dpp::signature_verifier
dpp::sku
dpp::slashcommand
dpp::slashcommand_t
dpp::snowflake
dpp::socket_close_t
dpp::socket_engine_base
dpp::socket_events
dpp::socket_listener
dpp::socket_stats
dpp::ssl_connection
dpp::stage_instance
dpp::stage_instance_create_t
dpp::stage_instance_delete_t
dpp::stage_instance_update_t
dpp::sticker
dpp::sticker_pack
dpp::task
dpp::task_cancelled_exception
dpp::task_dummy
dpp::team_member
dpp::thread
dpp::thread_collector
dpp::thread_create_t
dpp::thread_delete_t
dpp::thread_list_sync_t
dpp::thread_member
dpp::thread_member_update_t
dpp::thread_members_update_t
dpp::thread_metadata
dpp::thread_pool
dpp::thread_pool_task
dpp::thread_pool_task_comparator
dpp::thread_update_t
dpp::timed_listener
dpp::timer_comparator
dpp::timer_t
dpp::typing_start_t
dpp::user
dpp::user_context_menu_t
dpp::user_identified
dpp::user_update_t
dpp::voice_buffer_send_t
dpp::voice_channel_effect
dpp::voice_channel_effect_send_t
dpp::voice_client_disconnect_t
dpp::voice_client_platform_t
dpp::voice_client_speaking_t
dpp::voice_exception
dpp::voice_out_packet
dpp::voice_ready_t
dpp::voice_receive_t
dpp::voice_server_update_t
dpp::voice_state_update_t
dpp::voice_track_marker_t
dpp::voiceconn
dpp::voiceregion
dpp::voicestate
dpp::webhook
dpp::webhooks_update_t
dpp::websocket_client
dpp::welcome_channel
dpp::welcome_screen
dpp::when_any
dpp::zlibcontext
dpp::awaitable_type
dpp::cache_policy
dpp::colors
dpp::compat
dpp::dave
dpp::detail
dpp::embed_type
dpp::events
dpp::unicode_emoji
dpp::utility
activity_flags
dpp::activity_flags
af_instance
= 0b000000001

In an instance.

af_join
= 0b000000010

Joining.

af_spectate
= 0b000000100

Spectating.

af_join_request
= 0b000001000

Sending join request.

af_sync
= 0b000010000

Synchronising.

af_play
= 0b000100000

Playing.

af_party_privacy_friends
= 0b001000000

Party privacy friends.

af_party_privacy_voice_channel
= 0b010000000

Party privacy voice channel.

af_embedded
= 0b100000000

Embedded.

Activity types for rich presence.

uint8_t activity_type dpp::activity_type at_game = 0

"Playing ..."

at_streaming
= 1

"Streaming ..."

at_listening
= 2

"Listening to..."

at_watching
= 3

"Watching..."

at_custom
= 4

"Emoji..."

at_competing
= 5

"Competing in..."

Game types.

uint8_t animation_types dpp::animation_types at_premium = 0 at_basic = 1

Animation types that a voice channel effect can have.

uint8_t application_event_webhook_status dpp::application_event_webhook_status ews_disabled = 1

Webhook events are disabled by developer.

ews_enabled
= 2

Webhook events are enabled by developer.

ews_disabled_by_discord
= 3

Webhook events are disabled by Discord, usually due to inactivity.

Status indicating whether event webhooks are enabled or disabled for an application.

uint32_t application_flags dpp::application_flags apf_application_automod_rule_create_badge = (1 << 6)

Indicates if an app uses the Auto Moderation API.

apf_gateway_presence
= (1 << 12)

Has gateway presence intent.

apf_gateway_presence_limited
= (1 << 13)

Has gateway presence intent for <100 guilds.

apf_gateway_guild_members
= (1 << 14)

Has guild members intent.

apf_gateway_guild_members_limited
= (1 << 15)

Has guild members intent for <100 guilds.

apf_verification_pending_guild_limit
= (1 << 16)

Verification is pending.

apf_embedded
= (1 << 17)

Embedded.

apf_gateway_message_content
= (1 << 18)

Has approval for message content.

apf_gateway_message_content_limited
= (1 << 19)

Has message content, but <100 guilds.

apf_application_command_badge
= (1 << 23)

Indicates if the app has registered global application commands.

Flags for a bot or application.

uint8_t application_integration_types dpp::application_integration_types ait_guild_install = 0

Installable to servers.

ait_user_install
= 1

Installable to users.

Where an app can be installed, also called its supported installation contexts.

uint8_t application_role_connection_metadata_type dpp::application_role_connection_metadata_type rc_integer_less_than_or_equal = 1

The metadata value (integer) is less than or equal to the guild's configured value (integer).

rc_integer_greater_than_or_equal
= 2

The metadata value (integer) is greater than or equal to the guild's configured value (integer).

rc_integer_equal
= 3

The metadata value (integer) is equal to the guild's configured value (integer).

rc_integer_not_equal
= 4

The metadata value (integer) is not equal to the guild's configured value (integer).

rc_datetime_less_than_or_equal
= 5

The metadata value (ISO8601 string) is less than or equal to the guild's configured value (integer; days before current date).

rc_datetime_greater_than_or_equal
= 6

The metadata value (ISO8601 string) is greater than or equal to the guild's configured value (integer; days before current date).

rc_boolean_equal
= 7

The metadata value (integer) is equal to the guild's configured value (integer; 1).

rc_boolean_not_equal
= 8

The metadata value (integer) is not equal to the guild's configured value (integer; 1).

Application Role Connection Metadata Type.

Each metadata type offers a comparison operation that allows guilds to configure role requirements based on metadata values stored by the bot. Bots specify a `metadata value` for each user and guilds specify the required `guild's configured value` within the guild role settings.

uint8_t attachment_flags dpp::attachment_flags a_is_remix = 1 << 2

This attachment has been edited using the remix feature on mobile.

Bitmask flags for a dpp::attachment.

audit_type
dpp::audit_type
aut_guild_update
= 1

Guild update.

aut_channel_create
= 10

Channel create.

aut_channel_update
= 11

Channel update.

aut_channel_delete
= 12

Channel delete.

aut_channel_overwrite_create
= 13

Channel overwrite create.

aut_channel_overwrite_update
= 14

Channel overwrite update.

aut_channel_overwrite_delete
= 15

Channel overwrite delete.

aut_member_kick
= 20

Channel member kick.

aut_member_prune
= 21

Channel member prune.

aut_member_ban_add
= 22

Channel member ban add.

aut_member_ban_remove
= 23

Channel member ban remove.

aut_member_update
= 24

Guild member update.

aut_member_role_update
= 25

Guild member role update.

aut_member_move
= 26

Guild member move.

aut_member_disconnect
= 27

Guild member voice disconnect.

aut_bot_add
= 28

Guild bot add.

aut_role_create
= 30

Guild role create.

aut_role_update
= 31

Guild role update.

aut_role_delete
= 32

Guild role delete.

aut_invite_create
= 40

Guild invite create.

aut_invite_update
= 41

Guild invite update.

aut_invite_delete
= 42

Guild invite delete.

aut_webhook_create
= 50

Guild webhook create.

aut_webhook_update
= 51

Guild webhook update.

aut_webhook_delete
= 52

Guild webhook delete.

aut_emoji_create
= 60

Guild emoji create.

aut_emoji_update
= 61

Guild emoji update.

aut_emoji_delete
= 62

Guild emoji delete.

aut_message_delete
= 72

Guild message delete.

aut_message_bulk_delete
= 73

Guild message bulk delete.

aut_message_pin
= 74

Guild message pin.

aut_message_unpin
= 75

Guild message unpin.

aut_integration_create
= 80

Guild integration create.

aut_integration_update
= 81

Guild integration update.

aut_integration_delete
= 82

Guild integration delete.

aut_stage_instance_create
= 83

Stage instance create.

aut_stage_instance_update
= 84

Stage instance update.

aut_stage_instance_delete
= 85

stage instance delete

aut_sticker_create
= 90

Sticker create.

aut_sticker_update
= 91

Sticker update.

aut_sticker_delete
= 92

Sticker delete.

aut_guild_scheduled_event_create
= 100

Scheduled event creation.

aut_guild_scheduled_event_update
= 101

Scheduled event update.

aut_guild_scheduled_event_delete
= 102

Scheduled event deletion.

aut_thread_create
= 110

Thread create.

aut_thread_update
= 111

Thread update.

aut_thread_delete
= 112

Thread delete.

aut_appcommand_permission_update
= 121

Application command permissions update.

aut_automod_rule_create
= 140

Auto moderation rule creation.

aut_automod_rule_update
= 141

Auto moderation rule update.

aut_automod_rule_delete
= 142

Auto moderation rule deletion.

aut_automod_block_message
= 143

Message was blocked by Auto Moderation.

aut_automod_flag_to_channel
= 144

Message was flagged by Auto Moderation.

aut_automod_user_communication_disabled
= 145

Member was timed out by Auto Moderation.

aut_creator_monetization_request_created
= 150

Creator monetization request was created.

aut_creator_monetization_terms_accepted
= 151

Creator monetization terms were accepted.

Defines types of audit log entry.

uint8_t auto_archive_duration_t dpp::auto_archive_duration_t arc_1_hour = 1

Auto archive duration of 1 hour (60 minutes).

arc_1_day
= 2

Auto archive duration of 1 day (1440 minutes).

arc_3_days
= 3

Auto archive duration of 3 days (4320 minutes).

arc_1_week
= 4

Auto archive duration of 1 week (10080 minutes).

Auto archive duration of threads which will stop showing in the channel list after the specified period of inactivity. Defined as an enum to fit into 1 byte. Internally it'll be translated to minutes to match the API.

uint8_t automod_action_type dpp::automod_action_type amod_action_block_message = 1

Blocks the message and prevents it from being posted. A custom explanation can be specified and shown to members whenever their message is blocked.

amod_action_send_alert
= 2

Send an alert to a given channel.

amod_action_timeout
= 3

timeout the user

Can only be set up for rules with trigger types of dpp::amod_type_keyword and dpp::amod_type_mention_spam

Action types to perform on filtering.

uint8_t automod_event_type dpp::automod_event_type amod_message_send = 1

Trigger on message send or edit.

Event types, only message send is currently supported.

uint8_t automod_preset_type dpp::automod_preset_type amod_preset_profanity = 1

Strong swearing.

amod_preset_sexual_content
= 2

Sexual phrases and words.

amod_preset_slurs
= 3

Racial and other slurs, hate speech.

Possible types of preset filter lists.

uint8_t automod_trigger_type dpp::automod_trigger_type amod_type_keyword = 1

Check if content contains words from a user defined list of keywords (max 6 of this type per guild).

amod_type_harmful_link
= 2

Harmful/malware links.

Deprecated

Removed by Discord

amod_type_spam
= 3

Check if content represents generic spam (max 1 of this type per guild).

amod_type_keyword_preset
= 4

Check if content contains words from discord pre-defined wordsets (max 1 of this type per guild).

amod_type_mention_spam
= 5

Check if content contains more mentions than allowed (max 1 of this type per guild).

Types of moderation to trigger.

build_type
dpp::build_type
universal

Universal build, works with both debug and release.

debug

Debug build.

release

Release build.

Represents a build configuration. On some platforms (e.g. Windows) release isn't compatible with debug, so we use this enum to detect it.

cache_policy_setting_t
dpp::cache_policy_setting_t
cp_aggressive
= 0

request aggressively on seeing new guilds, and also store missing data from messages. This is the default behaviour and the least memory-efficient option. Memory usage will increase over time, initially quite rapidly, and then linearly over time. It is the least cpu-intensive setting.

cp_lazy
= 1

only cache when there is relevant activity, e.g. a message to the bot. This is a good middle-ground, memory usage will increase linearly over time.

cp_none
= 2

Don't cache anything. Fill details when we see them. This is the most memory-efficient option but consumes more CPU time.

Represents the caching policy of a cache in the library.

uint16_t channel_flags dpp::channel_flags c_nsfw = 0b0000000000010000

NSFW Gated Channel.

c_video_quality_720p
= 0b0000000000100000

Video quality forced to 720p.

c_lock_permissions
= 0b0000000001000000

Lock permissions (only used when updating channel positions).

c_pinned_thread
= 0b0000000010000000

Thread is pinned to the top of its parent forum or media channel.

c_require_tag
= 0b0000000100000000

Whether a tag is required to be specified when creating a thread in a forum or media channel. Tags are specified in the thread::applied_tags field.

c_hide_media_download_options
= 0b0001000000000000

When set hides the embedded media download options. Available only for media channels.

Our flags as stored in the object.

The bottom four bits of this flag are reserved to contain the channel_type values listed above as provided by Discord. If discord add another value > 15, we will have to shuffle these values upwards by one bit.

uint8_t channel_type dpp::channel_type CHANNEL_TEXT = 0

A text channel within a server.

DM
= 1

A direct message between users.

CHANNEL_VOICE
= 2

A voice channel within a server.

GROUP_DM
= 3

a direct message between multiple users

Deprecated

this channel type was intended to be used with the now deprecated GameBridge SDK. Existing group dms with bots will continue to function, but newly created channels will be unusable.

CHANNEL_CATEGORY
= 4

An organizational category that contains up to 50 channels.

CHANNEL_ANNOUNCEMENT
= 5

A channel that users can follow and cross-post into their own server.

CHANNEL_STORE
= 6

A channel in which game developers can sell their game on Discord.

Deprecated

Store channels are deprecated by Discord.

CHANNEL_ANNOUNCEMENT_THREAD
= 10

A temporary sub-channel within a `GUILD_ANNOUNCEMENT` channel.

CHANNEL_PUBLIC_THREAD
= 11

A temporary sub-channel within a `GUILD_TEXT` or `GUILD_FORUM` channel.

CHANNEL_PRIVATE_THREAD
= 12

A temporary sub-channel within a `GUILD_TEXT` channel that is only viewable by those invited and those with the `MANAGE_THREADS` permission.

CHANNEL_STAGE
= 13

A "stage" channel, like a voice channel with one authorised speaker.

CHANNEL_DIRECTORY
= 14

The channel in a hub containing the listed servers.

https://support.discord.com/hc/en-us/articles/4406046651927-Discord-Student-Hubs-FAQ

CHANNEL_FORUM
= 15

Forum channel that can only contain threads.

CHANNEL_MEDIA
= 16

Media channel that can only contain threads, similar to forum channels.

Flag integers as received from and sent to discord.

uint8_t client_platform_t dpp::client_platform_t client_platform_desktop = 0

Web, Desktop.

client_platform_mobile
= 1

Mobile device.

Discord voice platform types.

uint8_t command_option_type dpp::command_option_type co_sub_command = 1

A sub-command.

co_sub_command_group
= 2

A sub-command group.

co_string
= 3

A string value.

co_integer
= 4

An integer value.

co_boolean
= 5

A boolean value.

co_user
= 6

A user snowflake id.

co_channel
= 7

A channel snowflake id. Includes all channel types and categories.

co_role
= 8

A role id (snowflake).

co_mentionable
= 9

A mentionable (users and roles).

co_number
= 10

Any double between -2^53 and 2^53.

co_attachment
= 11

File attachment type.

Represents command option types. These are the possible parameter value types.

command_permission_type
dpp::command_permission_type
cpt_role
= 1

Role permission.

cpt_user
= 2

User permission.

type of permission in the dpp::command_permission class

uint8_t component_default_value_type dpp::component_default_value_type cdt_user = 0 cdt_role = 1 cdt_channel = 2

Represents the type of a dpp::component_default_value

They're different to discord's value types

uint8_t component_style dpp::component_style cos_primary = 1

Blurple; Primary.

cos_secondary

Grey; Secondary.

cos_success

Green; Success.

cos_danger

Red; danger.

cos_link

An external hyperlink to a website, requires url to be set.

Will not work unless url is set

cos_premium

Premium upsell button, requires sku_id to be set.

Will not work unless sku is set

Represents the style of a button.

uint8_t component_type dpp::component_type cot_action_row = 1

Action row, a container for other components.

cot_button
= 2

Clickable button.

cot_selectmenu
= 3

Select menu for picking from defined text options.

cot_text
= 4

Text input.

cot_user_selectmenu
= 5

Select menu for users.

cot_role_selectmenu
= 6

Select menu for roles.

cot_mentionable_selectmenu
= 7

Select menu for mentionables (users and roles).

cot_channel_selectmenu
= 8

Select menu for channels.

cot_section
= 9

Section.

Available in components v2 only

cot_text_display
= 10

Simple text.

Available in components v2 only

cot_thumbnail
= 11

Image thumbnail, clickable to expand.

Available in components v2 only

cot_media_gallery
= 12

Collection of media (images, videos).

Available in components v2 only

cot_file
= 13

File attachment from the uploads of the message.

Available in components v2 only

cot_separator
= 14

Separator between sections or other components.

Available in components v2 only

cot_content_inventory_entry
= 16

Content inventory entry.

cot_container
= 17

Container for other components.

Available in components v2 only

cot_label
= 18

Container associating a label and description with a component.

cot_file_upload
= 19

Component for uploading files.

Represents the type of a component.

uint8_t dave_version_t dpp::dave_version_t dave_version_none = 0

DAVE disabled (default for now).

dave_version_1
= 1

DAVE enabled, version 1 (E2EE encryption on top of openssl).

Supported DAVE (Discord Audio Visual Encryption) protocol versions.

uint8_t default_forum_sort_order_t dpp::default_forum_sort_order_t so_latest_activity = 0

Sort forum posts by activity (default).

so_creation_date
= 1

Sort forum posts by creation time (from most recent to oldest).

Types for sort posts in a forum channel.

uint8_t default_message_notification_t dpp::default_message_notification_t dmn_all = 0

Members will receive notifications for all messages by default.

dmn_only_mentions
= 1

Members will receive notifications only for messages that @mention them by default.

Default message notification level.

uint8_t emoji_flags dpp::emoji_flags e_require_colons = 0b00000001

Emoji requires colons.

e_managed
= 0b00000010

Managed (introduced by application).

e_animated
= 0b00000100

Animated emoji.

e_available
= 0b00001000

Available (false if the guild doesn't meet boosting criteria, etc).

Flags for dpp::emoji.

uint8_t entitlement_flags dpp::entitlement_flags ent_deleted = 0b0000001

Entitlement was deleted.

Only discord staff can delete an entitlement via their internal tooling. It should rarely happen except in cases of fraud or chargeback.

ent_consumed
= 0b0000010

Entitlement was consumed.

A consumed entitlement is a used-up one-off purchase.

Entitlement flags.

uint8_t entitlement_type dpp::entitlement_type PURCHASE = 1

Entitlement was purchased by user.

PREMIUM_SUBSCRIPTION
= 2

Entitlement for Discord Nitro subscription.

DEVELOPER_GIFT
= 3

Entitlement was gifted by developer.

TEST_MODE_PURCHASE
= 4

Entitlement was purchased by a dev in application test mode.

FREE_PURCHASE
= 5

Entitlement was granted when the SKU was free.

USER_GIFT
= 6

Entitlement was gifted by another user.

PREMIUM_PURCHASE
= 7

Entitlement was claimed by user for free as a Nitro Subscriber.

APPLICATION_SUBSCRIPTION
= 8

Entitlement was purchased as an app subscription.

The type of entitlement.

uint8_t etf_token_type dpp::etf_token_type ett_distribution = 'D'

68 [Distribution header]

ett_new_float
= 'F'

70 [Float64:IEEE float]

ett_bit_binary
= 'M'

77 [UInt32:Len, UInt8:Bits, Len:Data]

ett_compressed
= 'P'

80 [UInt4:UncompressedSize, N:ZlibCompressedData]

ett_smallint
= 'a'

97 [UInt8:Int]

ett_integer
= 'b'

98 [Int32:Int]

ett_float
= 'c'

99 [31:Float String] Float in string format (formatted "%.20e", sscanf "%lf").

Superseded by ett_new_float.

ett_atom
= 'd'

100 [UInt16:Len, Len:AtomName] max Len is 255

ett_reference
= 'e'

101 [atom:Node, UInt32:ID, UInt8:Creation]

ett_port
= 'f'

102 [atom:Node, UInt32:ID, UInt8:Creation]

ett_pid
= 'g'

103 [atom:Node, UInt32:ID, UInt32:Serial, UInt8:Creation]

ett_small_tuple
= 'h'

104 [UInt8:Arity, N:Elements]

ett_large_tuple
= 'i'

105 [UInt32:Arity, N:Elements]

ett_nil
= 'j'

106 empty list

ett_string
= 'k'

107 [UInt16:Len, Len:Characters]

ett_list
= 'l'

108 [UInt32:Len, Elements, Tail]

ett_binary
= 'm'

109 [UInt32:Len, Len:Data]

ett_bigint_small
= 'n'

110 [UInt8:n, UInt8:Sign, n:nums]

ett_bigint_large
= 'o'

111 [UInt32:n, UInt8:Sign, n:nums]

ett_new_function
= 'p'

112 [UInt32:Size, UInt8:Arity, 16*Uint6-MD5:Uniq, UInt32:Index, UInt32:NumFree, atom:Module, int:OldIndex, int:OldUniq, pid:Pid, NunFree*ext:FreeVars]

ett_export
= 'q'

113 [atom:Module, atom:Function, smallint:Arity]

ett_new_reference
= 'r'

114 [UInt16:Len, atom:Node, UInt8:Creation, Len*UInt32:ID]

ett_atom_small
= 's'

115 [UInt8:Len, Len:AtomName]

ett_map
= 't'

116 [UInt32:Airty, N:Pairs]

ett_function
= 'u'

117 [UInt4:NumFree, pid:Pid, atom:Module, int:Index, int:Uniq, NumFree*ext:FreeVars]

ett_atom_utf8
= 'v'

118 [UInt16:Len, Len:AtomName] max Len is 255 characters (up to 4 bytes per)

ett_atom_utf8_small
= 'w'

119 [UInt8:Len, Len:AtomName]

Represents a token which identifies the type of value which follows it in the ETF binary structure.

uint8_t event_entity_type dpp::event_entity_type eet_stage_instance = 1

A stage instance.

eet_voice
= 2

A voice channel.

eet_external
= 3

External to discord, or a text channel etc.

Event entity types.

uint8_t event_privacy_level dpp::event_privacy_level ep_guild_only = 2

The event is visible to only guild members.

Represents the privacy of an event.

uint8_t event_status dpp::event_status es_scheduled = 1

Scheduled.

es_active
= 2

Active now.

es_completed
= 3

Completed.

es_cancelled
= 4

Cancelled.

Event status types.

exception_error_code
dpp::exception_error_code
err_no_code_specified
= 0
err_zlib_see_errno
= -1
err_zlib_init_stream
= -2
err_zlib_init_data
= -3
err_zlib_init_mem
= -4
err_zlib_init_buffer
= -5
err_zlib_init_version
= -6
err_opus_bad_arg
= -11
err_opus_buffer_too_small
= -12
err_opus_internal_error
= -13
err_opus_invalid_packet
= -14
err_opus_unimplemented
= -15
err_opus_invalid_state
= -16
err_opus_alloc_fail
= -17
err_dns_bad_flags
= -21
err_name_or_service_unknown
= -22
err_dns_again
= -23
err_dns_fail
= -24
err_dns_family
= -26
err_dns_socket_type
= -27
err_dns_service
= -28
err_dns_memory
= -30
err_dns_system_error
= -31
err_dns_overflow
= -32
err_ssl_new
= 1
err_ssl_connect
= 2
err_write
= 3
err_ssl_write
= 4
err_no_sessions_left
= 5
err_auto_shard
= 6
err_reconnection
= 7
err_bind_failure
= 8
err_nonblocking_failure
= 9
err_voice_terminating
= 10
err_connect_failure
= 11
err_ssl_context
= 12
err_ssl_version
= 13
err_invalid_socket
= 14
err_socket_error
= 15
err_websocket_proto_already_set
= 16
err_command_handler_not_ready
= 17
err_no_owning_message
= 18
err_cancelled_event
= 19
err_event_status
= 20
err_event_start_time
= 21
err_event_end_time
= 22
err_command_has_caps
= 23
err_choice_autocomplete
= 24
err_interaction
= 25
err_too_many_component_rows
= 26
err_invalid_webhook
= 27
err_voice_state_timestamp
= 28
err_no_voice_support
= 29
err_invalid_voice_packet_length
= 30
err_opus
= 31
err_cant_start_shard
= 32
err_etf
= 33
err_cache
= 34
err_icon_size
= 35
err_massive_audio
= 36
err_unknown
= 37
err_bad_request
= 400
err_unauthorized
= 401
err_payment_required
= 402
err_forbidden
= 403
err_not_found
= 404
err_method_not_allowed
= 405
err_not_acceptable
= 406
err_proxy_auth_required
= 407
err_request_timeout
= 408
err_conflict
= 409
err_gone
= 410
err_length_required
= 411
err_precondition_failed
= 412
err_payload_too_large
= 413
err_uri_too_long
= 414
err_unsupported_media_type
= 415
err_range_not_satisfiable
= 416
err_expectation_failed
= 417
err_im_a_teapot
= 418
err_page_expired
= 419
err_twitter_rate_limited
= 420
err_misdirected_request
= 421
err_unprocessable_content
= 422
err_webdav_locked
= 423
err_webdav_failed_dependency
= 424
err_too_early
= 425
err_upgrade_required
= 426
err_precondition_required
= 428
err_rate_limited
= 429
err_request_headers_too_large
= 431
err_page_blocked
= 450
err_unavailable_for_legal_reasons
= 451
err_http_request_on_https_port
= 497
err_internal_server_error
= 500
err_not_implemented
= 501
err_bad_gateway
= 502
err_service_unavailable
= 503
err_gateway_timeout
= 504
err_http_version_not_supported
= 505
err_variant_also_negotiates
= 506
err_webdav_insufficient_storage
= 507
err_webdav_loop_detected
= 508
err_bandwidth_limit_exceeded
= 509
err_not_extended
= 510
err_network_auth_required
= 511
err_web_server_down
= 521
err_connection_timed_out
= 522
err_origin_unreachable
= 523
err_timeout
= 524
err_ssl_handshake_failed
= 525
err_invalid_ssl_certificate
= 526
err_railgun
= 527
err_cloudflare
= 530
err_websocket_unknown
= 4000
err_websocket_bad_opcode
= 4001
err_websocket_decode
= 4002
err_websocket_not_authenticated
= 4003
err_websocket_authentication_failed
= 4004
err_websocket_already_authenticated
= 4005
err_websocket_invalid_seq_number
= 4007
err_websocket_rate_limited
= 4008
err_websocket_session_timeout
= 4009
err_websocket_invalid_shard
= 4010
err_websocket_sharding_required
= 4011
err_websocket_invalid_api_version
= 4012
err_websocket_invalid_intents
= 4013
err_websocket_disallowed_intents
= 4014
err_websocket_voice_disconnected
= 4014
err_websocket_voice_server_crashed
= 4015
err_websocket_voice_unknown_encryption
= 4016
err_compression_stream
= 6000
err_compression_data
= 6001
err_compression_memory
= 6002
err_unknown_account
= 10001
err_unknown_application
= 10002
err_unknown_channel
= 10003
err_unknown_guild
= 10004
err_unknown_integration
= 10005
err_unknown_invite
= 10006
err_unknown_member
= 10007
err_unknown_message
= 10008
err_unknown_permission_overwrite
= 10009
err_unknown_provider
= 10010
err_unknown_role
= 10011
err_unknown_token
= 10012
err_unknown_user
= 10013
err_unknown_emoji
= 10014
err_unknown_webhook
= 10015
err_unknown_webhook_service
= 10016
err_unknown_session
= 10020
err_unknown_ban
= 10026
err_unknown_sku
= 10027
err_unknown_store_listing
= 10028
err_unknown_entitlement
= 10029
err_unknown_build
= 10030
err_unknown_lobby
= 10031
err_unknown_branch
= 10032
err_unknown_store_directory_layout
= 10033
err_unknown_redistributable
= 10036
err_unknown_gift_code
= 10038
err_unknown_stream
= 10049
err_unknown_premium_server_subscribe_cooldown
= 10050
err_unknown_guild_template
= 10057
err_unknown_discoverable_server_category
= 10059
err_unknown_sticker
= 10060
err_unknown_interaction
= 10062
err_unknown_application_command
= 10063
err_unknown_voice_state
= 10065
err_unknown_application_command_permissions
= 10066
err_unknown_stage_instance
= 10067
err_unknown_guild_member_verification_form
= 10068
err_unknown_guild_welcome_screen
= 10069
err_unknown_guild_scheduled_event
= 10070
err_unknown_guild_scheduled_event_user
= 10071
err_unknown_tag
= 10087
err_bots_cannot_use_this_endpoint
= 20001
err_only_bots_can_use_this_endpoint
= 20002
err_explicit_content
= 20009
err_unauthorized_for_application
= 20012
err_slowmode_rate_limit
= 20016
err_owner_only
= 20018
err_announcement_rate_limit
= 20022
err_under_minimum_age
= 20024
err_write_rate_limit
= 20029
err_stage_banned_words
= 20031
err_guild_premium_subscription_level_too_low
= 20035
err_guilds
= 30001
err_friends
= 30002
err_pins_for_the_channel
= 30003
err_recipients
= 30004
err_guild_roles
= 30005
err_webhooks
= 30007
err_emojis
= 30008
err_reactions
= 30010
err_group_dms
= 30011
err_guild_channels
= 30013
err_attachments_in_a_message
= 30015
err_invites
= 30016
err_animated_emojis
= 30018
err_server_members
= 30019
err_server_categories
= 30030
err_guild_already_has_a_template
= 30031
err_application_commands
= 30032
err_thread_participants
= 30033
err_daily_application_command_creates
= 30034
err_bans_for_non_guild_members_have_been_exceeded
= 30035
err_bans_fetches
= 30037
err_uncompleted_guild_scheduled_events
= 30038
err_stickers
= 30039
err_prune_requests
= 30040
err_guild_widget_settings_updates
= 30042
err_edits_to_messages_older_than_1_hour
= 30046
err_pinned_threads_in_a_forum_channel
= 30047
err_tags_in_a_forum_channel
= 30048
err_bitrate_is_too_high_for_channel_of_this_type
= 30052
err_premium_emojis
= 30056
err_webhooks_per_guild
= 30058
err_channel_permission_overwrites
= 30060
err_the_channels_for_this_guild_are_too_large
= 30061
err_unauthorized_invalid_token
= 40001
err_verify_your_account
= 40002
err_you_are_opening_direct_messages_too_fast
= 40003
err_send_messages_has_been_temporarily_disabled
= 40004
err_request_entity_too_large
= 40005
err_this_feature_has_been_temporarily_disabled_server_side
= 40006
err_the_user_is_banned_from_this_guild
= 40007
err_connection_has_been_revoked
= 40012
err_target_user_is_not_connected_to_voice
= 40032
err_this_message_has_already_been_crossposted
= 40033
err_an_application_command_with_that_name_already_exists
= 40041
err_application_interaction_failed_to_send
= 40043
err_cannot_send_a_message_in_a_forum_channel
= 40058
err_interaction_has_already_been_acknowledged
= 40060
err_tag_names_must_be_unique
= 40061
err_service_resource_is_being_rate_limited
= 40062
err_no_tags_available
= 40066
err_tag_required
= 40067
err_entitlement_already_granted
= 40074
err_missing_access
= 50001
err_invalid_account_type
= 50002
err_cannot_execute_action_on_a_dm_channel
= 50003
err_guild_widget_disabled
= 50004
err_cannot_edit_a_message_by_other_user
= 50005
err_cannot_send_empty_message
= 50006
err_cannot_send_messages_to_this_user
= 50007
err_cannot_send_messages_in_a_non_text_channel
= 50008
err_channel_verification_level_too_high
= 50009
err_oauth2_application_does_not_have_a_bot
= 50010
err_oauth2_application_limit
= 50011
err_invalid_oauth2_state
= 50012
err_permissions
= 50013
err_invalid_authentication_token
= 50014
err_note_was_too_long
= 50015
err_too_few_or_too_many_messages
= 50016
err_invalid_mfa_level
= 50017
err_invalid_pin
= 50019
err_invite_code_invalid
= 50020
err_system_message
= 50021
err_channel_type
= 50024
err_invalid_oauth2_access_token
= 50025
err_missing_required_oauth2_scope
= 50026
err_invalid_webhook_token
= 50027
err_invalid_role
= 50028
err_invalid_recipients
= 50033
err_too_old_to_bulk_delete
= 50034
err_invalid_form_body
= 50035
err_invite_error
= 50036
err_invalid_activity_action
= 50039
err_invalid_api_version_provided
= 50041
err_file_uploaded_exceeds_the_maximum_size
= 50045
err_invalid_file_uploaded
= 50046
err_cannot_self_redeem_this_gift
= 50054
err_invalid_guild
= 50055
err_invalid_sku
= 50057
err_invalid_request_origin
= 50067
err_invalid_message_type
= 50068
err_payment_source_required
= 50070
err_cannot_modify_a_system_webhook
= 50073
err_cannot_delete_a_channel_required_for_community_guilds
= 50074
err_cannot_edit_stickers_within_a_message
= 50080
err_invalid_sticker_sent
= 50081
err_tried_to_perform_an_operation_on_an_archived_thread
= 50083
err_invalid_thread_notification_settings
= 50084
err_before_value_is_earlier_than_the_thread_creation_date
= 50085
err_community_server_channels_must_be_text_channels
= 50086
err_bad_event_entity_type
= 50091
err_this_server_is_not_available_in_your_location
= 50095
err_monetization_enabled_in_order_to_perform_this_action
= 50097
err_more_boosts_to_perform_this_action
= 50101
err_the_request_body_contains_invalid_json
= 50109
err_owner_cannot_be_pending_member
= 50131
err_ownership_cannot_be_transferred_to_a_bot_user
= 50132
err_failed_to_resize_asset_below_the_maximum_size
= 50138
err_cannot_mix_subscription_and_non_subscription_roles_for_an_emoji
= 50144
err_cannot_convert_between_premium_emoji_and_normal_emoji
= 50145
err_uploaded_file_not_found
= 50146
err_voice_messages_do_not_support_additional_content
= 50159
err_voice_messages_must_have_a_single_audio_attachment
= 50160
err_voice_messages_must_have_supporting_metadata
= 50161
err_voice_messages_cannot_be_edited
= 50162
err_cannot_delete_guild_subscription_integration
= 50163
err_you_cannot_send_voice_messages_in_this_channel
= 50173
err_the_user_account_must_first_be_verified
= 50178
err_you_do_not_have_permission_to_send_this_sticker
= 50600
err_two_factor_is_required_for_this_operation
= 60003
err_no_users_with_discordtag_exist
= 80004
err_reaction_was_blocked
= 90001
err_user_cannot_use_burst_reactions
= 90002
err_application_not_yet_available
= 110001
err_api_resource_is_currently_overloaded
= 130000
err_the_stage_is_already_open
= 150006
err_cannot_reply_without_permission_to_read_message_history
= 160002
err_a_thread_has_already_been_created_for_this_message
= 160004
err_thread_is_locked
= 160005
err_active_threads
= 160006
err_active_announcement_threads
= 160007
err_invalid_json_for_uploaded_lottie_file
= 170001
err_uploaded_lotties_cannot_contain_rasterized_images
= 170002
err_sticker_maximum_framerate
= 170003
err_sticker_frame_count
= 170004
err_lottie_animation_dimensions
= 170005
err_sticker_frame_rate
= 170006
err_sticker_animation_duration
= 170007
err_cannot_update_a_finished_event
= 180000
err_failed_to_create_stage_needed_for_stage_event
= 180002
err_message_was_blocked_by_automatic_moderation
= 200000
err_title_was_blocked_by_automatic_moderation
= 200001
err_webhooks_posted_to_forum_channels_must_have_a_thread_name_or_thread_id
= 220001
err_webhooks_posted_to_forum_channels_cannot_have_both_a_thread_name_and_thread_id
= 220002
err_webhooks_can_only_create_threads_in_forum_channels
= 220003
err_webhook_services_cannot_be_used_in_forum_channels
= 220004
err_message_blocked_links
= 240000
err_cannot_enable_onboarding_requirements_are_not_met
= 350000
err_cannot_update_onboarding_below_requirements
= 350001

Exception error codes possible for dpp::exception::code().

This list is a combined list of Discord's error codes, HTTP error codes, zlib, opus and C library codes (e.g. DNS, socket etc). You may use these to easily identify a type of exception without having to resort to string comparison against dpp::exception::what()

For detailed descriptions of each error code, see the text description returned in `what()`.

Some exceptions MAY have error codes which are NOT in this list in the event a C library is updated and adds new codes we did not document here. In this case, or where the code is not specific, refer to `what()`.

uint8_t forum_layout_type dpp::forum_layout_type fl_not_set = 0

No default has been set for the forum channel.

fl_list_view
= 1

Display posts as a list.

fl_gallery_view
= 2

Display posts as a collection of tiles.

Types of forum layout views that indicates how the threads in a forum channel will be displayed for users by default.

uint8_t guild_afk_timeout_t dpp::guild_afk_timeout_t afk_off

AFK timeout disabled.

afk_60

AFK timeout of 1 Minute.

afk_300

AFK timeout of 5 Minutes.

afk_900

AFK timeout of 15 Minutes.

afk_1800

AFK timeout of 30 Minutes.

afk_3600

AFK timeout of 1 Hour.

Voice AFK timeout values for guild::afk_timeout.

uint8_t guild_explicit_content_t dpp::guild_explicit_content_t expl_disabled = 0

Media content will not be scanned.

expl_members_without_roles
= 1

Media content sent by members without roles will be scanned.

expl_all_members
= 2

Media content sent by all members will be scanned.

explicit content filter level. This is set by a guild admin, but can be forced to a setting if the server is verified, partnered, official etc.

uint32_t guild_flags dpp::guild_flags g_large = 0b00000000000000000000000000000001

Large guild.

g_unavailable
= 0b00000000000000000000000000000010

Unavailable guild (inaccessible due to an outage).

g_widget_enabled
= 0b00000000000000000000000000000100

Guild has widget enabled.

g_invite_splash
= 0b00000000000000000000000000001000

Guild can have an invite splash image.

g_vip_regions
= 0b00000000000000000000000000010000

Guild can have VIP regions.

g_vanity_url
= 0b00000000000000000000000000100000

Guild can have a vanity url.

g_verified
= 0b00000000000000000000000001000000

Guild is verified.

g_partnered
= 0b00000000000000000000000010000000

Guild is partnered.

g_community
= 0b00000000000000000000000100000000

Community features enabled.

g_role_subscription_enabled
= 0b00000000000000000000001000000000

Guild has enabled role subscriptions.

g_news
= 0b00000000000000000000010000000000

Guild has access to create announcement channels.

g_discoverable
= 0b00000000000000000000100000000000

Guild is discoverable in discovery.

g_featureable
= 0b00000000000000000001000000000000

Guild is featureable.

g_animated_icon
= 0b00000000000000000010000000000000

Guild can have an animated icon (doesn't mean it actually has one though).

g_banner
= 0b00000000000000000100000000000000

Guild can have a banner image.

g_welcome_screen_enabled
= 0b00000000000000001000000000000000

Guild has a welcome screen.

g_member_verification_gate
= 0b00000000000000010000000000000000

Guild has a member verification gate.

g_preview_enabled
= 0b00000000000000100000000000000000

Guild has a preview.

g_no_join_notifications
= 0b00000000000001000000000000000000

Guild join notifications are off.

g_no_boost_notifications
= 0b00000000000010000000000000000000

Guild boost notifications are off.

g_has_animated_icon
= 0b00000000000100000000000000000000

Guild has an actual animated icon (set by the icon hash starting with 'a_').

g_has_animated_banner
= 0b00000000001000000000000000000000

Guild has an actual animated banner (set by the icon hash starting with 'a_').

g_no_setup_tips
= 0b00000000010000000000000000000000

Guild setup tips are off.

g_no_sticker_greeting
= 0b00000000100000000000000000000000

"Wave to say hi" sticker prompt buttons are off

g_monetization_enabled
= 0b00000001000000000000000000000000

Guild has enabled monetization.

g_more_stickers
= 0b00000010000000000000000000000000

Guild has increased custom sticker slots.

g_creator_store_page_enabled
= 0b00000100000000000000000000000000

Guild has enabled the role subscription promo page.

g_role_icons
= 0b00001000000000000000000000000000

Guild is able to set role icons.

g_seven_day_thread_archive
= 0b00010000000000000000000000000000

Guild has access to the seven day archive time for threads.

Deprecated

Removed by Discord

g_three_day_thread_archive
= 0b00100000000000000000000000000000

Guild has access to the three day archive time for threads.

Deprecated

Removed by Discord

g_ticketed_events
= 0b01000000000000000000000000000000

Guild has enabled ticketed events.

g_channel_banners
= 0b10000000000000000000000000000000

Guild can have channel banners.

Deprecated

Removed by Discord

The various flags that represent the status of a dpp::guild object.

uint16_t guild_flags_extra dpp::guild_flags_extra g_premium_progress_bar_enabled = 0b0000000000000001

Guild has premium progress bar enabled.

g_animated_banner
= 0b0000000000000010

Guild can have an animated banner (doesn't mean it actually has one though).

g_auto_moderation
= 0b0000000000000100

Guild has auto moderation.

g_invites_disabled
= 0b0000000000001000

Guild has paused invites, preventing new users from joining.

g_developer_support_server
= 0b0000000000010000

Guild has been set as support server of an app in the App Directory.

g_no_role_subscription_notifications
= 0b0000000000100000

Guild role subscription purchase and renewal notifications are off.

g_no_role_subscription_notification_replies
= 0b0000000001000000

Guild role subscription sticker reply buttons are off.

g_role_subscriptions_available_for_purchase
= 0b0000000010000000

Guild has role subscriptions that can be purchased.

g_raid_alerts_disabled
= 0b0000000100000000

Guild has disabled alerts for join raids in the configured safety alerts channel.

Additional boolean flag values for guild, as guild_flags is full.

uint16_t guild_member_flags dpp::guild_member_flags gm_deaf = 0b0000000000000001

Member deafened in voice channel.

gm_mute
= 0b0000000000000010

Member muted in voice channels.

gm_pending
= 0b0000000000000100

Member pending verification by membership screening.

gm_animated_avatar
= 0b0000000000001000

Member has animated guild-specific avatar.

gm_voice_action
= 0b0000000000010000

gm_deaf or gm_mute has been toggled

gm_did_rejoin
= 0b0000000000100000

Member has left and rejoined the guild.

gm_completed_onboarding
= 0b0000000001000000

Member has completed onboarding.

gm_bypasses_verification
= 0b0000000010000000

Member is exempt from guild verification requirements.

gm_started_onboarding
= 0b0000000100000000

Member has started onboarding.

gm_roles_action
= 0b0000001000000000

Should change roles on next call to edit guild_member?

This is set by dpp::guild_member::add_role, dpp::guild_member::remove_role, and dpp::guild_member::set_roles. You should only ever use this value if you know what you're doing, otherwise stick to the three functions listed.

gm_nickname_action
= 0b0000010000000000

Should nicknames on next call to edit guild_member?

This is set by dpp::guild_member::set_nickname. You should only ever use this value if you know what you're doing, otherwise stick to the function listed.

Various flags that can be used to indicate the status of a guild member.

Use the setter functions in dpp::guild_member and do not toggle the bits yourself.

uint8_t guild_nsfw_level_t dpp::guild_nsfw_level_t nsfw_default = 0

Default setting, not configured.

nsfw_explicit
= 1

Explicit content may be in this guild.

nsfw_safe
= 2

Safe for work content only.

nsfw_age_restricted
= 3

Age restricted, 18+.

Guild NSFW level. Used to represent just how naughty this guild is. Naughty guild, go sit in the corner.

This is set by Discord, and cannot be set by any bot or user on the guild.

uint8_t guild_premium_tier_t dpp::guild_premium_tier_t tier_none = 0

Guild has not unlocked any Server Boost perks.

tier_1
= 1

Guild has unlocked Server Boost level 1 perks.

tier_2
= 2

Guild has unlocked Server Boost level 2 perks.

tier_3
= 3

Guild has unlocked Server Boost level 3 perks.

The guild's premium tier.

uint8_t http_error dpp::http_error h_success = 0

Request successful.

h_unknown

Status unknown.

h_connection

Connect failed.

h_bind_ip_address

Invalid local ip address.

h_read

Read error.

h_write

Write error.

h_exceed_redirect_count

Too many 30x redirects.

h_canceled

Request cancelled.

h_ssl_connection

SSL connection error.

h_ssl_loading_certs

SSL cert loading error.

h_ssl_server_verification

SSL server verification error.

h_unsupported_multipart_boundary_chars

Unsupported multipart boundary characters.

h_compression

Compression error.

Error values. Most of these are currently unused in https_client.

http_method
dpp::http_method
m_get

GET.

m_post

POST.

m_put

PUT.

m_patch

PATCH.

m_delete

DELETE.

Various types of http method supported by the Discord API.

uint8_t http_state dpp::http_state HTTPS_HEADERS

Sending/receiving HTTP headers and request body.

HTTPS_CONTENT

Receiving body content.

HTTPS_DONE

Completed connection, as it was closed or the body is >= Content-Length.

HTTPS_CHUNK_LEN

Received chunk length.

HTTPS_CHUNK_TRAILER

Received chunk trailing CRLF.

HTTPS_CHUNK_LAST

The last received chunk is the final chunk.

HTTPS_CHUNK_CONTENT

Receiving contents of a chunk.

HTTP connection status.

uint8_t image_type dpp::image_type i_png

image/png

i_jpg

image/jpeg.

i_gif

image/gif.

i_webp

Webp.

Supported image types for profile pictures and CDN endpoints.

uint8_t integration_flags dpp::integration_flags if_enabled = 0b00000001

Is this integration enabled?

if_syncing
= 0b00000010

Is this integration syncing?

This is not provided for discord bot integrations.

if_emoticons
= 0b00000100

Whether emoticons should be synced for this integration (twitch only currently).

This is not provided for discord bot integrations.

if_revoked
= 0b00001000

Has this integration been revoked?

This is not provided for discord bot integrations.

if_expire_kick
= 0b00010000

Kick user when their subscription expires, otherwise only remove the role that is specified by `role_id`.

This is not provided for discord bot integrations.

Integration flags.

uint8_t integration_type dpp::integration_type i_twitch

Twitch integration.

i_youtube

YouTube integration.

i_discord

Discord integration.

i_guild_subscription

Subscription.

Integration types.

intents
dpp::intents
i_guilds
= (1 << 0)

Intent for receipt of guild information.

i_guild_members
= (1 << 1)

Intent for receipt of guild members.

i_guild_bans
= (1 << 2)

Intent for receipt of guild bans.

i_guild_emojis
= (1 << 3)

Intent for receipt of guild emojis.

i_guild_integrations
= (1 << 4)

Intent for receipt of guild integrations.

i_guild_webhooks
= (1 << 5)

Intent for receipt of guild webhooks.

i_guild_invites
= (1 << 6)

Intent for receipt of guild invites.

i_guild_voice_states
= (1 << 7)

Intent for receipt of guild voice states.

i_guild_presences
= (1 << 8)

Intent for receipt of guild presences.

i_guild_messages
= (1 << 9)

Intent for receipt of guild messages.

i_guild_message_reactions
= (1 << 10)

Intent for receipt of guild message reactions.

i_guild_message_typing
= (1 << 11)

Intent for receipt of guild message typing notifications.

i_direct_messages
= (1 << 12)

Intent for receipt of direct messages (DMs).

i_direct_message_reactions
= (1 << 13)

Intent for receipt of direct message reactions.

i_direct_message_typing
= (1 << 14)

Intent for receipt of direct message typing notifications.

i_message_content
= (1 << 15)

Intent for receipt of message content.

i_guild_scheduled_events
= (1 << 16)

Scheduled events.

i_auto_moderation_configuration
= (1 << 20)

Auto moderation configuration.

i_auto_moderation_execution
= (1 << 21)

Auto moderation configuration.

i_guild_message_polls
= (1 << 24)

Intent for receipt of guild message poll votes.

i_direct_message_polls
= (1 << 25)

Intent for receipt of direct message poll votes.

i_default_intents
= dpp::i_guilds | dpp::i_guild_bans | dpp::i_guild_emojis | dpp::i_guild_integrations | dpp::i_guild_webhooks | dpp::i_guild_invites | dpp::i_guild_voice_states | dpp::i_guild_messages | dpp::i_guild_message_reactions | dpp::i_guild_message_typing | dpp::i_direct_messages | dpp::i_direct_message_typing | dpp::i_direct_message_reactions | dpp::i_guild_scheduled_events | dpp::i_auto_moderation_configuration | dpp::i_auto_moderation_execution | dpp::i_guild_message_polls | dpp::i_direct_message_polls

Default D++ intents (all non-privileged intents).

i_privileged_intents
= dpp::i_guild_members | dpp::i_guild_presences | dpp::i_message_content

Privileged intents requiring ID.

i_all_intents
= dpp::i_default_intents | dpp::i_privileged_intents

Every single intent (dpp::i_default_intents and dpp::i_privileged_intents).

i_unverified_default_intents
= dpp::i_default_intents | dpp::i_message_content

Unverified bots default intents.

intents are a bitmask of allowed events on your websocket.

Some of these are known as Privileged intents (GUILD_MEMBERS and GUILD_PRESENCES) and require verification of a bot over 100 servers by discord via submission of your real life ID.

interaction_context_type
dpp::interaction_context_type
itc_guild
= 0

Interaction can be used within servers.

itc_bot_dm
= 1

Interaction can be used within DMs with the app's bot user.

itc_private_channel
= 2

Interaction can be used within Group DMs and DMs other than the app's bot user.

interaction_response_type
dpp::interaction_response_type
ir_pong
= 1

Acknowledge a Ping.

ir_channel_message_with_source
= 4

Respond to an interaction with a message.

ir_deferred_channel_message_with_source
= 5

Acknowledge an interaction and edit a response later, the user sees a loading state.

ir_deferred_update_message
= 6

For components, acknowledge an interaction and edit the original message later; the user does not see a loading state.

ir_update_message
= 7

For components, edit the message the component was attached to.

ir_autocomplete_reply
= 8

Reply to autocomplete interaction.

Be sure to do this within 500ms of the interaction!

ir_modal_dialog
= 9

A modal dialog box.

Not available for modal submit and ping interactions.

ir_premium_required
= 10

Acknowledge a interaction with an upgrade button, only available for apps with monetization enabled.

https://discord.com/developers/docs/monetization/entitlements#premiumrequired-interaction-response

Not available for autocomplete and ping interactions.

This response does not support using `content`, `embeds`, or `attachments`, so reply with no data when using this!

@depreciated Replaced with buttons with a style of cos_premium This interaction type may stop working at any point

Response types when responding to an interaction within on_interaction_create.

interaction_type
dpp::interaction_type
it_ping
= 1

A ping interaction.

it_application_command
= 2

Application command (slash command) interaction.

it_component_button
= 3

Button click or select menu chosen (component interaction).

it_autocomplete
= 4

Autocomplete interaction.

it_modal_submit
= 5

Modal form submission.

Types of interaction in the dpp::interaction class

uint8_t invite_target_t dpp::invite_target_t itt_none = 0

Undefined invite target type.

itt_stream
= 1

Stream target type.

itt_embedded_application
= 2

Embedded Application target type.

Invite target types for dpp::invite.

loglevel
dpp::loglevel
ll_trace
= 0

Trace.

ll_debug

Debug.

ll_info

Information.

ll_warning

Warning.

ll_error

Error.

ll_critical

Critical.

Log levels.

uint8_t media_loading_state dpp::media_loading_state ls_unknown = 0

Loading state is unknown.

ls_loading
= 1

Discord is loading the media.

ls_loaded_success
= 2

The image was processed and loaded successfully.

ls_not_found
= 3

The media was not found.

Loading state for "unfurled" media, e.g. thumbnails and images in a message or component.

uint16_t message_flags dpp::message_flags m_crossposted = 1 << 0

This message has been published to subscribed channels (via Channel Following).

m_is_crosspost
= 1 << 1

This message originated from a message in another channel (via Channel Following).

m_suppress_embeds
= 1 << 2

Do not include any embeds when serializing this message.

m_source_message_deleted
= 1 << 3

The source message for this crosspost has been deleted (via Channel Following).

m_urgent
= 1 << 4

This message came from the urgent message system.

m_has_thread
= 1 << 5

This message has an associated thread, with the same id as the message.

m_ephemeral
= 1 << 6

This message is only visible to the user who invoked the Interaction.

m_loading
= 1 << 7

This message is an Interaction Response and the bot is "thinking".

m_thread_mention_failed
= 1 << 8

This message failed to mention some roles and add their members to the thread.

m_suppress_notifications
= 1 << 12

This message will not trigger push and desktop notifications.

m_is_voice_message
= 1 << 13

This message is a voice message.

m_has_snapshot
= 1 << 14

Contains forwarded snapshot.

m_using_components_v2
= 1 << 15

Message components vector contains v2 components.

Bitmask flags for a dpp::message.

uint8_t message_search_has dpp::message_search_has has_image has_sound has_video has_file has_sticker has_embed has_link has_poll has_snapshot

Possible values for the "has" filter in message search.

uint8_t message_search_order dpp::message_search_order sort_desc sort_asc

Sort order for message search results.

uint8_t message_search_sort dpp::message_search_sort sort_timestamp sort_relevance

Sort mode for message search results.

uint8_t message_type dpp::message_type mt_default = 0

Default.

mt_recipient_add
= 1

Add recipient.

mt_recipient_remove
= 2

Remove recipient.

mt_call
= 3

Call.

mt_channel_name_change
= 4

Channel name change.

mt_channel_icon_change
= 5

Channel icon change.

mt_channel_pinned_message
= 6

Message pinned.

mt_guild_member_join
= 7

Member joined.

mt_user_premium_guild_subscription
= 8

Boost.

mt_user_premium_guild_subscription_tier_1
= 9

Boost level 1.

mt_user_premium_guild_subscription_tier_2
= 10

Boost level 2.

mt_user_premium_guild_subscription_tier_3
= 11

Boost level 3.

mt_channel_follow_add
= 12

Follow channel.

mt_guild_discovery_disqualified
= 14

Disqualified from discovery.

mt_guild_discovery_requalified
= 15

Re-qualified for discovery.

mt_guild_discovery_grace_period_initial_warning
= 16

Discovery grace period warning 1.

mt_guild_discovery_grace_period_final_warning
= 17

Discovery grace period warning 2.

mt_thread_created
= 18

Thread Created.

mt_reply
= 19

Reply.

mt_application_command
= 20

Application command.

mt_thread_starter_message
= 21

Thread starter message.

mt_guild_invite_reminder
= 22

Invite reminder.

mt_context_menu_command
= 23

Context Menu Command.

mt_auto_moderation_action
= 24

Auto moderation action.

mt_role_subscription_purchase
= 25

Role subscription purchase.

mt_interaction_premium_upsell
= 26

Interaction premium upsell @depreciated Replaced with buttons with a style of cos_premium This message type may stop working at any point.

mt_stage_start
= 27

Stage start.

mt_stage_end
= 28

Stage end.

mt_stage_speaker
= 29

Stage speaker.

mt_stage_topic
= 31

Stage topic.

mt_application_premium_subscription
= 32

Guild application premium subscription.

Message types for dpp::message::type.

uint8_t mfa_level_t dpp::mfa_level_t mfa_none = 0

MFA not elevated.

mfa_elevated
= 1

MFA elevated.

MFA level for server. If set to elevated all moderators need MFA to perform specific actions such as kick or ban.

uint8_t onboarding_mode dpp::onboarding_mode gom_default = 0

Counts only Default Channels towards constraints.

gom_advanced
= 1

Counts Default Channels and Questions towards constraints.

The onboarding mode for the dpp::onboarding object. Defines the criteria used to satisfy Onboarding constraints that are required for enabling.

uint8_t onboarding_prompt_flags dpp::onboarding_prompt_flags opf_single_select = 1 << 0

Indicates whether users are limited to selecting one option for the prompt.

opf_required
= 1 << 1

Indicates whether the prompt is required before a user completes the onboarding flow.

opf_in_onboarding
= 1 << 2

Indicates whether the prompt is present in the onboarding flow. If set, the prompt will only appear in the Channels & Roles tab.

Various flags for dpp::onboarding_prompt.

uint8_t onboarding_prompt_type dpp::onboarding_prompt_type opt_multiple_choice = 0

Multiple choice.

opt_dropdown
= 1

Dropdown.

The various types of dpp::onboarding_prompt.

uint8_t overwrite_type dpp::overwrite_type ot_role = 0

Role.

ot_member
= 1

Member.

channel permission overwrite types

parameter_type
dpp::parameter_type
pt_string

String parameter.

pt_role

Role object parameter.

pt_channel

Channel object parameter.

pt_user

User object parameter.

pt_integer

64 bit signed integer parameter.

pt_double

double floating point parameter.

pt_boolean

Boolean parameter.

Parameter types when registering a command. We don't pass these in when triggering the command in the handler, because it is expected the developer added the command so they know what types to expect for each named parameter.

uint64_t permissions dpp::permissions p_create_instant_invite = 0x00000000001

Allows creation of instant invites.

p_kick_members
= 0x00000000002

Allows kicking members.

p_ban_members
= 0x00000000004

Allows banning members.

p_administrator
= 0x00000000008

Allows all permissions and bypasses channel permission overwrites.

p_manage_channels
= 0x00000000010

Allows management and editing of channels.

p_manage_guild
= 0x00000000020

Allows management and editing of the guild.

p_add_reactions
= 0x00000000040

Allows for the addition of reactions to messages.

p_view_audit_log
= 0x00000000080

Allows for viewing of audit logs.

p_priority_speaker
= 0x00000000100

Allows for using priority speaker in a voice channel.

p_stream
= 0x00000000200

Allows the user to go live.

p_view_channel
= 0x00000000400

Allows guild members to view a channel, which includes reading messages in text channels and joining voice channels.

p_send_messages
= 0x00000000800

Allows for sending messages in a channel.

p_send_tts_messages
= 0x00000001000

Allows for sending of /tts messages.

p_manage_messages
= 0x00000002000

Allows for deletion of other users messages.

p_embed_links
= 0x00000004000

Links sent by users with this permission will be auto-embedded.

p_attach_files
= 0x00000008000

Allows for uploading images and files.

p_read_message_history
= 0x00000010000

Allows for reading of message history.

p_mention_everyone
= 0x00000020000

Allows for using the everyone and the here tag to notify users in a channel.

p_use_external_emojis
= 0x00000040000

Allows the usage of custom emojis from other servers.

p_view_guild_insights
= 0x00000080000

Allows for viewing guild insights.

p_connect
= 0x00000100000

Allows for joining of a voice channel.

p_speak
= 0x00000200000

Allows for speaking in a voice channel.

p_mute_members
= 0x00000400000

Allows for muting members in a voice channel.

p_deafen_members
= 0x00000800000

Allows for deafening of members in a voice channel.

p_move_members
= 0x00001000000

Allows for moving of members between voice channels.

p_use_vad
= 0x00002000000

Allows for using voice-activity-detection in a voice channel.

p_change_nickname
= 0x00004000000

Allows for modification of own nickname.

p_manage_nicknames
= 0x00008000000

Allows for modification of other users nicknames.

p_manage_roles
= 0x00010000000

Allows management and editing of roles.

p_manage_webhooks
= 0x00020000000

Allows management and editing of webhooks.

p_manage_emojis_and_stickers
= 0x00040000000

Allows management and editing of emojis and stickers.

p_use_application_commands
= 0x00080000000

Allows members to use application commands, including slash commands and context menus.

p_request_to_speak
= 0x00100000000

Allows for requesting to speak in stage channels.

Discord: This permission is under active development and may be changed or removed.

p_manage_events
= 0x00200000000

Allows for management (creation, updating, deleting, starting) of scheduled events.

p_manage_threads
= 0x00400000000

Allows for deleting and archiving threads, and viewing all private threads.

p_create_public_threads
= 0x00800000000

Allows for creating public and announcement threads.

p_create_private_threads
= 0x01000000000

Allows for creating private threads.

p_use_external_stickers
= 0x02000000000

Allows the usage of custom stickers from other servers.

p_send_messages_in_threads
= 0x04000000000

Allows for sending messages in threads.

p_use_embedded_activities
= 0x08000000000

Allows for using activities (applications with the EMBEDDED flag) in a voice channel.

p_moderate_members
= 0x10000000000

Allows for timing out users to prevent them from sending or reacting to messages in chat and threads, and from speaking in voice and stage channels.

p_view_creator_monetization_analytics
= 0x20000000000

Allows for viewing role subscription insights.

p_use_soundboard
= 0x40000000000

Allows for using soundboard in a voice channel.

p_create_guild_expressions
= 0x80000000000

Allows for creating emojis, stickers, and soundboard sounds, and editing and deleting those created by the current user.

Not yet available to developers.

https://discord.com/developers/docs/change-log#clarification-on-permission-splits-for-expressions-and-events

p_create_events
= 0x0000100000000000

Allows for creating scheduled events, and editing and deleting those created by the current user.

Not yet available to developers.

https://discord.com/developers/docs/change-log#clarification-on-permission-splits-for-expressions-and-events

p_use_external_sounds
= 0x0000200000000000

Allows the usage of custom soundboard sounds from other servers.

p_send_voice_messages
= 0x0000400000000000

Allows sending voice messages.

p_use_clyde_ai
= 0x0000800000000000

Allows use of Clyde AI.

p_send_polls
= 0x0002000000000000

Allows sending polls.

p_use_external_apps
= 0x0004000000000000

Allows user-installed apps to send public responses. When disabled, users will still be allowed to use their apps but the responses will be ephemeral.

This only applies to apps not also installed to the server.

p_pin_messages
= 0x0008000000000000

Allows pinning and unpinning messages.

p_bypass_slowmode
= 0x0010000000000000

Allows members to bypass the slow mode rate limit for sending messages in a channel.

Represents the various discord permissions.

poll_layout_type
dpp::poll_layout_type
pl_default
= 1

According to Discord, quote, "The, uhm, default layout type.".

Poll layout types.

At the time of writing Discord only has 1, "The, uhm, default layout type."

https://discord.com/developers/docs/resources/poll#layout-type

presence_flags
dpp::presence_flags
p_desktop_online
= 0b00000001

Desktop: Online.

p_desktop_dnd
= 0b00000010

Desktop: DND.

p_desktop_idle
= 0b00000011

Desktop: Idle.

p_web_online
= 0b00000100

Web: Online.

p_web_dnd
= 0b00001000

Web: DND.

p_web_idle
= 0b00001100

Web: Idle.

p_mobile_online
= 0b00010000

Mobile: Online.

p_mobile_dnd
= 0b00100000

Mobile: DND.

p_mobile_idle
= 0b00110000

Mobile: Idle.

p_status_online
= 0b01000000

General: Online.

p_status_dnd
= 0b10000000

General: DND.

p_status_idle
= 0b11000000

General: Idle.

Presence flags bitmask.

uint8_t presence_status dpp::presence_status ps_offline = 0

Offline.

ps_online
= 1

Online.

ps_dnd
= 2

DND.

ps_idle
= 3

Idle.

ps_invisible
= 4

Invisible (show as offline).

Online presence status values.

raii_socket_type
dpp::raii_socket_type
rst_udp
rst_tcp
uint8_t region dpp::region r_brazil

Brazil.

r_central_europe

Central Europe.

r_hong_kong

Hong Kong.

r_india

India.

r_japan

Japan.

r_russia

Russia.

r_singapore

Singapore.

r_south_africa

South Africa.

r_sydney

Sydney.

r_us_central

US Central.

r_us_east

US East Coast.

r_us_south

US South.

r_us_west

US West Coast.

r_western_europe

Western Europe.

Represents voice regions for guilds and channels.

Deprecated

Deprecated in favour of per-channel regions. Please use dpp::channel::rtc_region instead.

uint8_t role_flags dpp::role_flags r_hoist = 0b00000001

Hoisted role (if the role is pinned in the user listing).

r_managed
= 0b00000010

Managed role (introduced by a bot or application).

r_mentionable
= 0b00000100

Whether this role is mentionable with a ping.

r_premium_subscriber
= 0b00001000

Whether this is the guild's booster role.

r_available_for_purchase
= 0b00010000

Whether the role is available for purchase.

r_guild_connections
= 0b00100000

Whether the role is a guild's linked role.

r_in_prompt
= 0b01000000

Whether the role can be selected by members in an onboarding prompt.

Various flags related to dpp::role.

uint8_t separator_spacing dpp::separator_spacing sep_small = 1

Small separator.

sep_large
= 2

Large separator.

Spacing types for components v2 separator.

int shard_frame_type dpp::shard_frame_type ft_dispatch = 0

An event was dispatched.

Receive only

ft_heartbeat
= 1

Fired periodically by the client to keep the connection alive.

Send/Receive

ft_identify
= 2

Starts a new session during the initial handshake.

Send only

ft_presence
= 3

Update the client's presence.

Send only

ft_voice_state_update
= 4

Used to join/leave or move between voice channels.

Send only

ft_resume
= 6

Resume a previous session that was disconnected.

Send only

ft_reconnect
= 7

You should attempt to reconnect and resume immediately.

Receive only

ft_request_guild_members
= 8

Request information about offline guild members in a large guild.

Send only

ft_invalid_session
= 9

The session has been invalidated. You should reconnect and identify/resume accordingly.

Receive only

ft_hello
= 10

Sent immediately after connecting, contains the heartbeat interval to use.

Receive only

ft_heartbeat_ack
= 11

Sent in response to receiving a heartbeat to acknowledge that it has been received.

Receive only

ft_request_soundboard_sounds
= 31

Request information about soundboard sounds in a set of guilds.

Send only

Represents different event opcodes sent and received on a shard websocket.

These are used internally to route frames.

uint16_t sku_flags dpp::sku_flags sku_available = 0b000000000000100

SKU is available for purchase.

sku_guild_subscription
= 0b000000010000000

Recurring SKU that can be purchased by a user and applied to a single server. Grants access to every user in that server.

sku_user_subscription
= 0b000000100000000

Recurring SKU purchased by a user for themselves. Grants access to the purchasing user in every server.

SKU flags.

uint8_t sku_type dpp::sku_type DURABLE = 2

Represents a durable one-time purchase.

CONSUMABLE
= 3

Consumable one-time purchase.

SUBSCRIPTION
= 5

Represents a recurring subscription.

SUBSCRIPTION_GROUP
= 6

System-generated group for each SUBSCRIPTION SKU created.

These are automatically created for each subscription SKU and are not used at this time. Please refrain from using these.

The type of SKU.

slashcommand_contextmenu_type
dpp::slashcommand_contextmenu_type
ctxm_none
= 0

Undefined context menu type.

ctxm_chat_input
= 1

DEFAULT: these are the generic slash commands (e.g. /ping, /pong, etc).

ctxm_user
= 2

A slashcommand that goes in the user context menu.

ctxm_message
= 3

A slashcommand that goes in the message context menu.

Right-click context menu types.

uint8_t socket_event_flags dpp::socket_event_flags WANT_READ = 1

Socket wants to receive events when it can be read from. This is provided by the underlying implementation.

WANT_WRITE
= 2

Socket wants to receive events when it can be written to. This is provided by the underlying implementation, and will be a one-off event. If you want to receive ongoing write events you must re-request this event type each time.

WANT_ERROR
= 4

Socket wants to receive events that indicate an error condition. Note that EOF (graceful close) is not an error condition and is indicated by errno being 0 and ::read() returning 0.

WANT_DELETION
= 8

Socket should be removed as soon as is safe to do so. Generally, this is after the current iteration through the active event list.

Types of IO events a socket may subscribe to.

uint8_t socket_listener_type dpp::socket_listener_type li_plaintext li_ssl
uint8_t stage_privacy_level dpp::stage_privacy_level sp_public = 1

The Stage instance is visible publicly, such as on Stage Discovery.

sp_guild_only
= 2

The Stage instance is visible to only guild members.

Represents the privacy of a stage instance.

bool start_type dpp::start_type st_wait = false

Wait forever on a condition variable. The cluster will spawn threads for each shard and start() will not return in normal operation.

st_return
= true

Return immediately after starting shard threads. If you set the parameter of cluster::start() to this value, you will have to manage the lifetime and scope of your cluster object yourself. Taking it out of scope or deleting its pointer will terminate the bot.

Types of startup for cluster::start().

uint8_t sticker_format dpp::sticker_format sf_png = 1 sf_apng = 2 sf_lottie = 3 sf_gif = 4

The file format (png, apng, lottie) of a sticker.

uint8_t sticker_type dpp::sticker_type st_standard = 1

An official sticker in a pack.

st_guild
= 2

Guild sticker.

Represents the type of a sticker.

uint8_t team_member_role_t dpp::team_member_role_t tmr_owner

Team owner.

tmr_admin

Team admin.

tmr_developer

Developer.

tmr_readonly

Read-Only.

Team member role types for application team members.

These are hard coded to string forms by discord. If further types are added, this enum will be extended to support them.

uint8_t team_member_status dpp::team_member_status tms_invited = 1

User was invited to the team.

tms_accepted
= 2

User has accepted membership onto the team.

status of a member of a team who maintain a bot/application

uint8_t text_style_type dpp::text_style_type text_short = 1

Intended for short single-line text.

text_paragraph
= 2

Intended for much longer inputs.

Types of text input.

uint32_t user_flags dpp::user_flags u_bot = 0b00000000000000000000000000000001

User is a bot.

u_system
= 0b00000000000000000000000000000010

User is a system user (Clyde!).

u_mfa_enabled
= 0b00000000000000000000000000000100

User has multi-factor authentication enabled.

u_verified
= 0b00000000000000000000000000001000

User is verified (verified email address).

u_nitro_full
= 0b00000000000000000000000000010000

User has full nitro.

u_nitro_classic
= 0b00000000000000000000000000100000

User has nitro classic.

u_discord_employee
= 0b00000000000000000000000001000000

User is discord staff.

u_partnered_owner
= 0b00000000000000000000000010000000

User owns a partnered server.

u_hypesquad_events
= 0b00000000000000000000000100000000

User is a member of hypesquad events.

u_bughunter_1
= 0b00000000000000000000001000000000

User has BugHunter level 1.

u_house_bravery
= 0b00000000000000000000010000000000

User is a member of House Bravery.

u_house_brilliance
= 0b00000000000000000000100000000000

User is a member of House Brilliance.

u_house_balance
= 0b00000000000000000001000000000000

User is a member of House Balance.

u_early_supporter
= 0b00000000000000000010000000000000

User is an early supporter.

u_team_user
= 0b00000000000000000100000000000000

User is a team user.

u_bughunter_2
= 0b00000000000000001000000000000000

User is has Bug Hunter level 2.

u_verified_bot
= 0b00000000000000010000000000000000

User is a verified bot.

u_verified_bot_dev
= 0b00000000000000100000000000000000

User has the Early Verified Bot Developer badge.

u_animated_icon
= 0b00000000000001000000000000000000

User's icon is animated.

u_certified_moderator
= 0b00000000000010000000000000000000

User is a certified moderator.

u_bot_http_interactions
= 0b00000000000100000000000000000000

User is a bot using HTTP interactions.

shows online even when not connected to a websocket.

u_nitro_basic
= 0b00000000001000000000000000000000

User has nitro basic.

u_active_developer
= 0b00000000010000000000000000000000

User has the active developer badge.

u_animated_banner
= 0b00000000100000000000000000000000

User's banner is animated.

Various bitmask flags used to represent information about a dpp::user.

uint8_t verification_level_t dpp::verification_level_t ver_none = 0

Unrestricted.

ver_low
= 1

Must have verified email on account.

ver_medium
= 2

Must be registered on Discord for longer than 5 minutes.

ver_high
= 3

Must be a member of the server for longer than 10 minutes.

ver_very_high
= 4

Must have a verified phone number.

Guild verification level.

uint8_t voice_websocket_opcode_t dpp::voice_websocket_opcode_t voice_opcode_connection_identify = 0 voice_opcode_connection_select_protocol = 1 voice_opcode_connection_ready = 2 voice_opcode_connection_heartbeat = 3 voice_opcode_connection_description = 4 voice_opcode_client_speaking = 5 voice_opcode_connection_heartbeat_ack = 6 voice_opcode_connection_resume = 7 voice_opcode_connection_hello = 8 voice_opcode_connection_resumed = 9 voice_opcode_multiple_clients_connect = 11 voice_opcode_client_disconnect = 13 voice_opcode_media_sink = 15 voice_client_flags = 18 voice_client_platform = 20 voice_client_dave_prepare_transition = 21 voice_client_dave_execute_transition = 22 voice_client_dave_transition_ready = 23 voice_client_dave_prepare_epoch = 24 voice_client_dave_mls_external_sender = 25 voice_client_dave_mls_key_package = 26 voice_client_dave_mls_proposals = 27 voice_client_dave_mls_commit_message = 28 voice_client_dave_announce_commit_transition = 29 voice_client_dave_mls_welcome = 30 voice_client_dave_mls_invalid_commit_welcome = 31

Discord voice websocket opcode types.

voiceregion_flags
dpp::voiceregion_flags
v_optimal
= 0x00000001

The closest (optimal) voice region.

v_deprecated
= 0x00000010

A Deprecated voice region (avoid switching to these).

v_custom
= 0x00000100

A custom voice region (used for events/etc).

Flags related to a voice region.

voicestate_flags
dpp::voicestate_flags
vs_deaf
= 0b00000001

Deafened by the server.

vs_mute
= 0b00000010

Muted by the server.

vs_self_mute
= 0b00000100

Locally Muted.

vs_self_deaf
= 0b00001000

Locally deafened.

vs_self_stream
= 0b00010000

Whether this user is streaming using "Go Live".

vs_self_video
= 0b00100000

Whether this user's camera is enabled.

vs_suppress
= 0b01000000

Whether this user's permission to speak is denied.

Bit mask flags relating to voice states.

webhook_type
dpp::webhook_type
w_incoming
= 1

Incoming webhook.

w_channel_follower
= 2

Channel following webhook.

w_application
= 3

Application webhooks for interactions.

Defines types of webhook.

uint8_t websocket_protocol_t dpp::websocket_protocol_t ws_json = 0

JSON data, text, UTF-8 character set.

ws_etf
= 1

Erlang Term Format (ETF) binary protocol.

Websocket protocol types available on Discord.

uint8_t ws_opcode dpp::ws_opcode OP_CONTINUATION = 0x00

Continuation.

OP_TEXT
= 0x01

Text frame.

OP_BINARY
= 0x02

Binary frame.

OP_CLOSE
= 0x08

Close notification with close code.

OP_PING
= 0x09

Low level ping.

OP_PONG
= 0x0a

Low level pong.

OP_AUTO
= 0xff

Automatic selection of type.

Low-level websocket opcodes for frames.

uint8_t ws_state dpp::ws_state HTTP_HEADERS

Sending/receiving HTTP headers, acting as a standard HTTP connection. This is the state prior to receiving "HTTP/1.1 101 Switching Protocols" from the server side.

CONNECTED

Connected as a websocket, and "upgraded". Now talking using binary frames.

Websocket connection status.

std::map< snowflake, active_thread_info > using dpp::active_threads = std::map<snowflake, active_thread_info> active_threads dpp::active_threads

A map of threads alongside optionally the thread_member tied to the bot if it is in the thread. The map's key is the thread id. Returned from the cluster::threads_get_active method.

std::unordered_map< snowflake, application > typedef std::unordered_map<snowflake, application> dpp::application_map application_map dpp::application_map

A group of applications.

This is not currently ever sent by Discord API but the DPP standard setup for objects that can be received by REST has the possibility for this, so this exists. Don't ever expect to see one at present.

std::vector< application_role_connection_metadata > typedef std::vector<application_role_connection_metadata> dpp::application_role_connection_metadata_list application_role_connection_metadata_list dpp::application_role_connection_metadata_list

A group of dpp::application_role_connection_metadata objects.

std::unordered_map< snowflake, automod_rule > typedef std::unordered_map<snowflake, automod_rule> dpp::automod_rule_map automod_rule_map dpp::automod_rule_map

A group of automod rules.

std::unordered_map< snowflake, ban > typedef std::unordered_map<snowflake, ban> dpp::ban_map ban_map dpp::ban_map

A group of bans. The key is the user ID.

dpp::collector< dpp::channel_create_t, dpp::channel > typedef dpp::collector<dpp::channel_create_t, dpp::channel> dpp::channel_collector_t channel_collector_t dpp::channel_collector_t

Template type for base class of channel collector.

std::unordered_map< snowflake, channel > typedef std::unordered_map<snowflake, channel> dpp::channel_map channel_map dpp::channel_map

A group of channels.

std::function< void(const confirmation_callback_t &)> typedef std::function< void(const confirmation_callback_t &)> dpp::command_completion_event_t = std::function<void(const confirmation_callback_t&)> command_completion_event_t dpp::command_completion_event_t

A function used as a callback for any REST based command.

A callback upon command completion.

std::function< void(const std::string &, const parameter_list_t &, command_source)> typedef std::function<void(const std::string&, const parameter_list_t&, command_source)> dpp::command_handler command_handler dpp::command_handler

The function definition for a command handler. Expects a command name string, and a list of command parameters.

Deprecated

commandhandler and message commands are deprecated and dpp::slashcommand is encouraged as a replacement.

std::variant< std::monostate, int64_t, double > typedef std::variant<std::monostate, int64_t, double> dpp::command_option_range command_option_range dpp::command_option_range

A minimum or maximum value/length for dpp::co_number, dpp::co_integer and dpp::co_string types of a dpp::command_option. The `int64_t` is for the integer range or string length that can be entered. The `double` is for the decimal range that can be entered.

std::variant< std::monostate, std::string, dpp::role, dpp::channel, dpp::resolved_user, int64_t, bool, double > typedef std::variant<std::monostate, std::string, dpp::role, dpp::channel, dpp::resolved_user, int64_t, bool, double> dpp::command_parameter command_parameter dpp::command_parameter

Represents a received parameter. We use variant so that multiple non-related types can be contained within.

std::variant< std::monostate, std::string, int64_t, bool, snowflake, double > typedef std::variant<std::monostate, std::string, int64_t, bool, snowflake, double> dpp::command_value command_value dpp::command_value

This type is a variant that can hold any of the potential native data types represented by the enum dpp::command_option_type. It is used in interactions.

std::monostate indicates an invalid parameter value, e.g. an unfilled optional parameter. std::int64_t will be for all integer options, double for decimal numbers and dpp::snowflake for anything ID related.

You can retrieve them with std::get().

partial_emoji using dpp::component_emoji = partial_emoji component_emoji dpp::component_emoji

An emoji for a component. Alias to partial_emoji, for backwards compatibility.

partial_emoji

std::variant< active_threads, application_role_connection, application_role_connection_metadata_list, confirmation, message, message_map, message_pin_map, user, user_identified, user_map, guild_member, guild_member_map, channel, channel_map, thread_member, thread_member_map, guild, guild_map, guild_command_permissions, guild_command_permissions_map, role, role_map, invite, invite_map, dtemplate, dtemplate_map, emoji, emoji_map, ban, ban_map, voiceregion, voiceregion_map, voicestate, integration, integration_map, webhook, webhook_map, prune, guild_widget, gateway, interaction, interaction_response, auditlog, slashcommand, slashcommand_map, stage_instance, sticker, sticker_map, sticker_pack, sticker_pack_map, application, application_map, connection, connection_map, thread, thread_map, scheduled_event, scheduled_event_map, event_member, event_member_map, automod_rule, automod_rule_map, onboarding, welcome_screen, entitlement, entitlement_map, sku, sku_map, message_search_result > typedef std::variant< active_threads, application_role_connection, application_role_connection_metadata_list, confirmation, message, message_map, message_pin_map, user, user_identified, user_map, guild_member, guild_member_map, channel, channel_map, thread_member, thread_member_map, guild, guild_map, guild_command_permissions, guild_command_permissions_map, role, role_map, invite, invite_map, dtemplate, dtemplate_map, emoji, emoji_map, ban, ban_map, voiceregion, voiceregion_map, voicestate, integration, integration_map, webhook, webhook_map, prune, guild_widget, gateway, interaction, interaction_response, auditlog, slashcommand, slashcommand_map, stage_instance, sticker, sticker_map, sticker_pack, sticker_pack_map, application, application_map, connection, connection_map, thread, thread_map, scheduled_event, scheduled_event_map, event_member, event_member_map, automod_rule, automod_rule_map, onboarding, welcome_screen, entitlement, entitlement_map, sku, sku_map, message_search_result > dpp::confirmable_t confirmable_t dpp::confirmable_t

A container for types that can be returned for a REST API call.

std::unordered_map< snowflake, connection > typedef std::unordered_map<snowflake, connection> dpp::connection_map connection_map dpp::connection_map

A group of connections.

std::unordered_map< std::string, std::unique_ptr< dns_cache_entry > > using dpp::dns_cache_t = std::unordered_map<std::string, std::unique_ptr<dns_cache_entry>> dns_cache_t dpp::dns_cache_t

Cache container type.

std::unordered_map< snowflake, dtemplate > typedef std::unordered_map<snowflake, dtemplate> dpp::dtemplate_map dtemplate_map dpp::dtemplate_map

A container of invites.

std::unordered_map< snowflake, emoji > typedef std::unordered_map<snowflake, emoji> dpp::emoji_map emoji_map dpp::emoji_map

Group of emojis.

std::unordered_map< snowflake, entitlement > typedef std::unordered_map<snowflake, entitlement> dpp::entitlement_map entitlement_map dpp::entitlement_map

Group of entitlements.

size_t typedef size_t dpp::event_handle event_handle dpp::event_handle

A returned event handle for an event which was attached.

std::unordered_map< snowflake, event_member > typedef std::unordered_map<snowflake, event_member> dpp::event_member_map event_member_map dpp::event_member_map

A group of scheduled event members.

std::function< void(bool)> using dpp::full_reconnection_callback_t = std::function<void(bool)> full_reconnection_callback_t dpp::full_reconnection_callback_t

A callback for a full reconnection after the voice client disconnects due to error.

std::unordered_map< snowflake, guild_command_permissions > typedef std::unordered_map<snowflake, guild_command_permissions> dpp::guild_command_permissions_map guild_command_permissions_map dpp::guild_command_permissions_map

A group of guild command permissions.

std::unordered_map< snowflake, guild > typedef std::unordered_map<snowflake, guild> dpp::guild_map guild_map dpp::guild_map

A container of guilds.

std::unordered_map< snowflake, guild_member > typedef std::unordered_map<snowflake, guild_member> dpp::guild_member_map guild_member_map dpp::guild_member_map

A container of guild members.

std::function< void(const http_request_completion_t &)> typedef std::function<void(const http_request_completion_t&)> dpp::http_completion_event http_completion_event dpp::http_completion_event

Results of HTTP requests are called back to these std::function types.

Returned http_completion_events are called ASYNCHRONOUSLY in your code which means they execute in a separate thread, results for the requests going into a dpp::thread_pool. Completion events may not arrive in order depending on if one request takes longer than another. Using the callbacks or using coroutines correctly ensures that the order they arrive in the queue does not negatively affect your code.

std::multimap< std::string, std::string > typedef std::multimap<std::string, std::string> dpp::http_headers http_headers dpp::http_headers

Request headers.

std::function< void(class http_server_request *)> using dpp::http_server_request_event = std::function<void(class http_server_request*)> http_server_request_event dpp::http_server_request_event

Callback type for HTTP server request callbacks.

std::function< void(class https_client *)> using dpp::https_client_completion_event = std::function<void(class https_client*)> https_client_completion_event dpp::https_client_completion_event
std::unordered_map< snowflake, integration > typedef std::unordered_map<snowflake, integration> dpp::integration_map integration_map dpp::integration_map

A group of integrations.

std::unordered_map< std::string, invite > typedef std::unordered_map<std::string, invite> dpp::invite_map invite_map dpp::invite_map

A container of invites.

nlohmann::json using dpp::json = nlohmann::json json dpp::json
std::function< void(json &, const http_request_completion_t &)> typedef std::function<void(json&, const http_request_completion_t&)> dpp::json_encode_t json_encode_t dpp::json_encode_t

Automatically JSON encoded HTTP result.

std::unordered_map< snowflake, guild_member > typedef std::unordered_map<snowflake, guild_member> dpp::members_container members_container dpp::members_container

Guild members container.

dpp::collector< dpp::message_create_t, dpp::message > typedef dpp::collector<dpp::message_create_t, dpp::message> dpp::message_collector_t message_collector_t dpp::message_collector_t

Template type for base class of message collector.

std::unordered_map< snowflake, message > typedef std::unordered_map<snowflake, message> dpp::message_map message_map dpp::message_map

A group of messages.

std::unordered_map< snowflake, message_pin > typedef std::unordered_map<snowflake, message_pin> dpp::message_pin_map message_pin_map dpp::message_pin_map

A group of pinned messages.

std::vector< std::pair< std::string, command_parameter > > typedef std::vector<std::pair<std::string, command_parameter> > dpp::parameter_list_t parameter_list_t dpp::parameter_list_t

Parameter list for a called command. See dpp::parameter_registration_t for an explanation as to why vector is used.

std::vector< std::pair< std::string, param_info > > typedef std::vector<std::pair<std::string, param_info> > dpp::parameter_registration_t parameter_registration_t dpp::parameter_registration_t

Parameter list used during registration. Note that use of vector/pair is important here to preserve parameter order, as opposed to unordered_map (which doesn't guarantee any order at all) and std::map, which reorders keys alphabetically.

std::unordered_map< snowflake, presence > typedef std::unordered_map<snowflake, presence> dpp::presence_map presence_map dpp::presence_map

A container of presences.

std::function< void(const std::string &)> using dpp::privacy_code_callback_t = std::function<void(const std::string&)> privacy_code_callback_t dpp::privacy_code_callback_t

A callback for obtaining a user's privacy code. The privacy code is returned as the parameter to the function.

This is a callback function because DAVE requires use of a very resource intensive SCRYPT call, which uses lots of ram and cpu and take significant time.

typename T
moveable_promise< T > using dpp::promise = moveable_promise<T> promise dpp::promise
dpp::collector< dpp::message_reaction_add_t, dpp::collected_reaction > typedef dpp::collector<dpp::message_reaction_add_t, dpp::collected_reaction> dpp::reaction_collector_t reaction_collector_t dpp::reaction_collector_t

Template type for base class of message reaction collector.

std::map< uint32_t, time_t > typedef std::map<uint32_t, time_t> dpp::reconnect_list reconnect_list dpp::reconnect_list

List of shards awaiting reconnection, by id with earliest possible reconnect time.

dpp::collector< dpp::guild_role_create_t, dpp::role > typedef dpp::collector<dpp::guild_role_create_t, dpp::role> dpp::role_collector_t role_collector_t dpp::role_collector_t

Template type for base class of role collector.

std::unordered_map< snowflake, role > typedef std::unordered_map<snowflake, role> dpp::role_map role_map dpp::role_map

A group of roles.

permissions using dpp::role_permissions = permissions role_permissions dpp::role_permissions

Represents the various discord permissions.

Deprecated

Use dpp::permissions instead.

dpp::collector< dpp::guild_scheduled_event_create_t, dpp::scheduled_event > typedef dpp::collector<dpp::guild_scheduled_event_create_t, dpp::scheduled_event> dpp::scheduled_event_collector_t scheduled_event_collector_t dpp::scheduled_event_collector_t

Template type for base class of scheduled event collector.

std::unordered_map< snowflake, scheduled_event > typedef std::unordered_map<snowflake, scheduled_event> dpp::scheduled_event_map scheduled_event_map dpp::scheduled_event_map

A group of scheduled events.

std::map< uint32_t, std::unique_ptr< class discord_client > > typedef std::map<uint32_t, std::unique_ptr<class discord_client> > dpp::shard_list shard_list dpp::shard_list

A list of shards.

std::unordered_map< snowflake, sku > typedef std::unordered_map<snowflake, sku> dpp::sku_map sku_map dpp::sku_map

Group of SKUs.

std::unordered_map< snowflake, slashcommand > typedef std::unordered_map<snowflake, slashcommand> dpp::slashcommand_map slashcommand_map dpp::slashcommand_map

A group of application slash commands.

int using dpp::socket = int socket dpp::socket

Represents a socket file descriptor. This is used to ensure parity between windows and unix-like systems.

std::unordered_map< dpp::socket, std::unique_ptr< socket_events > > using dpp::socket_container = std::unordered_map<dpp::socket, std::unique_ptr<socket_events>> socket_container dpp::socket_container

Container of event sets keyed by socket file descriptor.

std::function< void(dpp::socket fd, const struct socket_events &, int error_code)> using dpp::socket_error_event = std::function<void(dpp::socket fd, const struct socket_events&, int error_code)> socket_error_event dpp::socket_error_event

Error event.

std::function< void(dpp::socket fd, const struct socket_events &)> using dpp::socket_read_event = std::function<void(dpp::socket fd, const struct socket_events&)> socket_read_event dpp::socket_read_event

Read ready event.

std::function< void(dpp::socket fd, const struct socket_events &)> using dpp::socket_write_event = std::function<void(dpp::socket fd, const struct socket_events&)> socket_write_event dpp::socket_write_event

Write ready event.

std::unordered_map< snowflake, stage_instance > typedef std::unordered_map<snowflake, stage_instance> dpp::stage_instance_map stage_instance_map dpp::stage_instance_map

A group of stage instances.

std::unordered_map< snowflake, sticker > typedef std::unordered_map<snowflake, sticker> dpp::sticker_map sticker_map dpp::sticker_map

A group of stickers.

std::unordered_map< snowflake, sticker_pack > typedef std::unordered_map<snowflake, sticker_pack> dpp::sticker_pack_map sticker_pack_map dpp::sticker_pack_map

A group of sticker packs.

dpp::collector< dpp::thread_create_t, dpp::thread > typedef dpp::collector<dpp::thread_create_t, dpp::thread> dpp::thread_collector_t thread_collector_t dpp::thread_collector_t

Template type for base class of thread collector.

std::unordered_map< snowflake, thread > typedef std::unordered_map<snowflake, thread> dpp::thread_map thread_map dpp::thread_map

A group of threads.

std::unordered_map< snowflake, thread_member > typedef std::unordered_map<snowflake, thread_member> dpp::thread_member_map thread_member_map dpp::thread_member_map

A group of thread member objects. the key is the user_id of the dpp::thread_member.

size_t typedef size_t dpp::timer timer dpp::timer

Represents a timer handle. Returned from cluster::start_timer and used by cluster::stop_timer. This is obtained from a simple incrementing value, internally.

std::function< void(timer)> typedef std::function<void(timer)> dpp::timer_callback_t timer_callback_t dpp::timer_callback_t

The type for a timer callback.

std::priority_queue< timer_t, std::vector< timer_t >, timer_comparator > typedef std::priority_queue<timer_t, std::vector<timer_t>, timer_comparator> dpp::timer_next_t timer_next_t dpp::timer_next_t

A priority timers, ordered by earliest first so that the head is always the soonest to be due.

std::set< timer > typedef std::set<timer> dpp::timers_deleted_t timers_deleted_t dpp::timers_deleted_t

A set of deleted timer handles.

std::unordered_map< snowflake, user > typedef std::unordered_map<snowflake, user> dpp::user_map user_map dpp::user_map

A group of users.

std::function< void(discord_client *)> using dpp::voice_connection_gateway_request_callback_t = std::function<void(discord_client*)> voice_connection_gateway_request_callback_t dpp::voice_connection_gateway_request_callback_t

Callback to send a Gateway request to start a new voice connection.

std::unordered_map< std::string, voiceregion > typedef std::unordered_map<std::string, voiceregion> dpp::voiceregion_map voiceregion_map dpp::voiceregion_map

A group of voice regions.

std::unordered_map< std::string, voicestate > typedef std::unordered_map<std::string, voicestate> dpp::voicestate_map voicestate_map dpp::voicestate_map

A container of voicestates

std::unordered_map< snowflake, webhook > typedef std::unordered_map<snowflake, webhook> dpp::webhook_map webhook_map dpp::webhook_map

A group of webhooks.

std::function< void()> using dpp::work_unit = std::function<void()> work_unit dpp::work_unit

A work unit is a lambda executed in the thread pool.

size_t size_t dpp::AUTOCOMPLETE_MAX_CHOICES AUTOCOMPLETE_MAX_CHOICES dpp::AUTOCOMPLETE_MAX_CHOICES = 25

Discord limits the maximum number of replies to an autocomplete interaction to 25. This value represents that maximum. interaction_response::add_autocomplete_choice does not allow adding more than this number of elements to the vector.

size_t size_t dpp::DECOMP_BUFFER_SIZE DECOMP_BUFFER_SIZE dpp::DECOMP_BUFFER_SIZE = 512 * 1024

Size of decompression buffer for zlib compressed traffic.

uint32_t uint32_t dpp::DEFAULT_ATTACHMENT_SIZE_LIMIT DEFAULT_ATTACHMENT_SIZE_LIMIT dpp::DEFAULT_ATTACHMENT_SIZE_LIMIT = 10 * 1024 * 1024

Discords default attachment size limit is 10MiB, and will be used in case an interaction does not contain its attachment size limit.

DPP_EXPORT std::mutex DPP_EXPORT std::mutex dpp::deletion_mutex deletion_mutex dpp::deletion_mutex
DPP_EXPORT std::unordered_map< managed *, time_t > DPP_EXPORT std::unordered_map<managed*, time_t> dpp::deletion_queue deletion_queue dpp::deletion_queue
const char * const char* dpp::DISCORD_HOST DISCORD_HOST dpp::DISCORD_HOST = "https://discord.com"
uint16_t uint16_t dpp::DPP_BUFSIZE DPP_BUFSIZE dpp::DPP_BUFSIZE {16 * 1024}

SSL_read buffer size.

You'd think that we would get better performance with a bigger buffer, but SSL frames are 16k each. SSL_read in non-blocking mode will only read 16k at a time. There's no point in a bigger buffer as it'd go unused.

int int dpp::ERROR_STATUS ERROR_STATUS dpp::ERROR_STATUS {-1}

Represents a failed socket system call, e.g. connect() failure.

const uint8_t const uint8_t dpp::FORMAT_VERSION FORMAT_VERSION dpp::FORMAT_VERSION = 131

Current ETF format version in use.

const std::string const std::string dpp::http_version http_version dpp::http_version = "DiscordBot (https://github.com/brainboxdotcc/DPP, " + to_hex(DPP_VERSION_MAJOR, false) + "." + to_hex(DPP_VERSION_MINOR, false) + "." + to_hex(DPP_VERSION_PATCH, false) + ")"
const bool const bool dpp::is_valid_config is_valid_config dpp::is_valid_config = validate_configuration<build_type::universal>()

Version checking, making sure the program is in a configuration compatible with DPP's.

Do NOT make these variables constexpr. We want them to initialize at runtime so the function can be pulled from the shared library object.

uint32_t uint32_t dpp::MAX_AVATAR_SIZE MAX_AVATAR_SIZE dpp::MAX_AVATAR_SIZE = 10240 * 1000
int int dpp::MAX_RETRIES MAX_RETRIES dpp::MAX_RETRIES {4}

Maximum number of internal connect() retries on TCP connections.

enum DPP_EXPORT enum DPP_EXPORT dpp::message_ref_type message_ref_type dpp::message_ref_type

Message Reference type.

enum DPP_EXPORT enum DPP_EXPORT dpp::mrt_forward mrt_forward dpp::mrt_forward = 1

A forwarded message

uint32_t uint32_t dpp::NO_SHARDS NO_SHARDS dpp::NO_SHARDS = ~0U

Pass this value into the constructor of dpp::cluster for the shard count to create a cluster with no shards. A cluster with no shards does not connect to a websocket, but can still use the event loop to dispatch HTTPS API requests to Discord. This is useful for bots that do not need to receive websocket events as it will save a lot of resources.

int32_t int32_t dpp::opus_channel_count opus_channel_count dpp::opus_channel_count = 2

Channel count for OPUS (stereo).

int32_t int32_t dpp::opus_sample_rate_hz opus_sample_rate_hz dpp::opus_sample_rate_hz = 48000

Sample rate for OPUS (48khz).

time_t time_t dpp::RECONNECT_INTERVAL RECONNECT_INTERVAL dpp::RECONNECT_INTERVAL = 5

How many seconds to wait between (re)connections. DO NOT change this. It is mandated by the Discord API spec!

size_t size_t dpp::secret_key_size secret_key_size dpp::secret_key_size = 32
size_t size_t dpp::send_audio_raw_max_length send_audio_raw_max_length dpp::send_audio_raw_max_length = 11520
uint8_t uint8_t dpp::voice_protocol_version voice_protocol_version dpp::voice_protocol_version = 8

Discord voice protocol version.

std::string DPP_EXPORT std::string DPP_EXPORT dpp::base64_encode (unsigned char const *buf, unsigned int buffer_length) base64_encode dpp::base64_encode unsigned char const * buf unsigned int buffer_length

Base64 encode data into a string.

buf

Raw binary buffer

buffer_length

Buffer length to encode

The base64 encoded string

bool DPP_EXPORT bool DPP_EXPORT dpp::bool_not_null (const nlohmann::json *j, const char *keyname) bool_not_null dpp::bool_not_null const nlohmann::json * j const char * keyname

Returns a boolean value from a json field value, if defined, else returns false.

j

nlohmann::json instance to retrieve value from

keyname

key name to check for a value

found value

DPP_EXPORT bool DPP_EXPORT bool dpp::close_socket (dpp::socket sfd) close_socket dpp::close_socket dpp::socket sfd

Close a socket.

sfd

Socket to close

false on error, true on success

async< confirmation_callback_t > async< confirmation_callback_t > co_application_emoji_create (const class emoji &newemoji) co_application_emoji_create dpp::cluster::co_application_emoji_create const class emoji & newemoji

Create an Application Emoji.

dpp::cluster::application_emoji_create

https://discord.com/developers/docs/resources/emoji#create-application-emoji

newemoji

The emoji to create

emoji returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_application_emoji_delete (snowflake emoji_id) co_application_emoji_delete dpp::cluster::co_application_emoji_delete snowflake emoji_id

Delete an Application Emoji.

dpp::cluster::application_emoji_delete

https://discord.com/developers/docs/resources/emoji#delete-application-emoji

emoji_id

The emoji's ID to delete.

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_application_emoji_edit (const class emoji &newemoji) co_application_emoji_edit dpp::cluster::co_application_emoji_edit const class emoji & newemoji

Edit an Application Emoji.

dpp::cluster::application_emoji_edit

https://discord.com/developers/docs/resources/emoji#modify-application-emoji

newemoji

The emoji to edit

emoji returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_application_emoji_get (snowflake emoji_id) co_application_emoji_get dpp::cluster::co_application_emoji_get snowflake emoji_id

Get an Application Emoji.

dpp::cluster::application_emoji_get

https://discord.com/developers/docs/resources/emoji#get-application-emoji

emoji_id

The ID of the Emoji to get.

emoji returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_application_emojis_get () co_application_emojis_get dpp::cluster::co_application_emojis_get

List all Application Emojis.

dpp::cluster::application_emojis_get

https://discord.com/developers/docs/resources/emoji#list-application-emojis

emoji_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_application_role_connection_get (snowflake application_id) co_application_role_connection_get dpp::cluster::co_application_role_connection_get snowflake application_id

Get the application's role connection metadata records.

dpp::cluster::application_role_connection_get

https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records

application_id

The application ID

application_role_connection_metadata_list returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_application_role_connection_update (snowflake application_id, const std::vector< application_role_connection_metadata > &connection_metadata) co_application_role_connection_update dpp::cluster::co_application_role_connection_update snowflake application_id const std::vector< application_role_connection_metadata > & connection_metadata

Update the application's role connection metadata records.

dpp::cluster::application_role_connection_update

https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records

application_id

The application ID

connection_metadata

The application role connection metadata to update

application_role_connection_metadata_list returned object on completion

An application can have a maximum of 5 metadata records.

async< confirmation_callback_t > async< confirmation_callback_t > co_automod_rule_create (snowflake guild_id, const automod_rule &r) co_automod_rule_create dpp::cluster::co_automod_rule_create snowflake guild_id const automod_rule & r

Create an auto moderation rule.

guild_id

Guild id of the auto moderation rule

r

Auto moderation rule to create

automod_rule returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_automod_rule_delete (snowflake guild_id, snowflake rule_id) co_automod_rule_delete dpp::cluster::co_automod_rule_delete snowflake guild_id snowflake rule_id

Delete an auto moderation rule.

guild_id

Guild id of the auto moderation rule

rule_id

Auto moderation rule id to delete

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_automod_rule_edit (snowflake guild_id, const automod_rule &r) co_automod_rule_edit dpp::cluster::co_automod_rule_edit snowflake guild_id const automod_rule & r

Edit an auto moderation rule.

guild_id

Guild id of the auto moderation rule

r

Auto moderation rule to edit. The rule's id must be set.

automod_rule returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_automod_rule_get (snowflake guild_id, snowflake rule_id) co_automod_rule_get dpp::cluster::co_automod_rule_get snowflake guild_id snowflake rule_id

Get a single auto moderation rule.

guild_id

Guild id of the auto moderation rule

rule_id

Rule id to retrieve

automod_rule returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_automod_rules_get (snowflake guild_id) co_automod_rules_get dpp::cluster::co_automod_rules_get snowflake guild_id

Get all auto moderation rules for a guild.

guild_id

Guild id of the auto moderation rule

automod_rule_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_channel_create (const class channel &c) co_channel_create dpp::cluster::co_channel_create const class channel & c

Create a channel.

Create a new channel object for the guild. Requires the `MANAGE_CHANNELS` permission. If setting permission overwrites, only permissions your bot has in the guild can be allowed/denied. Setting `MANAGE_ROLES` permission in channels is only possible for guild administrators. Returns the new channel object on success. Fires a `Channel Create Gateway` event.

All parameters to this endpoint are optional excluding `name`

This method supports audit log reasons set by the cluster::set_audit_reason() method.

dpp::cluster::channel_create

https://discord.com/developers/docs/resources/channel#create-channel

c

Channel to create

channel returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_channel_delete (snowflake channel_id) co_channel_delete dpp::cluster::co_channel_delete snowflake channel_id

Delete a channel.

This method supports audit log reasons set by the cluster::set_audit_reason() method.

dpp::cluster::channel_delete

https://discord.com/developers/docs/resources/channel#deleteclose-channel

channel_id

Channel id to delete

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_channel_delete_permission (const class channel &c, snowflake overwrite_id) co_channel_delete_permission dpp::cluster::co_channel_delete_permission const class channel & c snowflake overwrite_id

Remove a permission from a channel.

This method supports audit log reasons set by the cluster::set_audit_reason() method.

dpp::cluster::channel_delete_permission

https://discord.com/developers/docs/resources/channel#delete-channel-permission

c

Channel to remove permission from

overwrite_id

Overwrite to remove, user or channel ID

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_channel_edit (const class channel &c) co_channel_edit dpp::cluster::co_channel_edit const class channel & c

Edit a channel.

This method supports audit log reasons set by the cluster::set_audit_reason() method.

dpp::cluster::channel_edit

https://discord.com/developers/docs/resources/channel#modify-channel

c

Channel to edit/update

channel returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_channel_edit_permissions (const class channel &c, const snowflake overwrite_id, const uint64_t allow, const uint64_t deny, const bool member) co_channel_edit_permissions dpp::cluster::co_channel_edit_permissions const class channel & c const snowflake overwrite_id const uint64_t allow const uint64_t deny const bool member

Edit a channel's permissions.

dpp::cluster::channel_edit_permissions

https://discord.com/developers/docs/resources/channel#edit-channel-permissions

This method supports audit log reasons set by the cluster::set_audit_reason() method.

c

Channel to set permissions for

overwrite_id

Overwrite to change (a user or role ID)

allow

Bitmask of allowed permissions (refer to enum dpp::permissions)

deny

Bitmask of denied permissions (refer to enum dpp::permissions)

member

true if the overwrite_id is a user id, false if it is a channel id

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_channel_edit_permissions (const snowflake channel_id, const snowflake overwrite_id, const uint64_t allow, const uint64_t deny, const bool member) co_channel_edit_permissions dpp::cluster::co_channel_edit_permissions const snowflake channel_id const snowflake overwrite_id const uint64_t allow const uint64_t deny const bool member

Edit a channel's permissions.

dpp::cluster::channel_edit_permissions

https://discord.com/developers/docs/resources/channel#edit-channel-permissions

This method supports audit log reasons set by the cluster::set_audit_reason() method.

channel_id

ID of the channel to set permissions for

overwrite_id

Overwrite to change (a user or role ID)

allow

Bitmask of allowed permissions (refer to enum dpp::permissions)

deny

Bitmask of denied permissions (refer to enum dpp::permissions)

member

true if the overwrite_id is a user id, false if it is a channel id

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_channel_edit_positions (const std::vector< channel > &c) co_channel_edit_positions dpp::cluster::co_channel_edit_positions const std::vector< channel > & c

Edit multiple channels positions.

Modify the positions of a set of channel objects for the guild. Requires `MANAGE_CHANNELS` permission. Fires multiple `Channel Update Gateway` events. Only channels to be modified are required.

dpp::cluster::channel_edit_positions

https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions

c

Channel to change the position for

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_channel_follow_news (const class channel &c, snowflake target_channel_id) co_channel_follow_news dpp::cluster::co_channel_follow_news const class channel & c snowflake target_channel_id

Follow an announcement (news) channel.

dpp::cluster::channel_follow_news

https://discord.com/developers/docs/resources/channel#follow-news-channel

c

Channel id to follow

target_channel_id

Channel to subscribe the channel to

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_channel_get (snowflake c) co_channel_get dpp::cluster::co_channel_get snowflake c

Get a channel.

dpp::cluster::channel_get

https://discord.com/developers/docs/resources/channel#get-channel

c

Channel ID to retrieve

channel returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_channel_invite_create (const class channel &c, const class invite &i) co_channel_invite_create dpp::cluster::co_channel_invite_create const class channel & c const class invite & i

Create invite for a channel.

This method supports audit log reasons set by the cluster::set_audit_reason() method.

dpp::cluster::channel_invite_create

https://discord.com/developers/docs/resources/channel#create-channel-invite

c

Channel to create an invite on

i

Invite to create

invite returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_channel_invites_get (const class channel &c) co_channel_invites_get dpp::cluster::co_channel_invites_get const class channel & c

Get invites for a channel.

dpp::cluster::channel_invites_get

https://discord.com/developers/docs/resources/invite#get-invites

c

Channel to get invites for

invite_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_channel_pins_get (snowflake channel_id) co_channel_pins_get dpp::cluster::co_channel_pins_get snowflake channel_id

Get a channel's pins.

dpp::cluster::channel_pins_get

https://discord.com/developers/docs/resources/channel#get-pinned-messages

channel_id

Channel ID to get pins for

message_pin_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_channel_pins_get (snowflake channel_id, std::optional< time_t > before, std::optional< uint64_t > limit) co_channel_pins_get dpp::cluster::co_channel_pins_get snowflake channel_id std::optional< time_t > before std::optional< uint64_t > limit

Get a channel's pins.

dpp::cluster::channel_pins_get

https://discord.com/developers/docs/resources/channel#get-pinned-messages

channel_id

Channel ID to get pins for

before

Get messages pinned before this timestamp.

limit

Max number of pins to return (1-50). Defaults to 50 if not set.

message_pin_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_channel_set_voice_status (snowflake channel_id, const std::string &status) co_channel_set_voice_status dpp::cluster::co_channel_set_voice_status snowflake channel_id const std::string & status

Set the status of a voice channel.

dpp::cluster::channel_set_voice_status

https://github.com/discord/discord-api-docs/pull/6400 (please replace soon).

channel_id

The channel to update.

status

The new status for the channel.

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_channel_typing (const class channel &c) co_channel_typing dpp::cluster::co_channel_typing const class channel & c

Trigger channel typing indicator.

dpp::cluster::channel_typing

https://discord.com/developers/docs/resources/channel#trigger-typing-indicator

c

Channel to set as typing on

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_channel_typing (snowflake cid) co_channel_typing dpp::cluster::co_channel_typing snowflake cid

Trigger channel typing indicator.

dpp::cluster::channel_typing

https://discord.com/developers/docs/resources/channel#trigger-typing-indicator

cid

Channel ID to set as typing on

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_channels_get (snowflake guild_id) co_channels_get dpp::cluster::co_channels_get snowflake guild_id

Get all channels for a guild.

dpp::cluster::channels_get

https://discord.com/developers/docs/resources/channel#get-channels

guild_id

Guild ID to retrieve channels for

channel_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_create_dm_channel (snowflake user_id) co_create_dm_channel dpp::cluster::co_create_dm_channel snowflake user_id

Create a dm channel.

dpp::cluster::create_dm_channel

https://discord.com/developers/docs/resources/user#create-dm

user_id

User ID to create DM channel with

channel returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_current_application_get () co_current_application_get dpp::cluster::co_current_application_get

Get current (bot) application.

dpp::cluster::current_application_get

https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information

application returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_current_user_connections_get () co_current_user_connections_get dpp::cluster::co_current_user_connections_get

Get current user's connections (linked accounts, e.g. steam, xbox). This call requires the oauth2 `connections` scope and cannot be executed against a bot token.

dpp::cluster::current_user_connections_get

https://discord.com/developers/docs/resources/user#get-user-connections

connection_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_current_user_edit (const std::string &nickname, const std::string &avatar_blob="", const image_type avatar_type=i_png, const std::string &banner_blob="", const image_type banner_type=i_png) co_current_user_edit dpp::cluster::co_current_user_edit const std::string & nickname const std::string & avatar_blob "" const image_type avatar_type i_png const std::string & banner_blob "" const image_type banner_type i_png

Edit current (bot) user.

Modify the requester's user account settings. Returns a dpp::user object on success. Fires a User Update Gateway event.

There appears to be no limit to the image size, however, if your image cannot be processed/uploaded in time, you will receive a malformed http request.

dpp::cluster::current_user_edit

https://discord.com/developers/docs/resources/user#modify-current-user

nickname

Nickname to set

avatar_blob

Avatar data to upload

avatar_type

Type of image for avatar. It can be one of `i_gif`, `i_jpg` or `i_png`.

banner_blob

Banner data to upload

banner_type

Type of image for Banner. It can be one of `i_gif`, `i_jpg` or `i_png`.

user returned object on completion

dpp::length_exception

Image data is larger than the maximum size of 256 kilobytes

async< confirmation_callback_t > async< confirmation_callback_t > co_current_user_get () co_current_user_get dpp::cluster::co_current_user_get

Get current (bot) user.

dpp::cluster::current_user_get

https://discord.com/developers/docs/resources/user#get-current-user

user_identified returned object on completion

The user_identified object is a subclass of dpp::user which contains further details if you have the oauth2 identify or email scopes. If you do not have these scopes, these fields are empty. You can safely convert a user_identified to user with `dynamic_cast`.

async< confirmation_callback_t > async< confirmation_callback_t > co_current_user_get_dms () co_current_user_get_dms dpp::cluster::co_current_user_get_dms

Get current user DM channels.

channel_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_current_user_get_guilds () co_current_user_get_guilds dpp::cluster::co_current_user_get_guilds

Get current (bot) user guilds.

dpp::cluster::current_user_get_guilds

https://discord.com/developers/docs/resources/user#get-current-user-guilds

guild_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_current_user_get_voice_state (snowflake guild_id) co_current_user_get_voice_state dpp::cluster::co_current_user_get_voice_state snowflake guild_id

Get the bot's voice state in a guild without a Gateway connection.

dpp::cluster::current_user_get_voice_state

https://discord.com/developers/docs/resources/voice#get-current-user-voice-state

guild_id

Guild to get the voice state for

voicestate returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_current_user_join_thread (snowflake thread_id) co_current_user_join_thread dpp::cluster::co_current_user_join_thread snowflake thread_id

Join a thread.

dpp::cluster::current_user_join_thread

https://discord.com/developers/docs/resources/channel#join-thread

thread_id

Thread ID to join

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_current_user_leave_guild (snowflake guild_id) co_current_user_leave_guild dpp::cluster::co_current_user_leave_guild snowflake guild_id

Leave a guild.

dpp::cluster::current_user_leave_guild

https://discord.com/developers/docs/resources/user#leave-guild

guild_id

Guild ID to leave

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_current_user_leave_thread (snowflake thread_id) co_current_user_leave_thread dpp::cluster::co_current_user_leave_thread snowflake thread_id

Leave a thread.

dpp::cluster::current_user_leave_thread

https://discord.com/developers/docs/resources/channel#leave-thread

thread_id

Thread ID to leave

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_current_user_set_voice_state (snowflake guild_id, snowflake channel_id, bool suppress=false, time_t request_to_speak_timestamp=0) co_current_user_set_voice_state dpp::cluster::co_current_user_set_voice_state snowflake guild_id snowflake channel_id bool suppress false time_t request_to_speak_timestamp 0

Set the bot's voice state on a stage channel.

Caveats

There are currently several caveats for this endpoint:

- `channel_id` must currently point to a stage channel.

- current user must already have joined `channel_id`.

- You must have the `MUTE_MEMBERS` permission to unsuppress yourself. You can always suppress yourself.

- You must have the `REQUEST_TO_SPEAK` permission to request to speak. You can always clear your own request to speak.

- You are able to set `request_to_speak_timestamp` to any present or future time.

dpp::cluster::current_user_set_voice_state

https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state

guild_id

Guild to set voice state on

channel_id

Stage channel to set voice state on

confirmation returned object on completion

suppress

True if the user's audio should be suppressed, false if it should not

request_to_speak_timestamp

The time at which we requested to speak, or 0 to clear the request. The time set here must be the current time or in the future.

std::logic_exception

You attempted to set a request_to_speak_timestamp in the past which is not the value of 0.

async< confirmation_callback_t > async< confirmation_callback_t > co_delete_webhook (snowflake webhook_id) co_delete_webhook dpp::cluster::co_delete_webhook snowflake webhook_id

Delete a webhook.

This method supports audit log reasons set by the cluster::set_audit_reason() method.

dpp::cluster::delete_webhook

https://discord.com/developers/docs/resources/webhook#delete-webhook

webhook_id

Webhook ID to delete

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_delete_webhook_message (const class webhook &wh, snowflake message_id, snowflake thread_id=0) co_delete_webhook_message dpp::cluster::co_delete_webhook_message const class webhook & wh snowflake message_id snowflake thread_id 0

Delete webhook message.

dpp::cluster::delete_webhook_message

https://discord.com/developers/docs/resources/webhook#delete-webhook-message

wh

Webhook to delete message for

message_id

Message ID to delete

thread_id

ID of the thread the message is in

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_delete_webhook_with_token (snowflake webhook_id, const std::string &token) co_delete_webhook_with_token dpp::cluster::co_delete_webhook_with_token snowflake webhook_id const std::string & token

Delete webhook with token.

dpp::cluster::delete_webhook_with_token

https://discord.com/developers/docs/resources/webhook#delete-webhook-with-token

webhook_id

Webhook ID to delete

token

Token of webhook to delete

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_direct_message_create (snowflake user_id, const message &m) co_direct_message_create dpp::cluster::co_direct_message_create snowflake user_id const message & m

Create a direct message, also create the channel for the direct message if needed.

dpp::cluster::direct_message_create

https://discord.com/developers/docs/resources/user#create-dm

dpp::cluster::direct_message_create

https://discord.com/developers/docs/resources/channel#create-message

user_id

User ID of user to send message to

m

Message object

message returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_edit_webhook (const class webhook &wh) co_edit_webhook dpp::cluster::co_edit_webhook const class webhook & wh

Edit webhook.

This method supports audit log reasons set by the cluster::set_audit_reason() method.

dpp::cluster::edit_webhook

https://discord.com/developers/docs/resources/webhook#modify-webhook

wh

Webhook to edit

webhook returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_edit_webhook_message (const class webhook &wh, const struct message &m, snowflake thread_id=0) co_edit_webhook_message dpp::cluster::co_edit_webhook_message const class webhook & wh const struct message & m snowflake thread_id 0

Edit webhook message.

When the content field is edited, the mentions array in the message object will be reconstructed from scratch based on the new content. The allowed_mentions field of the edit request controls how this happens. If there is no explicit allowed_mentions in the edit request, the content will be parsed with default allowances, that is, without regard to whether or not an allowed_mentions was present in the request that originally created the message.

dpp::cluster::edit_webhook_message

https://discord.com/developers/docs/resources/webhook#edit-webhook-message

the attachments array must contain all attachments that should be present after edit, including retained and new attachments provided in the request body.

wh

Webhook to edit message for

m

New message

thread_id

ID of the thread the message is in

message returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_edit_webhook_with_token (const class webhook &wh) co_edit_webhook_with_token dpp::cluster::co_edit_webhook_with_token const class webhook & wh

Edit webhook with token (token is encapsulated in the webhook object).

dpp::cluster::edit_webhook_with_token

https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token

wh

Webhook to edit (should include token)

webhook returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_entitlement_consume (snowflake entitlement_id) co_entitlement_consume dpp::cluster::co_entitlement_consume snowflake entitlement_id

For One-Time Purchase consumable SKUs, marks a given entitlement for the user as consumed.

dpp::cluster::entitlement_consume

https://discord.com/developers/docs/monetization/entitlements#consume-an-entitlement

entitlement_id

The entitlement to mark as consumed.

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_entitlement_test_create (const class entitlement &new_entitlement) co_entitlement_test_create dpp::cluster::co_entitlement_test_create const class entitlement & new_entitlement

Creates a test entitlement to a given SKU for a given guild or user. Discord will act as though that user or guild has entitlement to your premium offering.

dpp::cluster::entitlement_test_create

https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement

new_entitlement

The entitlement to create. Make sure your dpp::entitlement_type (inside your dpp::entitlement object) matches the type of the owner_id (if type is guild, owner_id is a guild id), otherwise it won't work!

entitlement returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_entitlement_test_delete (snowflake entitlement_id) co_entitlement_test_delete dpp::cluster::co_entitlement_test_delete snowflake entitlement_id

Deletes a currently-active test entitlement. Discord will act as though that user or guild no longer has entitlement to your premium offering.

dpp::cluster::entitlement_test_delete

https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement

entitlement_id

The test entitlement to delete.

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_entitlements_get (snowflake user_id=0, const std::vector< snowflake > &sku_ids={}, snowflake before_id=0, snowflake after_id=0, uint8_t limit=100, snowflake guild_id=0, bool exclude_ended=false) co_entitlements_get dpp::cluster::co_entitlements_get snowflake user_id 0 const std::vector< snowflake > & sku_ids {} snowflake before_id 0 snowflake after_id 0 uint8_t limit 100 snowflake guild_id 0 bool exclude_ended false

Returns all entitlements for a given app, active and expired.

dpp::cluster::entitlements_get

https://discord.com/developers/docs/monetization/entitlements#list-entitlements

user_id

User ID to look up entitlements for.

sku_ids

List of SKU IDs to check entitlements for.

before_id

Retrieve entitlements before this entitlement ID.

after_id

Retrieve entitlements after this entitlement ID.

limit

Number of entitlements to return, 1-100 (default 100).

guild_id

Guild ID to look up entitlements for.

exclude_ended

Whether ended entitlements should be excluded from the search.

entitlement_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_execute_webhook (const class webhook &wh, const struct message &m, bool wait=false, snowflake thread_id=0, const std::string &thread_name="") co_execute_webhook dpp::cluster::co_execute_webhook const class webhook & wh const struct message & m bool wait false snowflake thread_id 0 const std::string & thread_name ""

Execute webhook.

dpp::cluster::execute_webhook

https://discord.com/developers/docs/resources/webhook#execute-webhook

wh

Webhook to execute

m

Message to send

wait

waits for server confirmation of message send before response, and returns the created message body

thread_id

Send a message to the specified thread within a webhook's channel. The thread will automatically be unarchived

thread_name

Name of thread to create (requires the webhook channel to be a forum channel)

message returned object on completion

If the webhook channel is a forum channel, you must provide either `thread_id` or `thread_name`. If `thread_id` is provided, the message will send in that thread. If `thread_name` is provided, a thread with that name will be created in the forum channel.

async< confirmation_callback_t > async< confirmation_callback_t > co_gdm_add (snowflake channel_id, snowflake user_id, const std::string &access_token, const std::string &nick) co_gdm_add dpp::cluster::co_gdm_add snowflake channel_id snowflake user_id const std::string & access_token const std::string & nick

Adds a recipient to a Group DM using their access token.

dpp::cluster::gdm_add

https://discord.com/developers/docs/resources/channel#group-dm-add-recipient

channel_id

Channel id to add group DM recipients to

user_id

User ID to add

access_token

Access token from OAuth2

nick

Nickname of user to apply to the chat

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_gdm_remove (snowflake channel_id, snowflake user_id) co_gdm_remove dpp::cluster::co_gdm_remove snowflake channel_id snowflake user_id

Removes a recipient from a Group DM.

dpp::cluster::gdm_remove

https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient

channel_id

Channel ID of group DM

user_id

User ID to remove from group DM

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_get_channel_webhooks (snowflake channel_id) co_get_channel_webhooks dpp::cluster::co_get_channel_webhooks snowflake channel_id

Get channel webhooks.

dpp::cluster::get_channel_webhooks

https://discord.com/developers/docs/resources/webhook#get-guild-webhooks

channel_id

Channel ID to get webhooks for

webhook_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_get_gateway_bot () co_get_gateway_bot dpp::cluster::co_get_gateway_bot

Get the gateway information for the bot using the token.

dpp::cluster::get_gateway_bot

https://discord.com/developers/docs/topics/gateway#get-gateway-bot

gateway returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_get_guild_webhooks (snowflake guild_id) co_get_guild_webhooks dpp::cluster::co_get_guild_webhooks snowflake guild_id

Get guild webhooks.

dpp::cluster::get_guild_webhooks

https://discord.com/developers/docs/resources/webhook#get-guild-webhooks

guild_id

Guild ID to get webhooks for

webhook_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_get_voice_regions () co_get_voice_regions dpp::cluster::co_get_voice_regions

Get all voice regions.

dpp::cluster::get_voice_regions

https://discord.com/developers/docs/resources/voice#list-voice-regions

voiceregion_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_get_webhook (snowflake webhook_id) co_get_webhook dpp::cluster::co_get_webhook snowflake webhook_id

Get webhook.

dpp::cluster::get_webhook

https://discord.com/developers/docs/resources/webhook#get-webhook

webhook_id

Webhook ID to get

webhook returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_get_webhook_message (const class webhook &wh, snowflake message_id, snowflake thread_id=0) co_get_webhook_message dpp::cluster::co_get_webhook_message const class webhook & wh snowflake message_id snowflake thread_id 0

Get webhook message.

dpp::cluster::get_webhook_message

https://discord.com/developers/docs/resources/webhook#get-webhook-message

wh

Webhook to get the original message for

message_id

The message ID

thread_id

ID of the thread the message is in

message returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_get_webhook_with_token (snowflake webhook_id, const std::string &token) co_get_webhook_with_token dpp::cluster::co_get_webhook_with_token snowflake webhook_id const std::string & token

Get webhook using token.

dpp::cluster::get_webhook_with_token

https://discord.com/developers/docs/resources/webhook#get-webhook-with-token

webhook_id

Webhook ID to retrieve

token

Token of webhook

webhook returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_global_bulk_command_create (const std::vector< slashcommand > &commands) co_global_bulk_command_create dpp::cluster::co_global_bulk_command_create const std::vector< slashcommand > & commands

Create/overwrite global slash commands. Any existing global slash commands will be deleted and replaced with these.

dpp::cluster::global_bulk_command_create

https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands

commands

Vector of slash commands to create/update. overwriting existing commands that are registered globally for this application. Commands that do not already exist will count toward daily application command create limits.

slashcommand_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_global_bulk_command_delete () co_global_bulk_command_delete dpp::cluster::co_global_bulk_command_delete

Delete all existing global slash commands.

dpp::cluster::global_bulk_command_delete

https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands

slashcommand_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_global_command_create (const slashcommand &s) co_global_command_create dpp::cluster::co_global_command_create const slashcommand & s

Create a global slash command (a bot can have a maximum of 100 of these).

dpp::cluster::global_command_create

https://discord.com/developers/docs/interactions/application-commands#create-global-application-command

s

Slash command to create

slashcommand returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_global_command_delete (snowflake id) co_global_command_delete dpp::cluster::co_global_command_delete snowflake id

Delete a global slash command (a bot can have a maximum of 100 of these).

dpp::cluster::global_command_delete

https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command

id

Slash command to delete

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_global_command_edit (const slashcommand &s) co_global_command_edit dpp::cluster::co_global_command_edit const slashcommand & s

Edit a global slash command (a bot can have a maximum of 100 of these).

dpp::cluster::global_command_edit

https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command

s

Slash command to change

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_global_command_get (snowflake id) co_global_command_get dpp::cluster::co_global_command_get snowflake id

Get a global slash command.

dpp::cluster::global_command_get

https://discord.com/developers/docs/interactions/application-commands#get-global-application-command

id

The ID of the slash command

slashcommand returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_global_commands_get () co_global_commands_get dpp::cluster::co_global_commands_get

Get the application's global slash commands.

dpp::cluster::global_commands_get

https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands

slashcommand_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_add_member (const guild_member &gm, const std::string &access_token) co_guild_add_member dpp::cluster::co_guild_add_member const guild_member & gm const std::string & access_token

Add guild member. Needs a specific oauth2 scope, from which you get the access_token.

Adds a user to the guild, provided you have a valid oauth2 access token for the user with the guilds.join scope. Returns the guild_member, which is defaulted if the user is already a member of the guild. Fires a `Guild Member Add` Gateway event.

For guilds with Membership Screening enabled, this endpoint will default to adding new members as pending in the guild member object. Members that are pending will have to complete membership screening before they become full members that can talk.

All parameters to this endpoint except for access_token are optional. The bot must be a member of the guild with `CREATE_INSTANT_INVITE` permission.

dpp::cluster::guild_add_member

https://discord.com/developers/docs/resources/guild#add-guild-member

gm

Guild member to add

access_token

Access token from Oauth2 scope

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_auditlog_get (snowflake guild_id, snowflake user_id, uint32_t action_type, snowflake before, snowflake after, uint32_t limit) co_guild_auditlog_get dpp::cluster::co_guild_auditlog_get snowflake guild_id snowflake user_id uint32_t action_type snowflake before snowflake after uint32_t limit

Get the audit log for a guild.

dpp::cluster::guild_auditlog_get

https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log

guild_id

Guild to get the audit log of

user_id

Entries from a specific user ID. Set this to `0` will fetch any user

action_type

Entries for a specific dpp::audit_type. Set this to `0` will fetch any type

before

Entries with ID less than a specific audit log entry ID. Used for paginating

after

Entries with ID greater than a specific audit log entry ID. Used for paginating

limit

Maximum number of entries (between 1-100) to return

auditlog returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_ban_add (snowflake guild_id, snowflake user_id, uint32_t delete_message_seconds=0) co_guild_ban_add dpp::cluster::co_guild_ban_add snowflake guild_id snowflake user_id uint32_t delete_message_seconds 0

Add guild ban.

Create a guild ban, and optionally delete previous messages sent by the banned user. Requires the `BAN_MEMBERS` permission. Fires a `Guild Ban Add` Gateway event.

dpp::cluster::guild_ban_add

https://discord.com/developers/docs/resources/guild#create-guild-ban

This method supports audit log reasons set by the cluster::set_audit_reason() method.

guild_id

Guild ID to add ban to

user_id

User ID to ban

delete_message_seconds

How many seconds to delete messages for, between 0 and 604800 (7 days). Defaults to 0

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_ban_delete (snowflake guild_id, snowflake user_id) co_guild_ban_delete dpp::cluster::co_guild_ban_delete snowflake guild_id snowflake user_id

Delete guild ban.

Remove the ban for a user. Requires the `BAN_MEMBERS` permissions. Fires a Guild Ban Remove Gateway event.

dpp::cluster::guild_ban_delete

https://discord.com/developers/docs/resources/guild#remove-guild-ban

This method supports audit log reasons set by the cluster::set_audit_reason() method.

guild_id

Guild to delete ban from

user_id

User ID to delete ban for

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_begin_prune (snowflake guild_id, const struct prune &pruneinfo) co_guild_begin_prune dpp::cluster::co_guild_begin_prune snowflake guild_id const struct prune & pruneinfo

Begin guild prune.

Begin a prune operation. Requires the `KICK_MEMBERS` permission. Returns a prune object indicating the number of members that were removed in the prune operation. For large guilds it's recommended to set the `compute_prune_count` option to false, forcing 'pruned' to 0. Fires multiple `Guild Member Remove` Gateway events. By default, prune will not remove users with roles. You can optionally include specific roles in your prune by providing the `include_roles` parameter. Any inactive user that has a subset of the provided role(s) will be included in the prune and users with additional roles will not.

dpp::cluster::guild_begin_prune

https://discord.com/developers/docs/resources/guild#begin-guild-prune

This method supports audit log reasons set by the cluster::set_audit_reason() method.

guild_id

Guild ID to prune

pruneinfo

Pruning info

prune returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_bulk_command_create (const std::vector< slashcommand > &commands, snowflake guild_id) co_guild_bulk_command_create dpp::cluster::co_guild_bulk_command_create const std::vector< slashcommand > & commands snowflake guild_id

Create/overwrite guild slash commands. Any existing guild slash commands on this guild will be deleted and replaced with these.

dpp::cluster::guild_bulk_command_create

https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands

commands

Vector of slash commands to create/update. New guild commands will be available in the guild immediately. If the command did not already exist, it will count toward daily application command create limits.

guild_id

Guild ID to create/update the slash commands in

slashcommand_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_bulk_command_delete (snowflake guild_id) co_guild_bulk_command_delete dpp::cluster::co_guild_bulk_command_delete snowflake guild_id

Delete all existing guild slash commands.

dpp::cluster::guild_bulk_command_delete

https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands

guild_id

Guild ID to delete the slash commands in.

slashcommand_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_bulk_command_edit_permissions (const std::vector< slashcommand > &commands, snowflake guild_id) co_guild_bulk_command_edit_permissions dpp::cluster::co_guild_bulk_command_edit_permissions const std::vector< slashcommand > & commands snowflake guild_id

Edit/Overwrite the permissions of all existing slash commands in a guild.

You can only add up to 10 permission overwrites for a command

dpp::cluster::guild_bulk_command_edit_permissions

https://discord.com/developers/docs/interactions/application-commands#batch-edit-application-command-permissions

The endpoint will overwrite all existing permissions for all commands of the application in a guild, including slash commands, user commands, and message commands. Meaning that if you forgot to pass a slash command, the permissions of it might be removed.

commands

A vector of slash commands to edit/overwrite the permissions for

guild_id

Guild ID to edit permissions of the slash commands in

guild_command_permissions_map returned object on completion

Deprecated

This has been disabled with updates to Permissions v2. You can use guild_command_edit_permissions instead

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_command_create (const slashcommand &s, snowflake guild_id) co_guild_command_create dpp::cluster::co_guild_command_create const slashcommand & s snowflake guild_id

Create a slash command local to a guild.

dpp::cluster::guild_command_create

https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command

Creating a command with the same name as an existing command for your application will overwrite the old command.

s

Slash command to create

guild_id

Guild ID to create the slash command in

slashcommand returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_command_delete (snowflake id, snowflake guild_id) co_guild_command_delete dpp::cluster::co_guild_command_delete snowflake id snowflake guild_id

Delete a slash command local to a guild.

dpp::cluster::guild_command_delete

https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command

id

Slash command to delete

guild_id

Guild ID to delete the slash command in

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_command_edit (const slashcommand &s, snowflake guild_id) co_guild_command_edit dpp::cluster::co_guild_command_edit const slashcommand & s snowflake guild_id

Edit a slash command local to a guild.

dpp::cluster::guild_command_edit

https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command

s

Slash command to edit

guild_id

Guild ID to edit the slash command in

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_command_edit_permissions (const slashcommand &s, snowflake guild_id) co_guild_command_edit_permissions dpp::cluster::co_guild_command_edit_permissions const slashcommand & s snowflake guild_id

Edit slash command permissions of a guild.

dpp::cluster::guild_command_edit_permissions

https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions

You can only add up to 10 permission overwrites for a command

s

Slash command to edit the permissions for

guild_id

Guild ID to edit the slash command in

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_command_get (snowflake id, snowflake guild_id) co_guild_command_get dpp::cluster::co_guild_command_get snowflake id snowflake guild_id

Get a slash command of a guild.

dpp::cluster::guild_command_get

https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command

The returned slash commands will not have permissions set, you need to use a permissions getter e.g. dpp::guild_commands_get_permissions to get the guild command permissions

id

The ID of the slash command

guild_id

Guild ID to get the slash command from

slashcommand returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_command_get_permissions (snowflake id, snowflake guild_id) co_guild_command_get_permissions dpp::cluster::co_guild_command_get_permissions snowflake id snowflake guild_id

Get the permissions for a slash command of a guild.

dpp::cluster::guild_command_get_permissions

https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions

id

The ID of the slash command to get the permissions for

guild_id

Guild ID to get the permissions of

guild_command_permissions returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_commands_get (snowflake guild_id) co_guild_commands_get dpp::cluster::co_guild_commands_get snowflake guild_id

Get the application's slash commands for a guild.

dpp::cluster::guild_commands_get

https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands

The returned slash commands will not have permissions set, you need to use a permissions getter e.g. dpp::guild_commands_get_permissions to get the guild command permissions

guild_id

Guild ID to get the slash commands for

slashcommand_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_commands_get_permissions (snowflake guild_id) co_guild_commands_get_permissions dpp::cluster::co_guild_commands_get_permissions snowflake guild_id

Get all slash command permissions of a guild.

dpp::cluster::guild_commands_get_permissions

https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions

guild_id

Guild ID to get the slash commands permissions for

guild_command_permissions_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_create (const class guild &g) co_guild_create dpp::cluster::co_guild_create const class guild & g

Create a guild.

Create a new guild. Returns a guild object on success. `Fires a Guild Create Gateway` event.

When using the roles parameter, the first member of the array is used to change properties of the guild's everyone role. If you are trying to bootstrap a guild with additional roles, keep this in mind. The required id field within each role object is an integer placeholder, and will be replaced by the API upon consumption. Its purpose is to allow you to overwrite a role's permissions in a channel when also passing in channels with the channels array. When using the channels parameter, the position field is ignored, and none of the default channels are created. The id field within each channel object may be set to an integer placeholder, and will be replaced by the API upon consumption. Its purpose is to allow you to create `GUILD_CATEGORY` channels by setting the `parent_id` field on any children to the category's id field. Category channels must be listed before any children.

dpp::cluster::guild_create

https://discord.com/developers/docs/resources/guild#create-guild

The region field is deprecated and is replaced by channel.rtc_region. This endpoint can be used only by bots in less than 10 guilds.

g

Guild to create

guild returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_create_from_template (const std::string &code, const std::string &name) co_guild_create_from_template dpp::cluster::co_guild_create_from_template const std::string & code const std::string & name

Create a new guild based on a template.

This endpoint can be used only by bots in less than 10 guilds.

dpp::cluster::guild_create_from_template

https://discord.com/developers/docs/resources/guild-template#create-guild-from-guild-template

code

Template code to create guild from

name

Guild name to create

guild returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_current_member_edit (snowflake guild_id, const std::string &nickname, const std::string &banner_blob, const image_type banner_type, const std::string &avatar_blob, const image_type avatar_type, const std::string &bio) co_guild_current_member_edit dpp::cluster::co_guild_current_member_edit snowflake guild_id const std::string & nickname const std::string & banner_blob const image_type banner_type const std::string & avatar_blob const image_type avatar_type const std::string & bio

Modify current member.

Modifies the current member in a guild. Fires a `Guild Member Update` Gateway event.

This method supports audit log reasons set by the cluster::set_audit_reason() method.

dpp::cluster::guild_current_member_edit

https://discord.com/developers/docs/resources/guild#modify-current-member

guild_id

Guild ID to change on

nickname

New nickname, or empty string to clear nickname.

banner_blob

New banner, or empty string to clear banner.

banner_type

Type of image for new banner.

avatar_blob

New avatar, or empty string to clear avatar.

avatar_type

Type of image for new avatar.

bio

New bio, or empty string to clear bio

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_delete (snowflake guild_id) co_guild_delete dpp::cluster::co_guild_delete snowflake guild_id

Delete a guild.

Delete a guild permanently. User must be owner. Fires a `Guild Delete Gateway` event.

dpp::cluster::guild_delete

https://discord.com/developers/docs/resources/guild#delete-guild

guild_id

Guild ID to delete

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_delete_integration (snowflake guild_id, snowflake integration_id) co_guild_delete_integration dpp::cluster::co_guild_delete_integration snowflake guild_id snowflake integration_id

Delete guild integration.

Delete the attached integration object for the guild. Deletes any associated webhooks and kicks the associated bot if there is one. Requires the `MANAGE_GUILD` permission. Fires a Guild Integrations Update Gateway event.

dpp::cluster::guild_delete_integration

https://discord.com/developers/docs/resources/guild#delete-guild-integration

This method supports audit log reasons set by the cluster::set_audit_reason() method.

guild_id

Guild ID to delete integration for

integration_id

Integration ID to delete

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_edit (const class guild &g) co_guild_edit dpp::cluster::co_guild_edit const class guild & g

Edit a guild.

Modify a guild's settings. Requires the `MANAGE_GUILD` permission. Returns the updated guild object on success. Fires a `Guild Update Gateway` event.

dpp::cluster::guild_edit

https://discord.com/developers/docs/resources/guild#modify-guild

This method supports audit log reasons set by the cluster::set_audit_reason() method.

g

Guild to edit

guild returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_edit_member (const guild_member &gm) co_guild_edit_member dpp::cluster::co_guild_edit_member const guild_member & gm

Edit the properties of an existing guild member.

Modify attributes of a guild member. Returns the guild_member. Fires a `Guild Member Update` Gateway event. To remove a timeout, set the `communication_disabled_until` to a non-zero time in the past, e.g. 1. When moving members to channels, the API user must have permissions to both connect to the channel and have the `MOVE_MEMBERS` permission. For moving and disconnecting users from voice, use dpp::cluster::guild_member_move.

dpp::cluster::guild_edit_member

https://discord.com/developers/docs/resources/guild#modify-guild-member

This method supports audit log reasons set by the cluster::set_audit_reason() method.

gm

Guild member to edit

guild_member returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_edit_onboarding (const struct onboarding &o) co_guild_edit_onboarding dpp::cluster::co_guild_edit_onboarding const struct onboarding & o

Edit the guild's onboarding configuration.

Requires the `MANAGE_GUILD` and `MANAGE_ROLES` permissions.

Onboarding enforces constraints when enabled. These constraints are that there must be at least 7 Default Channels and at least 5 of them must allow sending messages to the @everyone role. The `onboarding::mode` field modifies what is considered when enforcing these constraints.

dpp::cluster::guild_edit_onboarding

https://discord.com/developers/docs/resources/guild#modify-guild-onboarding

This method supports audit log reasons set by the cluster::set_audit_reason() method.

o

The onboarding object

onboarding returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_edit_welcome_screen (snowflake guild_id, const struct welcome_screen &welcome_screen, bool enabled) co_guild_edit_welcome_screen dpp::cluster::co_guild_edit_welcome_screen snowflake guild_id const struct welcome_screen & welcome_screen bool enabled

Edit the guild's welcome screen.

Requires the `MANAGE_GUILD` permission. May fire a `Guild Update` Gateway event.

dpp::cluster::guild_edit_welcome_screen

https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen

guild_id

The guild ID to edit the welcome screen for

welcome_screen

The welcome screen

enabled

Whether the welcome screen should be enabled or disabled

dpp::welcome_screen returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_edit_widget (snowflake guild_id, const class guild_widget &gw) co_guild_edit_widget dpp::cluster::co_guild_edit_widget snowflake guild_id const class guild_widget & gw

Edit guild widget.

Requires the `MANAGE_GUILD` permission.

dpp::cluster::guild_edit_widget

https://discord.com/developers/docs/resources/guild#modify-guild-widget

This method supports audit log reasons set by the cluster::set_audit_reason() method.

guild_id

Guild ID to edit widget for

gw

New guild widget information

guild_widget returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_emoji_create (snowflake guild_id, const class emoji &newemoji) co_guild_emoji_create dpp::cluster::co_guild_emoji_create snowflake guild_id const class emoji & newemoji

Create single emoji. You must ensure that the emoji passed contained image data using the emoji::load_image() method.

This method supports audit log reasons set by the cluster::set_audit_reason() method.

dpp::cluster::guild_emoji_create

https://discord.com/developers/docs/resources/emoji#create-guild-emoji

guild_id

Guild ID to create emoji om

newemoji

Emoji to create

emoji returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_emoji_delete (snowflake guild_id, snowflake emoji_id) co_guild_emoji_delete dpp::cluster::co_guild_emoji_delete snowflake guild_id snowflake emoji_id

Delete a guild emoji.

This method supports audit log reasons set by the cluster::set_audit_reason() method.

dpp::cluster::guild_emoji_delete

https://discord.com/developers/docs/resources/emoji#delete-guild-emoji

guild_id

Guild ID to delete emoji on

emoji_id

Emoji ID to delete

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_emoji_edit (snowflake guild_id, const class emoji &newemoji) co_guild_emoji_edit dpp::cluster::co_guild_emoji_edit snowflake guild_id const class emoji & newemoji

Edit a single emoji.

You must ensure that the emoji passed contained image data using the emoji::load_image() method.

dpp::cluster::guild_emoji_edit

https://discord.com/developers/docs/resources/emoji#modify-guild-emoji

This method supports audit log reasons set by the cluster::set_audit_reason() method.

guild_id

Guild ID to edit emoji on

newemoji

Emoji to edit

emoji returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_emoji_get (snowflake guild_id, snowflake emoji_id) co_guild_emoji_get dpp::cluster::co_guild_emoji_get snowflake guild_id snowflake emoji_id

Get a single emoji.

dpp::cluster::guild_emoji_get

https://discord.com/developers/docs/resources/emoji#get-guild-emoji

guild_id

Guild ID to get emoji for

emoji_id

Emoji ID to get

emoji returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_emojis_get (snowflake guild_id) co_guild_emojis_get dpp::cluster::co_guild_emojis_get snowflake guild_id

Get all emojis for a guild.

dpp::cluster::guild_emojis_get

https://discord.com/developers/docs/resources/emoji#list-guild-emojis

guild_id

Guild ID to get emojis for

emoji_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_event_create (const scheduled_event &event) co_guild_event_create dpp::cluster::co_guild_event_create const scheduled_event & event

Create a scheduled event on a guild.

dpp::cluster::guild_event_create

https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event

event

Event to create (guild ID must be populated)

scheduled_event returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_event_delete (snowflake event_id, snowflake guild_id) co_guild_event_delete dpp::cluster::co_guild_event_delete snowflake event_id snowflake guild_id

Delete a scheduled event from a guild.

dpp::cluster::guild_event_delete

https://discord.com/developers/docs/resources/guild-scheduled-event#delete-guild-scheduled-event

event_id

Event ID to delete

guild_id

Guild ID of event to delete

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_event_edit (const scheduled_event &event) co_guild_event_edit dpp::cluster::co_guild_event_edit const scheduled_event & event

Edit/modify a scheduled event on a guild.

dpp::cluster::guild_event_edit

https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event

event

Event to create (event ID and guild ID must be populated)

scheduled_event returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_event_get (snowflake guild_id, snowflake event_id) co_guild_event_get dpp::cluster::co_guild_event_get snowflake guild_id snowflake event_id

Get a scheduled event for a guild.

dpp::cluster::guild_event_get

https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event

guild_id

Guild to get event for

event_id

Event ID to get

scheduled_event returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_events_get (snowflake guild_id) co_guild_events_get dpp::cluster::co_guild_events_get snowflake guild_id

Get all scheduled events for a guild.

dpp::cluster::guild_events_get

https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild

guild_id

Guild to get events for

scheduled_event_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_get_ban (snowflake guild_id, snowflake user_id) co_guild_get_ban dpp::cluster::co_guild_get_ban snowflake guild_id snowflake user_id

Get single guild ban.

Requires the `BAN_MEMBERS` permission.

dpp::cluster::guild_get_ban

https://discord.com/developers/docs/resources/guild#get-guild-ban

guild_id

Guild ID to get ban for

user_id

User ID of ban to retrieve

ban returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_get_bans (snowflake guild_id, snowflake before, snowflake after, snowflake limit) co_guild_get_bans dpp::cluster::co_guild_get_bans snowflake guild_id snowflake before snowflake after snowflake limit

Get guild ban list.

Requires the `BAN_MEMBERS` permission.

dpp::cluster::guild_get_bans

https://discord.com/developers/docs/resources/guild#get-guild-bans

Provide a user ID to `before` and `after` for pagination. Users will always be returned in ascending order by the user ID. If both before and after are provided, only before is respected.

guild_id

Guild ID to get bans for

before

If non-zero, all bans for user ids before this user id will be returned up to the limit

after

if non-zero, all bans for user ids after this user id will be returned up to the limit

limit

the maximum number of bans to retrieve in this call up to a maximum of 1000

ban_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_get_integrations (snowflake guild_id) co_guild_get_integrations dpp::cluster::co_guild_get_integrations snowflake guild_id

Get guild integrations.

Requires the `MANAGE_GUILD` permission.

dpp::cluster::guild_get_integrations

https://discord.com/developers/docs/resources/guild#get-guild-integrations

guild_id

Guild ID to get integrations for

integration_map returned object on completion

This endpoint returns a maximum of 50 integrations. If a guild has more integrations, they cannot be accessed.

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_get_invites (snowflake guild_id) co_guild_get_invites dpp::cluster::co_guild_get_invites snowflake guild_id

Get guild invites.

Returns a list of invite objects (with invite metadata) for the guild. Requires the `MANAGE_GUILD` permission.

dpp::cluster::guild_get_invites

https://discord.com/developers/docs/resources/guild#get-guild-invites

guild_id

Guild ID to get invites for

invite_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_get_member (snowflake guild_id, snowflake user_id) co_guild_get_member dpp::cluster::co_guild_get_member snowflake guild_id snowflake user_id

Get a guild member.

dpp::cluster::guild_get_member

https://discord.com/developers/docs/resources/guild#get-guild-member

guild_id

Guild ID to get member for

user_id

User ID of member to get

guild_member returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_get_members (snowflake guild_id, uint16_t limit, snowflake after) co_guild_get_members dpp::cluster::co_guild_get_members snowflake guild_id uint16_t limit snowflake after

Get all guild members.

This endpoint is restricted according to whether the `GUILD_MEMBERS` Privileged Intent is enabled for your application.

dpp::cluster::guild_get_members

https://discord.com/developers/docs/resources/guild#get-guild-members

guild_id

Guild ID to get all members for

limit

max number of members to return (1-1000)

after

the highest user id in the previous page

guild_member_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_get_onboarding (snowflake guild_id) co_guild_get_onboarding dpp::cluster::co_guild_get_onboarding snowflake guild_id

Get the guild's onboarding configuration.

dpp::cluster::guild_get_onboarding

https://discord.com/developers/docs/resources/guild#get-guild-onboarding

guild_id

The guild to pull the onboarding configuration from.

onboarding returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_get_prune_counts (snowflake guild_id, const struct prune &pruneinfo) co_guild_get_prune_counts dpp::cluster::co_guild_get_prune_counts snowflake guild_id const struct prune & pruneinfo

Get prune counts.

Returns a prune object indicating the number of members that would be removed in a prune operation. Requires the `KICK_MEMBERS` permission. By default, prune will not remove users with roles. You can optionally include specific roles in your prune by providing the include_roles parameter. Any inactive user that has a subset of the provided role(s) will be counted in the prune and users with additional roles will not.

dpp::cluster::guild_get_prune_counts

https://discord.com/developers/docs/resources/guild#get-guild-prune-count

guild_id

Guild ID to count for pruning

pruneinfo

Pruning info

prune returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_get_vanity (snowflake guild_id) co_guild_get_vanity dpp::cluster::co_guild_get_vanity snowflake guild_id

Get guild vanity url, if enabled.

Returns a partial dpp::invite object for guilds with that feature enabled. Requires the `MANAGE_GUILD` permission. code will be null if a vanity url for the guild is not set.

dpp::cluster::guild_get_vanity

https://discord.com/developers/docs/resources/guild#get-guild-vanity-url

guild_id

Guild to get vanity URL for

invite returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_get_voice_regions (snowflake guild_id) co_guild_get_voice_regions dpp::cluster::co_guild_get_voice_regions snowflake guild_id

Get guild voice regions.

Voice regions per guild are somewhat deprecated in preference of per-channel voice regions. Returns a list of voice region objects for the guild. Unlike the similar /voice route, this returns VIP servers when the guild is VIP-enabled.

dpp::cluster::guild_get_voice_regions

https://discord.com/developers/docs/resources/guild#get-guild-voice-regions

guild_id

Guild ID to get voice regions for

voiceregion_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_get_welcome_screen (snowflake guild_id) co_guild_get_welcome_screen dpp::cluster::co_guild_get_welcome_screen snowflake guild_id

Get the guild's welcome screen.

If the welcome screen is not enabled, the `MANAGE_GUILD` permission is required.

dpp::cluster::guild_get_welcome_screen

https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen

guild_id

The guild ID to get the welcome screen from

dpp::welcome_screen returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_get_widget (snowflake guild_id) co_guild_get_widget dpp::cluster::co_guild_get_widget snowflake guild_id

Get guild widget.

Requires the `MANAGE_GUILD` permission.

dpp::cluster::guild_get_widget

https://discord.com/developers/docs/resources/guild#get-guild-widget

guild_id

Guild ID to get widget for

guild_widget returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_member_add_role (snowflake guild_id, snowflake user_id, snowflake role_id) co_guild_member_add_role dpp::cluster::co_guild_member_add_role snowflake guild_id snowflake user_id snowflake role_id

Add role to guild member.

Adds a role to a guild member. Requires the `MANAGE_ROLES` permission. Fires a `Guild Member Update` Gateway event.

dpp::cluster::guild_member_add_role

https://discord.com/developers/docs/resources/guild#add-guild-member-role

This method supports audit log reasons set by the cluster::set_audit_reason() method.

guild_id

Guild ID to add a role to

user_id

User ID to add role to

role_id

Role ID to add to the user

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_member_delete (snowflake guild_id, snowflake user_id) co_guild_member_delete dpp::cluster::co_guild_member_delete snowflake guild_id snowflake user_id

Remove (kick) a guild member.

Remove a member from a guild. Requires `KICK_MEMBERS` permission. Fires a `Guild Member Remove` Gateway event.

dpp::cluster::guild_member_delete

https://discord.com/developers/docs/resources/guild#remove-guild-member

This method supports audit log reasons set by the cluster::set_audit_reason() method.

Deprecated

Replaced by dpp::cluster::guild_member_kick

guild_id

Guild ID to kick member from

user_id

User ID to kick

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_member_delete_role (snowflake guild_id, snowflake user_id, snowflake role_id) co_guild_member_delete_role dpp::cluster::co_guild_member_delete_role snowflake guild_id snowflake user_id snowflake role_id

Remove role from guild member.

Removes a role from a guild member. Requires the `MANAGE_ROLES` permission. Fires a `Guild Member Update` Gateway event.

dpp::cluster::guild_member_delete_role

https://discord.com/developers/docs/resources/guild#remove-guild-member-role

This method supports audit log reasons set by the cluster::set_audit_reason() method.

guild_id

Guild ID to remove role from user on

user_id

User ID to remove role from

role_id

Role to remove

confirmation returned object on completion

Deprecated

Use dpp::cluster::guild_member_remove_role instead

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_member_kick (snowflake guild_id, snowflake user_id) co_guild_member_kick dpp::cluster::co_guild_member_kick snowflake guild_id snowflake user_id

Remove (kick) a guild member.

Remove a member from a guild. Requires `KICK_MEMBERS` permission. Fires a `Guild Member Remove` Gateway event.

dpp::cluster::guild_member_kick

https://discord.com/developers/docs/resources/guild#remove-guild-member

This method supports audit log reasons set by the cluster::set_audit_reason() method.

guild_id

Guild ID to kick member from

user_id

User ID to kick

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_member_move (const snowflake channel_id, const snowflake guild_id, const snowflake user_id) co_guild_member_move dpp::cluster::co_guild_member_move const snowflake channel_id const snowflake guild_id const snowflake user_id

Moves the guild member to a other voice channel, if member is connected to one. Set the `channel_id` to `0` to disconnect the user.

Fires a `Guild Member Update` Gateway event.

When moving members to channels, the API user must have permissions to both connect to the channel and have the `MOVE_MEMBERS` permission.

This method supports audit log reasons set by the cluster::set_audit_reason() method.

dpp::cluster::guild_member_move

https://discord.com/developers/docs/resources/guild#modify-guild-member

channel_id

Id of the channel to which the user is used. Set to `0` to disconnect the user

guild_id

Guild id to which the user is connected

user_id

User id, who should be moved

guild_member returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_member_remove_role (snowflake guild_id, snowflake user_id, snowflake role_id) co_guild_member_remove_role dpp::cluster::co_guild_member_remove_role snowflake guild_id snowflake user_id snowflake role_id

Remove role from guild member.

Removes a role from a guild member. Requires the `MANAGE_ROLES` permission. Fires a `Guild Member Update` Gateway event.

dpp::cluster::guild_member_remove_role

https://discord.com/developers/docs/resources/guild#remove-guild-member-role

This method supports audit log reasons set by the cluster::set_audit_reason() method.

guild_id

Guild ID to remove role from user on

user_id

User ID to remove role from

role_id

Role to remove

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_member_timeout (snowflake guild_id, snowflake user_id, time_t communication_disabled_until) co_guild_member_timeout dpp::cluster::co_guild_member_timeout snowflake guild_id snowflake user_id time_t communication_disabled_until

Set the timeout of a guild member.

Fires a `Guild Member Update` Gateway event.

dpp::cluster::guild_member_timeout

https://discord.com/developers/docs/resources/guild#modify-guild-member

This method supports audit log reasons set by the cluster::set_audit_reason() method.

guild_id

Guild ID to timeout the member in

user_id

User ID to set the timeout for

communication_disabled_until

The timestamp when the user's timeout will expire (up to 28 days in the future). Set to 0 to remove the timeout

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_member_timeout_remove (snowflake guild_id, snowflake user_id) co_guild_member_timeout_remove dpp::cluster::co_guild_member_timeout_remove snowflake guild_id snowflake user_id

Remove the timeout of a guild member. A shortcut for guild_member_timeout(guild_id, user_id, 0, callback) Fires a `Guild Member Update` Gateway event.

dpp::cluster::guild_member_timeout_remove

https://discord.com/developers/docs/resources/guild#modify-guild-member

This method supports audit log reasons set by the cluster::set_audit_reason() method.

guild_id

Guild ID to remove the member timeout from

user_id

User ID to remove the timeout for

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_messages_search (snowflake guild_id, const message_search_params &params) co_guild_messages_search dpp::cluster::co_guild_messages_search snowflake guild_id const message_search_params & params

Search for messages in a guild.

dpp::cluster::guild_messages_search

https://discord.com/developers/docs/resources/message#search-guild-messages

guild_id

Guild ID to search in

params

Search parameters

message_search_result returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_modify_integration (snowflake guild_id, const class integration &i) co_guild_modify_integration dpp::cluster::co_guild_modify_integration snowflake guild_id const class integration & i

Modify guild integration.

This method supports audit log reasons set by the cluster::set_audit_reason() method.

dpp::cluster::guild_modify_integration

https://discord.com/developers/docs/resources/guild#modify-guild-integration

guild_id

Guild ID to modify integration for

i

Integration to modify

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_search_members (snowflake guild_id, const std::string &query, uint16_t limit) co_guild_search_members dpp::cluster::co_guild_search_members snowflake guild_id const std::string & query uint16_t limit

Search for guild members based on whether their username or nickname starts with the given string.

This endpoint is restricted according to whether the `GUILD_MEMBERS` Privileged Intent is enabled for your application.

dpp::cluster::guild_search_members

https://discord.com/developers/docs/resources/guild#search-guild-members

guild_id

Guild ID to search in

query

Query string to match username(s) and nickname(s) against

limit

max number of members to return (1-1000)

guild_member_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_set_nickname (snowflake guild_id, const std::string &nickname) co_guild_set_nickname dpp::cluster::co_guild_set_nickname snowflake guild_id const std::string & nickname

Change current user nickname.

Modifies the nickname of the current user in a guild. Fires a `Guild Member Update` Gateway event.

Deprecated

Deprecated in favor of Modify Current Member. Will be replaced by dpp::cluster::guild_current_member_edit

This method supports audit log reasons set by the cluster::set_audit_reason() method.

dpp::cluster::guild_set_nickname

https://discord.com/developers/docs/resources/guild#modify-current-user-nick

guild_id

Guild ID to change nickname on

nickname

New nickname, or empty string to clear nickname

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_sticker_create (const sticker &s) co_guild_sticker_create dpp::cluster::co_guild_sticker_create const sticker & s

Create a sticker in a guild.

This method supports audit log reasons set by the cluster::set_audit_reason() method.

dpp::cluster::guild_sticker_create

https://discord.com/developers/docs/resources/sticker#create-guild-sticker

s

Sticker to create. Must have its guild ID set.

sticker returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_sticker_delete (snowflake sticker_id, snowflake guild_id) co_guild_sticker_delete dpp::cluster::co_guild_sticker_delete snowflake sticker_id snowflake guild_id

Delete a sticker from a guild.

This method supports audit log reasons set by the cluster::set_audit_reason() method.

dpp::cluster::guild_sticker_delete

https://discord.com/developers/docs/resources/sticker#delete-guild-sticker

sticker_id

sticker ID to delete

guild_id

guild ID to delete from

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_sticker_get (snowflake id, snowflake guild_id) co_guild_sticker_get dpp::cluster::co_guild_sticker_get snowflake id snowflake guild_id

Get a guild sticker.

dpp::cluster::guild_sticker_get

https://discord.com/developers/docs/resources/sticker#get-guild-sticker

id

Id of sticker to get.

guild_id

Guild ID of the guild where the sticker is

sticker returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_sticker_modify (const sticker &s) co_guild_sticker_modify dpp::cluster::co_guild_sticker_modify const sticker & s

Modify a sticker in a guild.

This method supports audit log reasons set by the cluster::set_audit_reason() method.

dpp::cluster::guild_sticker_modify

https://discord.com/developers/docs/resources/sticker#modify-guild-sticker

s

Sticker to modify. Must have its guild ID and sticker ID set.

sticker returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_stickers_get (snowflake guild_id) co_guild_stickers_get dpp::cluster::co_guild_stickers_get snowflake guild_id

Get all guild stickers.

dpp::cluster::guild_stickers_get

https://discord.com/developers/docs/resources/sticker#list-guild-stickers

guild_id

Guild ID of the guild where the sticker is

sticker_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_sync_integration (snowflake guild_id, snowflake integration_id) co_guild_sync_integration dpp::cluster::co_guild_sync_integration snowflake guild_id snowflake integration_id

Sync guild integration.

dpp::cluster::guild_sync_integration

https://discord.com/developers/docs/resources/guild#sync-guild-integration

guild_id

Guild ID to sync integration on

integration_id

Integration ID to synchronise

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_template_create (snowflake guild_id, const std::string &name, const std::string &description) co_guild_template_create dpp::cluster::co_guild_template_create snowflake guild_id const std::string & name const std::string & description

Creates a template for the guild.

dpp::cluster::guild_template_create

https://discord.com/developers/docs/resources/guild-template#create-guild-template

guild_id

Guild to create template from

name

Template name to create

description

Description of template to create

dtemplate returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_template_delete (snowflake guild_id, const std::string &code) co_guild_template_delete dpp::cluster::co_guild_template_delete snowflake guild_id const std::string & code

Deletes the template.

dpp::cluster::guild_template_delete

https://discord.com/developers/docs/resources/guild-template#delete-guild-template

guild_id

Guild ID of template to delete

code

Template code to delete

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_template_modify (snowflake guild_id, const std::string &code, const std::string &name, const std::string &description) co_guild_template_modify dpp::cluster::co_guild_template_modify snowflake guild_id const std::string & code const std::string & name const std::string & description

Modifies the template's metadata.

dpp::cluster::guild_template_modify

https://discord.com/developers/docs/resources/guild-template#modify-guild-template

guild_id

Guild ID of template to modify

code

Template code to modify

name

New name of template

description

New description of template

dtemplate returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_template_sync (snowflake guild_id, const std::string &code) co_guild_template_sync dpp::cluster::co_guild_template_sync snowflake guild_id const std::string & code

Syncs the template to the guild's current state.

dpp::cluster::guild_template_sync

https://discord.com/developers/docs/resources/guild-template#sync-guild-template

guild_id

Guild to synchronise template for

code

Code of template to synchronise

dtemplate returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_guild_templates_get (snowflake guild_id) co_guild_templates_get dpp::cluster::co_guild_templates_get snowflake guild_id

Get guild templates.

dpp::cluster::guild_templates_get

https://discord.com/developers/docs/resources/guild-template#get-guild-templates

guild_id

Guild ID to get templates for

dtemplate_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_interaction_followup_create (const std::string &token, const message &m) co_interaction_followup_create dpp::cluster::co_interaction_followup_create const std::string & token const message & m

Create a followup message for an interaction.

dpp::cluster::interaction_followup_create

https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response

token

Token for the interaction webhook

m

followup message to create

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_interaction_followup_delete (const std::string &token) co_interaction_followup_delete dpp::cluster::co_interaction_followup_delete const std::string & token

Delete the initial interaction response.

dpp::cluster::interaction_followup_delete

https://discord.com/developers/docs/interactions/receiving-and-responding#delete-original-interaction-response

token

Token for the interaction webhook

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_interaction_followup_edit (const std::string &token, const message &m) co_interaction_followup_edit dpp::cluster::co_interaction_followup_edit const std::string & token const message & m

Edit followup message for an interaction The message ID in the message you pass should be correctly set to that of a followup message you previously sent.

dpp::cluster::interaction_followup_edit

https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message

token

Token for the interaction webhook

m

message to edit, the ID should be set

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_interaction_followup_edit_original (const std::string &token, const message &m) co_interaction_followup_edit_original dpp::cluster::co_interaction_followup_edit_original const std::string & token const message & m

Edit original followup message for an interaction This is an alias for cluster::interaction_response_edit.

dpp::cluster::interaction_followup_edit_original

cluster::interaction_response_edit

token

Token for the interaction webhook

m

message to edit, the ID should be set

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_interaction_followup_get (const std::string &token, snowflake message_id) co_interaction_followup_get dpp::cluster::co_interaction_followup_get const std::string & token snowflake message_id

Get the followup message for an interaction.

dpp::cluster::interaction_followup_get

https://discord.com/developers/docs/interactions/receiving-and-responding#get-followup-message

token

Token for the interaction webhook

message_id

message to retrieve

message returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_interaction_followup_get_original (const std::string &token) co_interaction_followup_get_original dpp::cluster::co_interaction_followup_get_original const std::string & token

Get the original followup message for an interaction This is an alias for cluster::interaction_response_get_original.

dpp::cluster::interaction_followup_get_original

cluster::interaction_response_get_original

token

Token for the interaction webhook

message returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_interaction_response_create (snowflake interaction_id, const std::string &token, const interaction_response &r) co_interaction_response_create dpp::cluster::co_interaction_response_create snowflake interaction_id const std::string & token const interaction_response & r

Respond to a slash command.

dpp::cluster::interaction_response_create

https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response

interaction_id

Interaction id to respond to

token

Token for the interaction webhook

r

Response to send

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_interaction_response_edit (const std::string &token, const message &m) co_interaction_response_edit dpp::cluster::co_interaction_response_edit const std::string & token const message & m

Edit response to a slash command.

dpp::cluster::interaction_response_edit

https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response

token

Token for the interaction webhook

m

Message to send

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_interaction_response_get_original (const std::string &token) co_interaction_response_get_original dpp::cluster::co_interaction_response_get_original const std::string & token

Get the original response to a slash command.

dpp::cluster::interaction_response_get_original

https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response

token

Token for the interaction webhook

message returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_invite_get (const std::string &invite_code) co_invite_get dpp::cluster::co_invite_get const std::string & invite_code

Get details about an invite.

dpp::cluster::invite_get

https://discord.com/developers/docs/resources/invite#get-invite

invite_code

Invite code to get information on

invite returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_message_add_reaction (const struct message &m, const std::string &reaction) co_message_add_reaction dpp::cluster::co_message_add_reaction const struct message & m const std::string & reaction

Add a reaction to a message. The reaction string must be either an `emojiname:id` or a unicode character.

dpp::cluster::message_add_reaction

https://discord.com/developers/docs/resources/channel#create-reaction

m

Message to add a reaction to

reaction

Reaction to add. Emojis should be in the form emojiname:id

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_message_add_reaction (snowflake message_id, snowflake channel_id, const std::string &reaction) co_message_add_reaction dpp::cluster::co_message_add_reaction snowflake message_id snowflake channel_id const std::string & reaction

Add a reaction to a message by id. The reaction string must be either an `emojiname:id` or a unicode character.

dpp::cluster::message_add_reaction

https://discord.com/developers/docs/topics/gateway#message-reaction-add

message_id

Message to add reactions to

channel_id

Channel to add reactions to

reaction

Reaction to add. Emojis should be in the form emojiname:id

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_message_create (const struct message &m) co_message_create dpp::cluster::co_message_create const struct message & m

Send a message to a channel. The callback function is called when the message has been sent.

dpp::cluster::message_create

https://discord.com/developers/docs/resources/channel#create-message

m

Message to send

message returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_message_crosspost (snowflake message_id, snowflake channel_id) co_message_crosspost dpp::cluster::co_message_crosspost snowflake message_id snowflake channel_id

Crosspost a message. The callback function is called when the message has been sent.

dpp::cluster::message_crosspost

https://discord.com/developers/docs/resources/channel#crosspost-message

message_id

Message to crosspost

channel_id

Channel ID to crosspost from

message returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_message_delete (snowflake message_id, snowflake channel_id) co_message_delete dpp::cluster::co_message_delete snowflake message_id snowflake channel_id

Delete a message from a channel. The callback function is called when the message has been edited.

This method supports audit log reasons set by the cluster::set_audit_reason() method.

dpp::cluster::message_delete

https://discord.com/developers/docs/resources/channel#delete-message

message_id

Message ID to delete

channel_id

Channel to delete from

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_message_delete_all_reactions (const struct message &m) co_message_delete_all_reactions dpp::cluster::co_message_delete_all_reactions const struct message & m

Delete all reactions on a message.

dpp::cluster::message_delete_all_reactions

https://discord.com/developers/docs/resources/channel#delete-all-reactions

m

Message to delete reactions from

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_message_delete_all_reactions (snowflake message_id, snowflake channel_id) co_message_delete_all_reactions dpp::cluster::co_message_delete_all_reactions snowflake message_id snowflake channel_id

Delete all reactions on a message by id.

dpp::cluster::message_delete_all_reactions

https://discord.com/developers/docs/resources/channel#delete-all-reactions

message_id

Message to delete reactions from

channel_id

Channel to delete reactions from

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_message_delete_bulk (const std::vector< snowflake > &message_ids, snowflake channel_id) co_message_delete_bulk dpp::cluster::co_message_delete_bulk const std::vector< snowflake > & message_ids snowflake channel_id

Bulk delete messages from a channel. The callback function is called when the message has been edited.

This method supports audit log reasons set by the cluster::set_audit_reason() method.

If any message provided older than 2 weeks or any duplicate message ID, it will fail.

dpp::cluster::message_delete_bulk

https://discord.com/developers/docs/resources/channel#bulk-delete-messages

message_ids

List of message IDs to delete (at least 2 and at most 100 message IDs)

channel_id

Channel to delete from

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_message_delete_own_reaction (const struct message &m, const std::string &reaction) co_message_delete_own_reaction dpp::cluster::co_message_delete_own_reaction const struct message & m const std::string & reaction

Delete own reaction from a message. The reaction string must be either an `emojiname:id` or a unicode character.

dpp::cluster::message_delete_own_reaction

https://discord.com/developers/docs/resources/channel#delete-own-reaction

m

Message to delete own reaction from

reaction

Reaction to delete. The reaction should be in the form emojiname:id

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_message_delete_own_reaction (snowflake message_id, snowflake channel_id, const std::string &reaction) co_message_delete_own_reaction dpp::cluster::co_message_delete_own_reaction snowflake message_id snowflake channel_id const std::string & reaction

Delete own reaction from a message by id. The reaction string must be either an `emojiname:id` or a unicode character.

dpp::cluster::message_delete_own_reaction

https://discord.com/developers/docs/resources/channel#delete-own-reaction

message_id

Message to delete reactions from

channel_id

Channel to delete reactions from

reaction

Reaction to delete. The reaction should be in the form emojiname:id

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_message_delete_reaction (const struct message &m, snowflake user_id, const std::string &reaction) co_message_delete_reaction dpp::cluster::co_message_delete_reaction const struct message & m snowflake user_id const std::string & reaction

Delete a user's reaction from a message. The reaction string must be either an `emojiname:id` or a unicode character.

dpp::cluster::message_delete_reaction

https://discord.com/developers/docs/resources/channel#delete-user-reaction

m

Message to delete a user's reaction from

user_id

User ID who's reaction you want to remove

reaction

Reaction to remove. Reactions should be in the form emojiname:id

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_message_delete_reaction (snowflake message_id, snowflake channel_id, snowflake user_id, const std::string &reaction) co_message_delete_reaction dpp::cluster::co_message_delete_reaction snowflake message_id snowflake channel_id snowflake user_id const std::string & reaction

Delete a user's reaction from a message by id. The reaction string must be either an `emojiname:id` or a unicode character.

dpp::cluster::message_delete_reaction

https://discord.com/developers/docs/resources/channel#delete-user-reaction

message_id

Message to delete reactions from

channel_id

Channel to delete reactions from

user_id

User ID who's reaction you want to remove

reaction

Reaction to remove. Reactions should be in the form emojiname:id

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_message_delete_reaction_emoji (const struct message &m, const std::string &reaction) co_message_delete_reaction_emoji dpp::cluster::co_message_delete_reaction_emoji const struct message & m const std::string & reaction

Delete all reactions on a message using a particular emoji. The reaction string must be either an `emojiname:id` or a unicode character.

dpp::cluster::message_delete_reaction_emoji

https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji

m

Message to delete reactions from

reaction

Reaction to delete, in the form emojiname:id or a unicode character

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_message_delete_reaction_emoji (snowflake message_id, snowflake channel_id, const std::string &reaction) co_message_delete_reaction_emoji dpp::cluster::co_message_delete_reaction_emoji snowflake message_id snowflake channel_id const std::string & reaction

Delete all reactions on a message using a particular emoji by id. The reaction string must be either an `emojiname:id` or a unicode character.

dpp::cluster::message_delete_reaction_emoji

https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji

message_id

Message to delete reactions from

channel_id

Channel to delete reactions from

reaction

Reaction to delete, in the form emojiname:id or a unicode character

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_message_edit (const struct message &m) co_message_edit dpp::cluster::co_message_edit const struct message & m

Edit a message on a channel. The callback function is called when the message has been edited.

dpp::cluster::message_edit

https://discord.com/developers/docs/resources/channel#edit-message

m

Message to edit

message returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_message_edit_flags (const struct message &m) co_message_edit_flags dpp::cluster::co_message_edit_flags const struct message & m

Edit the flags of a message on a channel. The callback function is called when the message has been edited.

m

Message to edit the flags of

message returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_message_get (snowflake message_id, snowflake channel_id) co_message_get dpp::cluster::co_message_get snowflake message_id snowflake channel_id

Get a message.

dpp::cluster::message_get

https://discord.com/developers/docs/resources/channel#get-channel-message

message_id

Message ID

channel_id

Channel ID

message returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_message_get_reactions (const struct message &m, const std::string &reaction, snowflake before, snowflake after, snowflake limit) co_message_get_reactions dpp::cluster::co_message_get_reactions const struct message & m const std::string & reaction snowflake before snowflake after snowflake limit

Get reactions on a message for a particular emoji. The reaction string must be either an `emojiname:id` or a unicode character.

dpp::cluster::message_get_reactions

https://discord.com/developers/docs/resources/channel#get-reactions

m

Message to get reactions for

reaction

Reaction should be in the form emojiname:id or a unicode character

before

Reactions before this ID should be retrieved if this is set to non-zero

after

Reactions before this ID should be retrieved if this is set to non-zero

limit

This number of reactions maximum should be returned

user_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_message_get_reactions (snowflake message_id, snowflake channel_id, const std::string &reaction, snowflake before, snowflake after, snowflake limit) co_message_get_reactions dpp::cluster::co_message_get_reactions snowflake message_id snowflake channel_id const std::string & reaction snowflake before snowflake after snowflake limit

Get reactions on a message for a particular emoji by id. The reaction string must be either an `emojiname:id` or a unicode character.

dpp::cluster::message_get_reactions

https://discord.com/developers/docs/resources/channel#get-reactions

message_id

Message to get reactions for

channel_id

Channel to get reactions for

reaction

Reaction should be in the form emojiname:id or a unicode character

before

Reactions before this ID should be retrieved if this is set to non-zero

after

Reactions before this ID should be retrieved if this is set to non-zero

limit

This number of reactions maximum should be returned

emoji_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_message_pin (snowflake channel_id, snowflake message_id) co_message_pin dpp::cluster::co_message_pin snowflake channel_id snowflake message_id

Pin a message.

This method supports audit log reasons set by the cluster::set_audit_reason() method.

dpp::cluster::message_pin

https://discord.com/developers/docs/resources/channel#pin-message

channel_id

Channel id to pin message on

message_id

Message id to pin message on

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_message_unpin (snowflake channel_id, snowflake message_id) co_message_unpin dpp::cluster::co_message_unpin snowflake channel_id snowflake message_id

Unpin a message.

dpp::cluster::message_unpin

https://discord.com/developers/docs/resources/channel#unpin-message

This method supports audit log reasons set by the cluster::set_audit_reason() method.

channel_id

Channel id to unpin message on

message_id

Message id to unpin message on

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_messages_get (snowflake channel_id, snowflake around, snowflake before, snowflake after, uint64_t limit) co_messages_get dpp::cluster::co_messages_get snowflake channel_id snowflake around snowflake before snowflake after uint64_t limit

Get multiple messages.

This function will attempt to fetch as many messages as possible using multiple API calls if needed.

dpp::cluster::messages_get

https://discord.com/developers/docs/resources/channel#get-channel-messages

channel_id

Channel ID to retrieve messages for

around

Messages should be retrieved around this ID if this is set to non-zero

before

Messages before this ID should be retrieved if this is set to non-zero

after

Messages after this ID should be retrieved if this is set to non-zero

limit

This number of messages maximum should be returned, up to a maximum of 100.

message_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_nitro_sticker_get (snowflake id) co_nitro_sticker_get dpp::cluster::co_nitro_sticker_get snowflake id

Get a nitro sticker.

dpp::cluster::nitro_sticker_get

https://discord.com/developers/docs/resources/sticker#get-sticker

id

Id of sticker to get.

sticker returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_poll_end (const message &m) co_poll_end dpp::cluster::co_poll_end const message & m

Immediately end a poll.

m

Message that contains the poll

message returned object on completion

dpp::cluster::poll_end

https://discord.com/developers/docs/resources/poll#end-poll

async< confirmation_callback_t > async< confirmation_callback_t > co_poll_end (snowflake message_id, snowflake channel_id) co_poll_end dpp::cluster::co_poll_end snowflake message_id snowflake channel_id

Immediately end a poll.

message_id

ID of the message with the poll to end

channel_id

ID of the channel with the poll to end

message returned object on completion

dpp::cluster::poll_end

https://discord.com/developers/docs/resources/poll#end-poll

async< confirmation_callback_t > async< confirmation_callback_t > co_poll_get_answer_voters (const message &m, uint32_t answer_id, snowflake after, uint64_t limit) co_poll_get_answer_voters dpp::cluster::co_poll_get_answer_voters const message & m uint32_t answer_id snowflake after uint64_t limit

Get a list of users that voted for this specific answer.

m

Message that contains the poll to retrieve the answers from

answer_id

ID of the answer to retrieve votes from (see poll_answer::answer_id)

after

Users after this ID should be retrieved if this is set to non-zero

limit

This number of users maximum should be returned, up to 100

user_map returned object on completion

dpp::cluster::poll_get_answer_voters

https://discord.com/developers/docs/resources/poll#get-answer-voters

async< confirmation_callback_t > async< confirmation_callback_t > co_poll_get_answer_voters (snowflake message_id, snowflake channel_id, uint32_t answer_id, snowflake after, uint64_t limit) co_poll_get_answer_voters dpp::cluster::co_poll_get_answer_voters snowflake message_id snowflake channel_id uint32_t answer_id snowflake after uint64_t limit

Get a list of users that voted for this specific answer.

message_id

ID of the message with the poll to retrieve the answers from

channel_id

ID of the channel with the poll to retrieve the answers from

answer_id

ID of the answer to retrieve votes from (see poll_answer::answer_id)

after

Users after this ID should be retrieved if this is set to non-zero

limit

This number of users maximum should be returned, up to 100

user_map returned object on completion

dpp::cluster::poll_get_answer_voters

https://discord.com/developers/docs/resources/poll#get-answer-voters

async< confirmation_callback_t > async< confirmation_callback_t > co_role_create (const class role &r) co_role_create dpp::cluster::co_role_create const class role & r

Create a role on a guild.

Create a new role for the guild. Requires the `MANAGE_ROLES` permission. Returns the new role object on success. Fires a `Guild Role Create` Gateway event.

dpp::cluster::role_create

https://discord.com/developers/docs/resources/guild#create-guild-role

This method supports audit log reasons set by the cluster::set_audit_reason() method.

r

Role to create (guild ID is encapsulated in the role object)

role returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_role_delete (snowflake guild_id, snowflake role_id) co_role_delete dpp::cluster::co_role_delete snowflake guild_id snowflake role_id

Delete a role.

Requires the `MANAGE_ROLES` permission. Fires a `Guild Role Delete` Gateway event.

dpp::cluster::role_delete

https://discord.com/developers/docs/resources/guild#delete-guild-role

This method supports audit log reasons set by the cluster::set_audit_reason() method.

guild_id

Guild ID to delete the role on

role_id

Role ID to delete

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_role_edit (const class role &r) co_role_edit dpp::cluster::co_role_edit const class role & r

Edit a role on a guild.

Requires the `MANAGE_ROLES` permission. Returns the updated role on success. Fires a `Guild Role Update` Gateway event.

dpp::cluster::role_edit

https://discord.com/developers/docs/resources/guild#modify-guild-role

This method supports audit log reasons set by the cluster::set_audit_reason() method.

r

Role to edit

role returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_roles_edit_position (snowflake guild_id, const std::vector< role > &roles) co_roles_edit_position dpp::cluster::co_roles_edit_position snowflake guild_id const std::vector< role > & roles

Edit multiple role's position in a guild. Returns a list of all roles of the guild on success.

Modify the positions of a set of role objects for the guild. Requires the `MANAGE_ROLES` permission. Fires multiple `Guild Role Update` Gateway events.

dpp::cluster::roles_edit_position

https://discord.com/developers/docs/resources/guild#modify-guild-role-positions

This method supports audit log reasons set by the cluster::set_audit_reason() method.

guild_id

Guild ID to change the roles position on

roles

Vector of roles to change the positions of

role_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_roles_get (snowflake guild_id) co_roles_get dpp::cluster::co_roles_get snowflake guild_id

Get a role for a guild.

dpp::cluster::roles_get

https://discord.com/developers/docs/resources/guild#get-guild-roles

guild_id

Guild ID to get role for

role_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_skus_get () co_skus_get dpp::cluster::co_skus_get

Returns all SKUs for a given application.

Because of how Discord's SKU and subscription systems work, you will see two SKUs for your premium offering. For integration and testing entitlements, you should use the SKU with type: 5.

dpp::cluster::skus_get

https://discord.com/developers/docs/monetization/skus#list-skus

sku_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_stage_instance_delete (const snowflake channel_id) co_stage_instance_delete dpp::cluster::co_stage_instance_delete const snowflake channel_id

Delete a stage instance.

dpp::cluster::stage_instance_delete

https://discord.com/developers/docs/resources/stage-instance#delete-stage-instance

channel_id

ID of the associated channel

confirmation returned object on completion

This method supports audit log reasons set by the cluster::set_audit_reason() method.

async< confirmation_callback_t > async< confirmation_callback_t > co_stage_instance_get (const snowflake channel_id) co_stage_instance_get dpp::cluster::co_stage_instance_get const snowflake channel_id

Get the stage instance associated with the channel id, if it exists.

dpp::cluster::stage_instance_get

https://discord.com/developers/docs/resources/stage-instance#get-stage-instance

channel_id

ID of the associated channel

stage_instance returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_sticker_packs_get () co_sticker_packs_get dpp::cluster::co_sticker_packs_get

Get a list of available sticker packs.

dpp::cluster::sticker_packs_get

https://discord.com/developers/docs/resources/sticker#list-sticker-packs

sticker_pack_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_template_get (const std::string &code) co_template_get dpp::cluster::co_template_get const std::string & code

Get a template.

dpp::cluster::template_get

https://discord.com/developers/docs/resources/guild-template#get-guild-template

code

Template code

dtemplate returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_thread_create (const std::string &thread_name, snowflake channel_id, uint16_t auto_archive_duration, channel_type thread_type, bool invitable, uint16_t rate_limit_per_user) co_thread_create dpp::cluster::co_thread_create const std::string & thread_name snowflake channel_id uint16_t auto_archive_duration channel_type thread_type bool invitable uint16_t rate_limit_per_user

Create a thread.

This method supports audit log reasons set by the cluster::set_audit_reason() method.

dpp::cluster::thread_create

https://discord.com/developers/docs/resources/channel#start-thread-without-message

thread_name

Name of the thread

channel_id

Channel in which thread to create

auto_archive_duration

Duration after which thread auto-archives. Can be set to - 60, 1440 (for boosted guilds can also be: 4320, 10080)

thread_type

Type of thread - CHANNEL_PUBLIC_THREAD, CHANNEL_ANNOUNCEMENT_THREAD, CHANNEL_PRIVATE_THREAD

invitable

whether non-moderators can add other non-moderators to a thread; only available when creating a private thread

rate_limit_per_user

amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages, manage_thread, or manage_channel, are unaffected

thread returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_thread_create_in_forum (const std::string &thread_name, snowflake channel_id, const message &msg, auto_archive_duration_t auto_archive_duration, uint16_t rate_limit_per_user, std::vector< snowflake > applied_tags={}) co_thread_create_in_forum dpp::cluster::co_thread_create_in_forum const std::string & thread_name snowflake channel_id const message & msg auto_archive_duration_t auto_archive_duration uint16_t rate_limit_per_user std::vector< snowflake > applied_tags {}

Create a thread in a forum or media channel.

This method supports audit log reasons set by the cluster::set_audit_reason() method.

dpp::cluster::thread_create_in_forum

https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel

thread_name

Name of the forum thread

channel_id

Forum channel in which thread to create

msg

The message to start the thread with

auto_archive_duration

Duration to automatically archive the thread after recent activity

rate_limit_per_user

amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages, manage_thread, or manage_channel, are unaffected

applied_tags

List of IDs of forum tags (dpp::forum_tag) to apply to this thread

thread returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_thread_create_with_message (const std::string &thread_name, snowflake channel_id, snowflake message_id, uint16_t auto_archive_duration, uint16_t rate_limit_per_user) co_thread_create_with_message dpp::cluster::co_thread_create_with_message const std::string & thread_name snowflake channel_id snowflake message_id uint16_t auto_archive_duration uint16_t rate_limit_per_user

Create a thread with a message (Discord: ID of a thread is same as message ID).

This method supports audit log reasons set by the cluster::set_audit_reason() method.

dpp::cluster::thread_create_with_message

https://discord.com/developers/docs/resources/channel#start-thread-from-message

thread_name

Name of the thread

channel_id

Channel in which thread to create

message_id

message to start thread with

auto_archive_duration

Duration after which thread auto-archives. Can be set to - 60, 1440 (for boosted guilds can also be: 4320, 10080)

rate_limit_per_user

amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages, manage_thread, or manage_channel, are unaffected

thread returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_thread_edit (const thread &t) co_thread_edit dpp::cluster::co_thread_edit const thread & t

Edit a thread.

This method supports audit log reasons set by the cluster::set_audit_reason() method.

dpp::cluster::thread_edit

https://discord.com/developers/docs/topics/threads#editing-deleting-threads

t

Thread to edit

thread returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_thread_get (snowflake thread_id) co_thread_get dpp::cluster::co_thread_get snowflake thread_id

Get the thread specified by thread_id. This uses the same call as dpp::cluster::channel_get but returns a thread object.

dpp::cluster::thread_get

https://discord.com/developers/docs/resources/channel#get-channel

thread_id

The id of the thread to obtain.

thread returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_thread_member_add (snowflake thread_id, snowflake user_id) co_thread_member_add dpp::cluster::co_thread_member_add snowflake thread_id snowflake user_id

Add a member to a thread.

dpp::cluster::thread_member_add

https://discord.com/developers/docs/resources/channel#add-thread-member

thread_id

Thread ID to add to

user_id

Member ID to add

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_thread_member_get (const snowflake thread_id, const snowflake user_id) co_thread_member_get dpp::cluster::co_thread_member_get const snowflake thread_id const snowflake user_id

Get a thread member.

dpp::cluster::thread_member_get

https://discord.com/developers/docs/resources/channel#get-thread-member

thread_id

Thread to get member for

user_id

ID of the user to get

thread_member returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_thread_member_remove (snowflake thread_id, snowflake user_id) co_thread_member_remove dpp::cluster::co_thread_member_remove snowflake thread_id snowflake user_id

Remove a member from a thread.

dpp::cluster::thread_member_remove

https://discord.com/developers/docs/resources/channel#remove-thread-member

thread_id

Thread ID to remove from

user_id

Member ID to remove

confirmation returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_thread_members_get (snowflake thread_id) co_thread_members_get dpp::cluster::co_thread_members_get snowflake thread_id

Get members of a thread.

dpp::cluster::thread_members_get

https://discord.com/developers/docs/resources/channel#list-thread-members

thread_id

Thread to get members for

thread_member_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_threads_get_active (snowflake guild_id) co_threads_get_active dpp::cluster::co_threads_get_active snowflake guild_id

Get all active threads in the guild, including public and private threads. Threads are ordered by their id, in descending order.

dpp::cluster::threads_get_active

https://discord.com/developers/docs/resources/guild#list-active-guild-threads

guild_id

Guild to get active threads for

active_threads returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_threads_get_joined_private_archived (snowflake channel_id, snowflake before_id, uint16_t limit) co_threads_get_joined_private_archived dpp::cluster::co_threads_get_joined_private_archived snowflake channel_id snowflake before_id uint16_t limit

Get private archived threads in a channel which current user has joined (Sorted by ID in descending order).

dpp::cluster::threads_get_joined_private_archived

https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads

channel_id

Channel to get public archived threads for

before_id

Get threads before this id

limit

Number of threads to get

thread_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_threads_get_private_archived (snowflake channel_id, time_t before_timestamp, uint16_t limit) co_threads_get_private_archived dpp::cluster::co_threads_get_private_archived snowflake channel_id time_t before_timestamp uint16_t limit

Get private archived threads in a channel (Sorted by archive_timestamp in descending order).

dpp::cluster::threads_get_private_archived

https://discord.com/developers/docs/resources/channel#list-private-archived-threads

channel_id

Channel to get public archived threads for

before_timestamp

Get threads archived before this timestamp

limit

Number of threads to get

thread_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_threads_get_public_archived (snowflake channel_id, time_t before_timestamp, uint16_t limit) co_threads_get_public_archived dpp::cluster::co_threads_get_public_archived snowflake channel_id time_t before_timestamp uint16_t limit

Get public archived threads in a channel (Sorted by archive_timestamp in descending order).

dpp::cluster::threads_get_public_archived

https://discord.com/developers/docs/resources/channel#list-public-archived-threads

channel_id

Channel to get public archived threads for

before_timestamp

Get threads archived before this timestamp

limit

Number of threads to get

thread_map returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_user_application_role_connection_get (snowflake application_id) co_user_application_role_connection_get dpp::cluster::co_user_application_role_connection_get snowflake application_id

Get user application role connection.

dpp::cluster::user_application_role_connection_get

https://discord.com/developers/docs/resources/user#get-user-application-role-connection

application_id

The application ID

application_role_connection returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_user_application_role_connection_update (snowflake application_id, const application_role_connection &connection) co_user_application_role_connection_update dpp::cluster::co_user_application_role_connection_update snowflake application_id const application_role_connection & connection

Update user application role connection.

dpp::cluster::user_application_role_connection_update

https://discord.com/developers/docs/resources/user#update-user-application-role-connection

application_id

The application ID

connection

The application role connection to update

application_role_connection returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_user_get (snowflake user_id) co_user_get dpp::cluster::co_user_get snowflake user_id

Get a user by id, without using the cache.

dpp::cluster::user_get

https://discord.com/developers/docs/resources/user#get-user

user_id

User ID to retrieve

user_identified returned object on completion

The user_identified object is a subclass of dpp::user which contains further details if you have the oauth2 identify or email scopes. If you do not have these scopes, these fields are empty. You can safely convert a user_identified to user with `dynamic_cast`.

unless you want something special from `dpp::user_identified` or you've turned off caching, you have no need to call this. Call `dpp::find_user` instead that looks up the user in the cache rather than a REST call.

async< confirmation_callback_t > async< confirmation_callback_t > co_user_get_cached (snowflake user_id) co_user_get_cached dpp::cluster::co_user_get_cached snowflake user_id

Get a user by id, checking in the cache first.

dpp::cluster::user_get_cached

https://discord.com/developers/docs/resources/user#get-user

user_id

User ID to retrieve

user_identified returned object on completion

The user_identified object is a subclass of dpp::user which contains further details if you have the oauth2 identify or email scopes. If you do not have these scopes, these fields are empty. You can safely convert a user_identified to user with `dynamic_cast`.

If the user is found in the cache, special values set in `dpp::user_identified` will be undefined. This call should be used where you want to for example resolve a user who may no longer be in the bot's guilds, for something like a ban log message.

async< confirmation_callback_t > async< confirmation_callback_t > co_user_get_voice_state (snowflake guild_id, snowflake user_id) co_user_get_voice_state dpp::cluster::co_user_get_voice_state snowflake guild_id snowflake user_id

Get a user's voice state in a guild without a Gateway connection.

dpp::cluster::user_get_voice_state

https://discord.com/developers/docs/resources/voice#get-user-voice-state

guild_id

Guild to get the voice state for

user_id

The user to get the voice state of

voicestate returned object on completion

async< confirmation_callback_t > async< confirmation_callback_t > co_user_set_voice_state (snowflake user_id, snowflake guild_id, snowflake channel_id, bool suppress=false) co_user_set_voice_state dpp::cluster::co_user_set_voice_state snowflake user_id snowflake guild_id snowflake channel_id bool suppress false

Set a user's voice state on a stage channel.

Caveats

There are currently several caveats for this endpoint:

- `channel_id` must currently point to a stage channel.

- User must already have joined `channel_id`.

- You must have the `MUTE_MEMBERS` permission. (Since suppression is the only thing that is available currently)

- When unsuppressed, non-bot users will have their `request_to_speak_timestamp` set to the current time. Bot users will not.

- When suppressed, the user will have their `request_to_speak_timestamp` removed.

dpp::cluster::user_set_voice_state

https://discord.com/developers/docs/resources/guild#modify-user-voice-state

user_id

The user to set the voice state of

guild_id

Guild to set voice state on

channel_id

Stage channel to set voice state on

confirmation returned object on completion

suppress

True if the user's audio should be suppressed, false if it should not

class T
std::string std::string dpp::comma (T value) comma dpp::comma T value

Add commas to a string (or dots) based on current locale server-side.

T

type of numeric value

value

Value

std::string number with commas added

DPP_EXPORT std::unique_ptr< socket_engine_base > DPP_EXPORT std::unique_ptr< socket_engine_base > dpp::create_socket_engine (class cluster *creator) create_socket_engine dpp::create_socket_engine class cluster * creator

This is implemented by whatever derived form socket_engine takes.

creator

Creating cluster

double DPP_EXPORT double DPP_EXPORT dpp::double_not_null (const nlohmann::json *j, const char *keyname) double_not_null dpp::double_not_null const nlohmann::json * j const char * keyname

Returns a double from a json field value, if defined, else returns 0.

j

nlohmann::json instance to retrieve value from

keyname

key name to check for a value

found value

dpp::DPP_CHECK_ABI_COMPAT
(async<>, async_dummy)
DPP_CHECK_ABI_COMPAT
dpp::DPP_CHECK_ABI_COMPAT
async<>
async_dummy
dpp::DPP_CHECK_ABI_COMPAT
(coroutine< void >, coroutine_dummy) DPP_CHECK_ABI_COMPAT(coroutine< uint64_t >
DPP_CHECK_ABI_COMPAT
dpp::DPP_CHECK_ABI_COMPAT
coroutine< void >
coroutine_dummy
dpp::DPP_CHECK_ABI_COMPAT
(task< void >, task_dummy) DPP_CHECK_ABI_COMPAT(task< uint64_t >
DPP_CHECK_ABI_COMPAT
dpp::DPP_CHECK_ABI_COMPAT
task< void >
task_dummy
class DPP_EXPORT class DPP_EXPORT dpp::DPP_DEPRECATED ("commandhandler should not be used. Please consider using dpp::cluster::register_command instead.") commandhandler DPP_DEPRECATED dpp::DPP_DEPRECATED "commandhandler should not be used. Please consider using dpp::cluster::register_command instead."

The commandhandler class represents a group of commands, prefixed or slash commands with handling functions.

It can automatically register slash commands, and handle routing of messages and interactions to separated command handler functions. Deprecated

commandhandler and message commands are deprecated and dpp::slashcommand is encouraged as a replacement.

List of guild commands to bulk register

List of global commands to bulk register

Commands in the handler

Valid prefixes

Set to true automatically if one of the prefixes added is "/"

Cluster we are attached to for issuing REST calls

Application ID

Interaction event handle

Message event handle

Returns true if the string has a known prefix on the start. Modifies string to remove prefix if it returns true.

str

String to check and modify

true string contained a prefix, prefix removed from string

false string did not contain a prefix

Construct a new commandhandler object

o

Owning cluster to attach to

auto_hook_events

Set to true to automatically hook the on_slashcommand and on_message events. You should not need to set this to false unless you have a specific use case, as D++ supports multiple listeners to an event, so will allow the commandhandler to hook to your command events without disrupting other uses for the events you may have.

application_id

The application id of the bot. If not specified, the class will look within the cluster object and use cluster::me::id instead.

Destroy the commandhandler object

Set the application id after construction

o

Owning cluster to attach to

Add a prefix to the command handler

prefix

Prefix to be handled by the command handler

commandhandler& reference to self

Add a command to the command handler

command

Command to be handled. Note that if any one of your prefixes is "/" this will attempt to register a global command using the API and you will receive notification of this command via an interaction event.

handler

Handler function

parameters

Parameters to use for the command

description

The description of the command, shown for slash commands

guild_id

The guild ID to restrict the command to. For slash commands causes registration of a guild command as opposed to a global command.

commandhandler& reference to self

dpp::logic_exception

if application ID cannot be determined

Register all slash commands with Discord This method must be called at least once if you are using the "/" prefix to mark the end of commands being added to the handler. Note that this uses bulk registration and will replace any existing slash commands.

Note that if you have previously registered your commands and they have not changed, you do not need to call this again. Discord retains a cache of previously added commands.

commandhandler& Reference to self for chaining method calls

Route a command from the on_message_create function. Call this method from within your on_message_create with the received dpp::message object if you have disabled automatic registration of events.

event

message create event to parse

Route a command from the on_slashcommand function. Call this method from your on_slashcommand with the received dpp::interaction_create_t object if you have disabled automatic registration of events.

event

command interaction event to parse

Reply to a command. You should use this method rather than cluster::message_create as the way you reply varies between slash commands and message commands. Note you should ALWAYS reply. Slash commands will emit an ugly error to the user if you do not emit some form of reply within 3 seconds.

m

message to reply with.

source

source of the command

callback

User function to execute when the api call completes.

Reply to a command without a message, causing the discord client to display "Bot name is thinking...". The "thinking" message will persist for a maximum of 15 minutes. This counts as a reply for a slash command. Slash commands will emit an ugly error to the user if you do not emit some form of reply within 3 seconds.

source

source of the command

callback

User function to execute when the api call completes.

Easter egg (redefinition of dpp::commandhandler::thinking).
DPP_EXPORT class channel * DPP_EXPORT class channel * dpp::find_channel (snowflake id) find_channel dpp::find_channel snowflake id

Find an object in the cache by id.

channel* Pointer to the object or nullptr when it's not found

DPP_EXPORT class emoji * DPP_EXPORT class emoji * dpp::find_emoji (snowflake id) find_emoji dpp::find_emoji snowflake id

Find an object in the cache by id.

emoji* Pointer to the object or nullptr when it's not found

DPP_EXPORT class guild * DPP_EXPORT class guild * dpp::find_guild (snowflake id) find_guild dpp::find_guild snowflake id

Find an object in the cache by id.

guild* Pointer to the object or nullptr when it's not found

guild_member DPP_EXPORT guild_member DPP_EXPORT dpp::find_guild_member (const snowflake guild_id, const snowflake user_id) find_guild_member dpp::find_guild_member const snowflake guild_id const snowflake user_id

Get the guild_member from cache of given IDs.

guild_id

ID of the guild to find guild_member for

user_id

ID of the user to find guild_member for

dpp::cache_exception

if the guild or guild_member is not found in the cache

guild_member the cached object, if found

DPP_EXPORT class role * DPP_EXPORT class role * dpp::find_role (snowflake id) find_role dpp::find_role snowflake id

Find an object in the cache by id.

role* Pointer to the object or nullptr when it's not found

DPP_EXPORT class user * DPP_EXPORT class user * dpp::find_user (snowflake id) find_user dpp::find_user snowflake id

Find an object in the cache by id.

user* Pointer to the object or nullptr when it's not found

void DPP_EXPORT void DPP_EXPORT dpp::for_each_json (nlohmann::json *parent, std::string_view key, const std::function< void(nlohmann::json *)> &fn) for_each_json dpp::for_each_json nlohmann::json * parent std::string_view key const std::function< void(nlohmann::json *)> & fn

Applies a function to each element of a json array.

parent

nlohmann::json instance to retrieve value from

key

key name to check for the values

fn

function to apply to each element

void void dpp::from_json (const nlohmann::json &j, autocomplete_interaction &ai) from_json dpp::from_json const nlohmann::json & j autocomplete_interaction & ai

helper function to deserialize an autocomplete_interaction from json

https://github.com/nlohmann/json#arbitrary-types-conversions

j

output json object

ai

autocomplete_interaction to be deserialized

void void dpp::from_json (const nlohmann::json &j, command_data_option &cdo) from_json dpp::from_json const nlohmann::json & j command_data_option & cdo

helper function to deserialize a command_data_option from json

https://github.com/nlohmann/json#arbitrary-types-conversions

j

output json object

cdo

command_data_option to be deserialized

void void dpp::from_json (const nlohmann::json &j, command_interaction &ci) from_json dpp::from_json const nlohmann::json & j command_interaction & ci

helper function to deserialize a command_interaction from json

https://github.com/nlohmann/json#arbitrary-types-conversions

j

output json object

ci

command_interaction to be deserialized

void void dpp::from_json (const nlohmann::json &j, component_interaction &bi) from_json dpp::from_json const nlohmann::json & j component_interaction & bi

helper function to deserialize a component_interaction from json

https://github.com/nlohmann/json#arbitrary-types-conversions

j

output json object

bi

button_interaction to be deserialized

void void dpp::from_json (const nlohmann::json &j, guild_member &gm) from_json dpp::from_json const nlohmann::json & j guild_member & gm

helper function to deserialize a guild_member from json

https://github.com/nlohmann/json#arbitrary-types-conversions

j

output json object

gm

guild_member to be deserialized

void void dpp::from_json (const nlohmann::json &j, interaction &i) from_json dpp::from_json const nlohmann::json & j interaction & i

helper function to deserialize an interaction from json

https://github.com/nlohmann/json#arbitrary-types-conversions

j

output json object

i

interaction to be deserialized

void void dpp::from_json (const nlohmann::json &j, user &u) from_json dpp::from_json const nlohmann::json & j user & u

helper function to deserialize a user from json

https://github.com/nlohmann/json#arbitrary-types-conversions

j

output json object

u

user to be deserialized

void void dpp::from_json (const nlohmann::json &j, user_identified &u) from_json dpp::from_json const nlohmann::json & j user_identified & u

helper function to deserialize a user_identified from json

https://github.com/nlohmann/json#arbitrary-types-conversions

j

output json object

u

user to be deserialized

int
int int dpp::from_string (const std::string &s) from_string dpp::from_string const std::string & s

Specialised conversion of int from string.

int

s

string to convert

int return value

uint32_t
uint32_t uint32_t dpp::from_string (const std::string &s) from_string dpp::from_string const std::string & s

Specialised conversion of uint32_t from string.

uint32_t

s

string to convert

uint32_t return value

uint64_t
uint64_t uint64_t dpp::from_string (const std::string &s) from_string dpp::from_string const std::string & s

Specialised conversion of uint64_t from string.

int64_t

s

string to convert

uint64_t return value

typename T
T T dpp::from_string (const std::string &s) from_string dpp::from_string const std::string & s

Convert any value from a string to another type using stringstream.

T

Type to convert to

s

String to convert from

T Returned numeric value

Base 10 for numeric conversions.

typename T
T T dpp::from_string (const std::string &s, std::ios_base &(*f)(std::ios_base &)) from_string dpp::from_string const std::string & s std::ios_base &(*)(std::ios_base &) f

Convert any value from a string to another type using stringstream. The optional second parameter indicates the format of the input string, e.g. std::dec for decimal, std::hex for hex, std::oct for octal.

T

Type to convert to

s

String to convert from

f

Numeric base, e.g. `std::dec` or `std::hex`

T Returned numeric value

void DPP_EXPORT void DPP_EXPORT dpp::garbage_collection () garbage_collection dpp::garbage_collection

Run garbage collection across all caches removing deleted items that have been deleted over 60 seconds ago.

DPP_EXPORT cache< class channel > * DPP_EXPORT cache< class channel > * dpp::get_channel_cache () get_channel_cache dpp::get_channel_cache
DPP_EXPORT uint64_t DPP_EXPORT uint64_t dpp::get_channel_count () get_channel_count dpp::get_channel_count

Get the amount of cached channel objects.

DPP_EXPORT cache< class emoji > * DPP_EXPORT cache< class emoji > * dpp::get_emoji_cache () get_emoji_cache dpp::get_emoji_cache
DPP_EXPORT uint64_t DPP_EXPORT uint64_t dpp::get_emoji_count () get_emoji_count dpp::get_emoji_count

Get the amount of cached emoji objects.

DPP_EXPORT cache< class guild > * DPP_EXPORT cache< class guild > * dpp::get_guild_cache () get_guild_cache dpp::get_guild_cache
DPP_EXPORT uint64_t DPP_EXPORT uint64_t dpp::get_guild_count () get_guild_count dpp::get_guild_count

Get the amount of cached guild objects.

DPP_EXPORT cache< class role > * DPP_EXPORT cache< class role > * dpp::get_role_cache () get_role_cache dpp::get_role_cache
DPP_EXPORT uint64_t DPP_EXPORT uint64_t dpp::get_role_count () get_role_count dpp::get_role_count

Get the amount of cached role objects.

DPP_EXPORT cache< class user > * DPP_EXPORT cache< class user > * dpp::get_user_cache () get_user_cache dpp::get_user_cache
DPP_EXPORT uint64_t DPP_EXPORT uint64_t dpp::get_user_count () get_user_count dpp::get_user_count

Get the amount of cached user objects.

uint16_t DPP_EXPORT uint16_t DPP_EXPORT dpp::int16_not_null (const nlohmann::json *j, const char *keyname) int16_not_null dpp::int16_not_null const nlohmann::json * j const char * keyname

Returns a 16 bit unsigned integer from a json field value, if defined, else returns 0.

j

nlohmann::json instance to retrieve value from

keyname

key name to check for a value

found value

uint32_t DPP_EXPORT uint32_t DPP_EXPORT dpp::int32_not_null (const nlohmann::json *j, const char *keyname) int32_not_null dpp::int32_not_null const nlohmann::json * j const char * keyname

Returns a 32 bit unsigned integer from a json field value, if defined, else returns 0.

j

nlohmann::json instance to retrieve value from

keyname

key name to check for a value

found value

uint64_t DPP_EXPORT uint64_t DPP_EXPORT dpp::int64_not_null (const nlohmann::json *j, const char *keyname) int64_not_null dpp::int64_not_null const nlohmann::json * j const char * keyname

Returns a 64 bit unsigned integer from a json field value, if defined, else returns 0. DO NOT use this for snowflakes, as usually snowflakes are wrapped in a string!

j

nlohmann::json instance to retrieve value from

keyname

key name to check for a value

found value

uint8_t DPP_EXPORT uint8_t DPP_EXPORT dpp::int8_not_null (const nlohmann::json *j, const char *keyname) int8_not_null dpp::int8_not_null const nlohmann::json * j const char * keyname

Returns an 8 bit unsigned integer from a json field value, if defined, else returns 0.

j

nlohmann::json instance to retrieve value from

keyname

key name to check for a value

found value

typename T
std::string std::string dpp::leading_zeroes (T i, size_t width) leading_zeroes dpp::leading_zeroes T i size_t width

Format a numeric type as a string with leading zeroes.

T

numeric type

i

numeric value

width

width of type including the leading zeroes

std::string resultant string with leading zeroes

typename T
std::basic_string< T > std::basic_string< T > dpp::lowercase (const std::basic_string< T > &s) lowercase dpp::lowercase const std::basic_string< T > & s

Convert a string to lowercase using tolower().

T

type of string

s

String to lowercase

std::basic_string<T> lowercased string

std::string std::string dpp::ltrim (std::string s) ltrim dpp::ltrim std::string s

trim from beginning of string (left)

s

string to trim

std::string trimmed string

DPP_EXPORT const dns_cache_entry * DPP_EXPORT const dns_cache_entry * dpp::resolve_hostname (const std::string &hostname, const std::string &port) resolve_hostname dpp::resolve_hostname const std::string & hostname const std::string & port

Resolve a hostname to an addrinfo.

hostname

Hostname to resolve

port

A port number or named service, e.g. "80"

dns_cache_entry* First IP address associated with the hostname DNS record

dpp::connection_exception

On failure to resolve hostname

class T
void void dpp::rest_request (dpp::cluster *c, const char *basepath, const std::string &major, const std::string &minor, http_method method, const std::string &postdata, command_completion_event_t callback) rest_request dpp::rest_request dpp::cluster * c const char * basepath const std::string & major const std::string & minor http_method method const std::string & postdata command_completion_event_t callback

Templated REST request helper to save on typing.

T

type to return in lambda callback

c

calling cluster

basepath

base path for API call

major

major API function

minor

minor API function

method

HTTP method

postdata

Post data or empty string

callback

Callback lambda

void void dpp::rest_request< confirmation > (dpp::cluster *c, const char *basepath, const std::string &major, const std::string &minor, http_method method, const std::string &postdata, command_completion_event_t callback) rest_request< confirmation > dpp::rest_request< confirmation > dpp::cluster * c const char * basepath const std::string & major const std::string & minor http_method method const std::string & postdata command_completion_event_t callback

Templated REST request helper to save on typing (specialised for confirmation).

T

type to return in lambda callback

c

calling cluster

basepath

base path for API call

major

major API function

minor

minor API function

method

HTTP method

postdata

Post data or empty string

callback

Callback lambda

void void dpp::rest_request< message > (dpp::cluster *c, const char *basepath, const std::string &major, const std::string &minor, http_method method, const std::string &postdata, command_completion_event_t callback) rest_request< message > dpp::rest_request< message > dpp::cluster * c const char * basepath const std::string & major const std::string & minor http_method method const std::string & postdata command_completion_event_t callback

Templated REST request helper to save on typing (specialised for message).

T

type to return in lambda callback

c

calling cluster

basepath

base path for API call

major

major API function

minor

minor API function

method

HTTP method

postdata

Post data or empty string

callback

Callback lambda

class T
void void dpp::rest_request_list (dpp::cluster *c, const char *basepath, const std::string &major, const std::string &minor, http_method method, const std::string &postdata, command_completion_event_t callback, const std::string &key, const std::string &root) rest_request_list dpp::rest_request_list dpp::cluster * c const char * basepath const std::string & major const std::string & minor http_method method const std::string & postdata command_completion_event_t callback const std::string & key const std::string & root

Templated REST request helper to save on typing (for returned lists).

T

singular type to return in lambda callback

T

map type to return in lambda callback

c

calling cluster

basepath

base path for API call

major

major API function

minor

minor API function

method

HTTP method

postdata

Post data or empty string

key

Key name of elements in the json list

root

Root element to look for

callback

Callback lambda

class T
void void dpp::rest_request_list (dpp::cluster *c, const char *basepath, const std::string &major, const std::string &minor, http_method method, const std::string &postdata, command_completion_event_t callback, const std::string &key="id") rest_request_list dpp::rest_request_list dpp::cluster * c const char * basepath const std::string & major const std::string & minor http_method method const std::string & postdata command_completion_event_t callback const std::string & key "id"

Templated REST request helper to save on typing (for returned lists).

T

singular type to return in lambda callback

T

map type to return in lambda callback

c

calling cluster

basepath

base path for API call

major

major API function

minor

minor API function

method

HTTP method

postdata

Post data or empty string

key

Key name of elements in the json list

callback

Callback lambda

void void dpp::rest_request_list< ban > (dpp::cluster *c, const char *basepath, const std::string &major, const std::string &minor, http_method method, const std::string &postdata, command_completion_event_t callback, const std::string &key) rest_request_list< ban > dpp::rest_request_list< ban > dpp::cluster * c const char * basepath const std::string & major const std::string & minor http_method method const std::string & postdata command_completion_event_t callback const std::string & key

Templated REST request helper to save on typing (for returned lists, specialised for bans).

T

singular type to return in lambda callback

T

map type to return in lambda callback

c

calling cluster

basepath

base path for API call

major

major API function

minor

minor API function

method

HTTP method

postdata

Post data or empty string

key

Key name of elements in the json list

callback

Callback lambda

void void dpp::rest_request_list< invite > (dpp::cluster *c, const char *basepath, const std::string &major, const std::string &minor, http_method method, const std::string &postdata, command_completion_event_t callback, const std::string &key) rest_request_list< invite > dpp::rest_request_list< invite > dpp::cluster * c const char * basepath const std::string & major const std::string & minor http_method method const std::string & postdata command_completion_event_t callback const std::string & key

Templated REST request helper to save on typing (for returned lists, specialised for invites).

T

singular type to return in lambda callback

T

map type to return in lambda callback

c

calling cluster

basepath

base path for API call

major

major API function

minor

minor API function

method

HTTP method

postdata

Post data or empty string

key

Key name of elements in the json list

callback

Callback lambda

void void dpp::rest_request_list< sticker_pack > (dpp::cluster *c, const char *basepath, const std::string &major, const std::string &minor, http_method method, const std::string &postdata, command_completion_event_t callback, const std::string &key) rest_request_list< sticker_pack > dpp::rest_request_list< sticker_pack > dpp::cluster * c const char * basepath const std::string & major const std::string & minor http_method method const std::string & postdata command_completion_event_t callback const std::string & key

Templated REST request helper to save on typing (for returned lists, specialised for sticker packs).

T

singular type to return in lambda callback

T

map type to return in lambda callback

c

calling cluster

basepath

base path for API call

major

major API function

minor

minor API function

method

HTTP method

postdata

Post data or empty string

key

Key name of elements in the json list

callback

Callback lambda

void void dpp::rest_request_list< voiceregion > (dpp::cluster *c, const char *basepath, const std::string &major, const std::string &minor, http_method method, const std::string &postdata, command_completion_event_t callback, const std::string &key) rest_request_list< voiceregion > dpp::rest_request_list< voiceregion > dpp::cluster * c const char * basepath const std::string & major const std::string & minor http_method method const std::string & postdata command_completion_event_t callback const std::string & key

Templated REST request helper to save on typing (for returned lists, specialised for voiceregions).

T

singular type to return in lambda callback

T

map type to return in lambda callback

c

calling cluster

basepath

base path for API call

major

major API function

minor

minor API function

method

HTTP method

postdata

Post data or empty string

key

Key name of elements in the json list

callback

Callback lambda

class T
void void dpp::rest_request_vector (dpp::cluster *c, const char *basepath, const std::string &major, const std::string &minor, http_method method, const std::string &postdata, command_completion_event_t callback) rest_request_vector dpp::rest_request_vector dpp::cluster * c const char * basepath const std::string & major const std::string & minor http_method method const std::string & postdata command_completion_event_t callback

Templated REST request helper to save on typing (for returned lists, specialised for objects which doesn't have ids).

T

singular type to return in lambda callback

T

vector type to return in lambda callback

c

calling cluster

basepath

base path for API call

major

major API function

minor

minor API function

method

HTTP method

postdata

Post data or empty string

callback

Callback lambda

std::string std::string dpp::rtrim (std::string s) rtrim dpp::rtrim std::string s

trim from end of string (right)

s

String to trim

std::string trimmed string

typename T
auto auto dpp::run_once () run_once dpp::run_once

Run some code within an if() statement only once.

Use this template like this:

    if(dpp::run_once<struct any_unique_name_you_like_here>()){
    //Yourcodehere
    }

T

any unique 'tag' identifier name

auto a true/false return to say if we should execute or not

void DPP_EXPORT void DPP_EXPORT dpp::set_bool_not_null (const nlohmann::json *j, const char *keyname, bool &v) set_bool_not_null dpp::set_bool_not_null const nlohmann::json * j const char * keyname bool & v

Sets a boolean from a json field value, if defined, else does nothing.

j

nlohmann::json instance to retrieve value from

keyname

key name to check for a value

v

Value to change

void DPP_EXPORT void DPP_EXPORT dpp::set_double_not_null (const nlohmann::json *j, const char *keyname, double &v) set_double_not_null dpp::set_double_not_null const nlohmann::json * j const char * keyname double & v

Sets a double from a json field value, if defined, else does nothing.

j

nlohmann::json instance to retrieve value from

keyname

key name to check for a value

v

Value to change

void DPP_EXPORT void DPP_EXPORT dpp::set_iconhash_not_null (const nlohmann::json *j, const char *keyname, utility::iconhash &v) set_iconhash_not_null dpp::set_iconhash_not_null const nlohmann::json * j const char * keyname utility::iconhash & v

This is a repeat of set_string_not_null, but takes in a iconhash.

j

nlohmann::json instance to retrieve value from

keyname

key name to check for a value

v

Value to change

void DPP_EXPORT void DPP_EXPORT dpp::set_int16_not_null (const nlohmann::json *j, const char *keyname, uint16_t &v) set_int16_not_null dpp::set_int16_not_null const nlohmann::json * j const char * keyname uint16_t & v

Sets an unsigned 16 bit integer from a json field value, if defined, else does nothing.

j

nlohmann::json instance to retrieve value from

keyname

key name to check for a value

v

Value to change

void DPP_EXPORT void DPP_EXPORT dpp::set_int32_not_null (const nlohmann::json *j, const char *keyname, uint32_t &v) set_int32_not_null dpp::set_int32_not_null const nlohmann::json * j const char * keyname uint32_t & v

Sets an unsigned 32 bit integer from a json field value, if defined, else does nothing.

j

nlohmann::json instance to retrieve value from

keyname

key name to check for a value

v

Value to change

void DPP_EXPORT void DPP_EXPORT dpp::set_int64_not_null (const nlohmann::json *j, const char *keyname, uint64_t &v) set_int64_not_null dpp::set_int64_not_null const nlohmann::json * j const char * keyname uint64_t & v

Sets an unsigned 64 bit integer from a json field value, if defined, else does nothing.

j

nlohmann::json instance to retrieve value from

keyname

key name to check for a value

v

Value to change

void DPP_EXPORT void DPP_EXPORT dpp::set_int8_not_null (const nlohmann::json *j, const char *keyname, uint8_t &v) set_int8_not_null dpp::set_int8_not_null const nlohmann::json * j const char * keyname uint8_t & v

Sets an unsigned 8 bit integer from a json field value, if defined, else does nothing.

j

nlohmann::json instance to retrieve value from

keyname

key name to check for a value

v

Value to change

DPP_EXPORT bool DPP_EXPORT bool dpp::set_nonblocking (dpp::socket sockfd, bool non_blocking) set_nonblocking dpp::set_nonblocking dpp::socket sockfd bool non_blocking

Set a socket to blocking or non-blocking IO.

sockfd

socket to act upon

non_blocking

should socket be non-blocking?

false on error, true on success

class T
void void dpp::set_object_array_not_null (nlohmann::json *j, std::string_view key, std::vector< T > &v) set_object_array_not_null dpp::set_object_array_not_null nlohmann::json * j std::string_view key std::vector< T > & v

Sets an array of objects from a json field value, if defined, else does nothing.

T

The class of which the array consists of. Must be derived from dpp::json_interface

j

nlohmann::json instance to retrieve value from

key

key name to check for the values

v

Value to change

void void dpp::set_signal_handler (int signal) set_signal_handler dpp::set_signal_handler int signal

Set up a signal handler to be ignored.

signal

Signal to set. If the signal is already set up with a handler, this will do nothing.

void DPP_EXPORT void DPP_EXPORT dpp::set_snowflake_array_not_null (const nlohmann::json *j, const char *keyname, std::vector< class snowflake > &v) set_snowflake_array_not_null dpp::set_snowflake_array_not_null const nlohmann::json * j const char * keyname std::vector< class snowflake > & v

Sets an array of snowflakes from a json field value, if defined, else does nothing.

j

nlohmann::json instance to retrieve value from

keyname

key name to check for the values

v

Value to change

void DPP_EXPORT void DPP_EXPORT dpp::set_snowflake_not_null (const nlohmann::json *j, const char *keyname, uint64_t &v) set_snowflake_not_null dpp::set_snowflake_not_null const nlohmann::json * j const char * keyname uint64_t & v

Sets a snowflake id from a json field value, if defined, else does nothing.

j

nlohmann::json instance to retrieve value from

keyname

key name to check for a value

v

Value to change

void DPP_EXPORT void DPP_EXPORT dpp::set_string_not_null (const nlohmann::json *j, const char *keyname, std::string &v) set_string_not_null dpp::set_string_not_null const nlohmann::json * j const char * keyname std::string & v

Sets a string from a json field value, if defined, else does nothing.

j

nlohmann::json instance to retrieve value from

keyname

key name to check for a value

v

Value to change

void DPP_EXPORT void DPP_EXPORT dpp::set_ts_not_null (const nlohmann::json *j, const char *keyname, time_t &v) set_ts_not_null dpp::set_ts_not_null const nlohmann::json * j const char * keyname time_t & v

Sets an timestamp from a json field value containing an ISO8601 string, if defined, else does nothing.

j

nlohmann::json instance to retrieve value from

keyname

key name to check for a value

v

Value to change

uint64_t DPP_EXPORT uint64_t DPP_EXPORT dpp::snowflake_not_null (const nlohmann::json *j, const char *keyname) snowflake_not_null dpp::snowflake_not_null const nlohmann::json * j const char * keyname

Returns a snowflake id from a json field value, if defined, else returns 0.

j

nlohmann::json instance to retrieve value from

keyname

key name to check for a value

found value

std::string DPP_EXPORT std::string DPP_EXPORT dpp::string_not_null (const nlohmann::json *j, const char *keyname) string_not_null dpp::string_not_null const nlohmann::json * j const char * keyname

Returns a string from a json field value, if defined, else returns an empty string.

j

nlohmann::json instance to retrieve value from

keyname

key name to check for a value

found value

typename T
std::string std::string dpp::to_hex (T i, bool leading_zeroes=true) to_hex dpp::to_hex T i bool leading_zeroes true

Convert a numeric value to hex.

T

numeric type

i

numeric value

leading_zeroes

set to false if you don't want the leading zeroes in the output

std::string value in hex, the length will be 2* the raw size of the type

void void dpp::to_json (nlohmann::json &j, const command_option &opt) to_json dpp::to_json nlohmann::json & j const command_option & opt

helper function to serialize a command_option to json

https://github.com/nlohmann/json#arbitrary-types-conversions

j

output json object

opt

command_option to be serialized

void void dpp::to_json (nlohmann::json &j, const command_option_choice &choice) to_json dpp::to_json nlohmann::json & j const command_option_choice & choice

helper function to serialize a command_option_choice to json

https://github.com/nlohmann/json#arbitrary-types-conversions

j

output json object

choice

command_option_choice to be serialized

void void dpp::to_json (nlohmann::json &j, const command_permission &cp) to_json dpp::to_json nlohmann::json & j const command_permission & cp

helper function to serialize a command_permission to json

https://github.com/nlohmann/json#arbitrary-types-conversions

j

output json object

cp

command_permission to be serialized

void void dpp::to_json (nlohmann::json &j, const guild_command_permissions &gcp) to_json dpp::to_json nlohmann::json & j const guild_command_permissions & gcp

helper function to serialize a guild_command_permissions to json

https://github.com/nlohmann/json#arbitrary-types-conversions

j

output json object

gcp

guild_command_permissions to be serialized

void void dpp::to_json (nlohmann::json &j, const permission_overwrite &po) to_json dpp::to_json nlohmann::json & j const permission_overwrite & po

Serialize a permission_overwrite object to json.

j

JSON object to serialize to

po

object to serialize

void void dpp::to_json (nlohmann::json &j, const slashcommand &cmd) to_json dpp::to_json nlohmann::json & j const slashcommand & cmd

helper function to serialize a slashcommand to json

https://github.com/nlohmann/json#arbitrary-types-conversions

j

output json object

cmd

slashcommand to be serialized

void void dpp::to_json (nlohmann::json &j, const thread_metadata &tmdata) to_json dpp::to_json nlohmann::json & j const thread_metadata & tmdata

Serialize a thread_metadata object to json.

j

JSON object to serialize to

tmdata

object to serialize

std::string std::string dpp::trim (std::string s) trim dpp::trim std::string s

Trim from both ends of string (right then left).

s

string to trim

std::string trimmed string

time_t DPP_EXPORT time_t DPP_EXPORT dpp::ts_not_null (const nlohmann::json *j, const char *keyname) ts_not_null dpp::ts_not_null const nlohmann::json * j const char * keyname

Returns a time_t from an ISO8601 timestamp field in a json value, if defined, else returns epoch value of 0.

j

nlohmann::json instance to retrieve value from

keyname

key name to check for a value

found value

std::string DPP_EXPORT std::string DPP_EXPORT dpp::ts_to_string (time_t ts) ts_to_string dpp::ts_to_string time_t ts

Convert time_t unix epoch to std::string ISO date/time.

ts

Timestamp to convert

std::string Converted time/date string

typename T
std::basic_string< T > std::basic_string< T > dpp::uppercase (const std::basic_string< T > &s) uppercase dpp::uppercase const std::basic_string< T > & s

Convert a string to uppercase using toupper().

T

type of string

s

String to uppercase

std::basic_string<T> uppercased string

build_type
bool bool dpp::validate_configuration () validate_configuration dpp::validate_configuration
typename... Args Args
dpp::when_any
(Args...) -> when_any< detail::when_any::awaitable_type< Args >... >
when_any
dpp::when_any
Args...

The main namespace for D++ functions. classes and types.

The main namespace for D++ functions, classes and types.