2#ifndef DISCORD_HEADER_DISCORDPP_H_
3#define DISCORD_HEADER_DISCORDPP_H_
12#include <unordered_map>
694class ActivityTimestamps;
696class ActivitySecrets;
700class AuthorizationCodeChallenge;
701class AuthorizationCodeVerifier;
702class AuthorizationArgs;
703class DeviceAuthorizationArgs;
704class VoiceStateHandle;
705class VADThresholdSettings;
712class RelationshipHandle;
713class UserApplicationProfileHandle;
715class LobbyMemberHandle;
717class AdditionalContent;
721class UserMessageSummary;
722class ClientCreateOptions;
1367 std::optional<std::string>
State()
const;
1413 std::optional<discordpp::ActivityAssets>
Assets()
const;
1426 std::optional<discordpp::ActivityParty>
Party()
const;
1432 std::optional<discordpp::ActivitySecrets>
Secrets()
const;
1701 std::optional<std::string>
State()
const;
1709 std::optional<std::string>
Nonce()
const;
1914 SignalingConnectionFailed = 1,
1917 SignalingUnexpectedClose = 2,
1920 VoiceConnectionFailed = 3,
1942 SignalingConnected = 3,
2493 std::optional<discordpp::UserHandle>
User()
const;
2747 std::unordered_map<std::string, std::string>
Metadata()
const;
2750 std::optional<discordpp::UserHandle>
User()
const;
2900 std::unordered_map<std::string, std::string>
Metadata()
const;
2952 std::optional<std::string>
Title()
const;
3068 std::optional<discordpp::UserHandle>
Author()
const;
3074 std::optional<discordpp::ChannelHandle>
Channel()
const;
3099 std::optional<discordpp::LobbyHandle>
Lobby()
const;
3106 std::unordered_map<std::string, std::string>
Metadata()
const;
3426 ConnectionFailed = 1,
3429 UnexpectedClose = 2,
3432 ConnectionCanceled = 3,
3500 std::function<
void(std::vector<discordpp::AudioDevice> devices)>;
3504 std::function<
void(std::vector<discordpp::AudioDevice> devices)>;
3512 std::function<
void(std::vector<discordpp::AudioDevice> inputDevices,
3513 std::vector<discordpp::AudioDevice> outputDevices)>;
3526 std::function<
void(uint64_t lobbyId, uint64_t memberId,
bool added)>;
3536 uint64_t samplesPerChannel,
3539 bool& outShouldMute)>;
3545 void(int16_t* data, uint64_t samplesPerChannel, int32_t sampleRate, uint64_t channels)>;
3559 std::string accessToken,
3562 std::string scopes)>;
3570 std::string accessToken,
3571 std::string refreshToken,
3574 std::string scopes)>;
3613 std::vector<discordpp::MessageHandle> messages)>;
3618 std::vector<discordpp::UserMessageSummary> summaries)>;
3623 std::vector<discordpp::MessageHandle> messages)>;
3668 std::vector<discordpp::GuildChannel> guildChannels)>;
3672 std::vector<discordpp::GuildMinimal> guilds)>;
3722 std::function<
void(uint64_t applicationId, std::string joinSecret)>;
3743 std::function<
void(uint64_t userId,
bool isDiscordRelationshipUpdate)>;
3750 std::function<
void(uint64_t userId,
bool isDiscordRelationshipUpdate)>;
3755 std::optional<discordpp::UserHandle> user)>;
3785 explicit Client(std::string apiBase, std::string webBase);
3806 [[deprecated(
"Please use GetCurrentUserV2 instead. This will be removed in a future version.")]]
4024 [[deprecated(
"Calling Client::SetSpeakerMode is DEPRECATED.")]]
4225 uint64_t childApplicationId,
4234 std::string
const& token,
4272 std::string
const& externalAuthToken,
4299 std::string
const& code,
4300 std::string
const& codeVerifier,
4301 std::string
const& redirectUri,
4371 std::string
const& externalAuthToken,
4405 std::string
const& code,
4406 std::string
const& codeVerifier,
4407 std::string
const& redirectUri,
4409 std::string
const& externalAuthToken,
4445 std::string
const& refreshToken,
4479 std::string
const& token,
4525 uint64_t applicationId,
4527 std::string
const& externalAuthToken,
4536 std::string
const& name,
4570 std::string
const& content,
4649 std::string
const& content,
4659 std::string
const& content,
4660 std::unordered_map<std::string, std::string>
const& metadata,
4676 std::string
const& content,
4686 std::string
const& content,
4687 std::unordered_map<std::string, std::string>
const& metadata,
4854 std::string
const& secret,
4855 std::unordered_map<std::string, std::string>
const& lobbyMetadata,
4856 std::unordered_map<std::string, std::string>
const& memberMetadata,
5048 std::string
const& content,
5317 uint64_t applicationId,
5325 std::optional<discordpp::UserHandle>
GetUser(uint64_t userId)
const;
5397 return "JoinRequest";
5427 return "CustomStatus";
5431 return "HangStatus";
5481 return "NetworkError";
5485 return "ClientNotReady";
5489 return "ClientDestroyed";
5491 return "ValidationError";
5495 return "AuthorizationFailed";
5511 return "SwitchingProtocols";
5513 return "Processing";
5515 return "EarlyHints";
5523 return "NonAuthoritativeInfo";
5527 return "ResetContent";
5529 return "PartialContent";
5531 return "MultiStatus";
5533 return "AlreadyReported";
5537 return "MultipleChoices";
5539 return "MovedPermanently";
5545 return "NotModified";
5547 return "TemporaryRedirect";
5549 return "PermanentRedirect";
5551 return "BadRequest";
5553 return "Unauthorized";
5555 return "PaymentRequired";
5561 return "MethodNotAllowed";
5563 return "NotAcceptable";
5565 return "ProxyAuthRequired";
5567 return "RequestTimeout";
5573 return "LengthRequired";
5575 return "PreconditionFailed";
5577 return "PayloadTooLarge";
5579 return "UriTooLong";
5581 return "UnsupportedMediaType";
5583 return "RangeNotSatisfiable";
5585 return "ExpectationFailed";
5587 return "MisdirectedRequest";
5589 return "UnprocessableEntity";
5593 return "FailedDependency";
5597 return "UpgradeRequired";
5599 return "PreconditionRequired";
5601 return "TooManyRequests";
5603 return "RequestHeaderFieldsTooLarge";
5605 return "InternalServerError";
5607 return "NotImplemented";
5609 return "BadGateway";
5611 return "ServiceUnavailable";
5613 return "GatewayTimeout";
5615 return "HttpVersionNotSupported";
5617 return "VariantAlsoNegotiates";
5619 return "InsufficientStorage";
5621 return "LoopDetected";
5623 return "NotExtended";
5625 return "NetworkAuthorizationRequired";
5645 return "GuildInstall";
5647 return "UserInstall";
5661 return "GuildVoice";
5665 return "GuildCategory";
5669 return "GuildStore";
5671 return "GuildNewsThread";
5673 return "GuildPublicThread";
5675 return "GuildPrivateThread";
5677 return "GuildStageVoice";
5679 return "GuildDirectory";
5681 return "GuildForum";
5683 return "GuildMedia";
5687 return "EphemeralDm";
5699 return "Attachment";
5703 return "VoiceMessage";
5719 return "VoiceActivity";
5721 return "PushToTalk";
5745 return "SignalingConnectionFailed";
5747 return "SignalingUnexpectedClose";
5749 return "VoiceConnectionFailed";
5751 return "JoinTimeout";
5763 return "MODE_UNINIT";
5777 return "Disconnected";
5781 return "Connecting";
5783 return "SignalingConnected";
5787 return "Reconnecting";
5789 return "Disconnecting";
5805 return "PendingIncoming";
5807 return "PendingOutgoing";
5811 return "Suggestion";
5823 return "EpicOnlineServices";
5829 return "DiscordBot";
5883 return "MessageDataVisibleOnDiscord";
5895 return "ConnectionFailed";
5897 return "UnexpectedClose";
5899 return "ConnectionCanceled";
5909 return "Disconnected";
5911 return "Connecting";
5917 return "Reconnecting";
5919 return "Disconnecting";
5959 return "EpicOnlineServicesAccessToken";
5961 return "EpicOnlineServicesIdToken";
5963 return "SteamSessionTicket";
5965 return "UnityServicesIdToken";
5967 return "DiscordBotIssuedAccessToken";
5969 return "AppleIdToken";
5971 return "PlayStationNetworkIdToken";
5999 return "OnlinePlayingGame";
6001 return "OnlineElsewhere";
6010#ifdef DISCORDPP_IMPLEMENTATION
6011#undef DISCORDPP_IMPLEMENTATION
6013#pragma clang diagnostic push
6014#pragma clang diagnostic ignored "-Wunused-parameter"
6017std::function<
void(std::function<
void()>)> s_synchronizationContext;
6019inline bool HasSynchronizationContext()
6021 return !!s_synchronizationContext;
6024inline void PostTask(std::function<
void()> task)
6026 assert(s_synchronizationContext);
6027 s_synchronizationContext(std::move(task));
6030void SetSynchronizationContext(std::function<
void(std::function<
void()>)> executor)
6032 s_synchronizationContext = std::move(executor);
6035template <
typename T>
6036struct TDelegateUserData {
6038 TDelegateUserData(T delegate)
6039 : delegate{delegate}
6043 static void Free(
void* ptr) {
delete reinterpret_cast<TDelegateUserData*
>(ptr); }
6045 static T& Get(
void* userData)
6047 return reinterpret_cast<TDelegateUserData*
>(userData)->delegate;
6051struct ConvertedProperties {
6052 ConvertedProperties(std::unordered_map<std::string, std::string>
const& PropertyMap)
6054 Properties.size = PropertyMap.size();
6060 for (
auto& pair : PropertyMap) {
6061 Properties.keys[i] = AllocateString(pair.first);
6062 Properties.values[i] = AllocateString(pair.second);
6074 result.
size = str.size();
6075 std::memcpy(result.
ptr, str.data(), result.
size);
6080std::unordered_map<std::string, std::string> ConvertReturnedProperties(
6083 std::unordered_map<std::string, std::string> result;
6084 for (
size_t i = 0; i < Properties.
size; ++i) {
6085 std::string key(
reinterpret_cast<char*
>(Properties.
keys[i].
ptr), Properties.
keys[i].
size);
6086 std::string value(
reinterpret_cast<char*
>(Properties.
values[i].
ptr),
6088 result.emplace(std::move(key), std::move(value));
6093ActivityInvite::~ActivityInvite()
6101 : instance_(other.instance_)
6102 , state_(other.state_)
6108 if (
this != &other) {
6112 instance_ = other.instance_;
6113 state_ = other.state_;
6123 Discord_ActivityInvite_Clone(&instance_, rhs.instance());
6125 state_ = DiscordObjectState::Owned;
6128ActivityInvite& ActivityInvite::operator=(
const ActivityInvite& rhs)
6131 if (state_ == DiscordObjectState::Owned) {
6133 state_ = DiscordObjectState::Invalid;
6135 if (rhs.state_ == DiscordObjectState::Owned) {
6138 state_ = DiscordObjectState::Owned;
6144 : instance_(instance)
6148ActivityInvite::ActivityInvite()
6150 assert(state_ == DiscordObjectState::Invalid);
6152 state_ = DiscordObjectState::Owned;
6154void ActivityInvite::Drop()
6156 if (state_ != DiscordObjectState::Owned) {
6160 state_ = DiscordObjectState::Invalid;
6162uint64_t ActivityInvite::SenderId()
const
6164 assert(state_ == DiscordObjectState::Owned);
6165 uint64_t returnValue__;
6167 return returnValue__;
6169void ActivityInvite::SetSenderId(uint64_t SenderId)
6171 assert(state_ == DiscordObjectState::Owned);
6174uint64_t ActivityInvite::ChannelId()
const
6176 assert(state_ == DiscordObjectState::Owned);
6177 uint64_t returnValue__;
6179 return returnValue__;
6181void ActivityInvite::SetChannelId(uint64_t ChannelId)
6183 assert(state_ == DiscordObjectState::Owned);
6186uint64_t ActivityInvite::MessageId()
const
6188 assert(state_ == DiscordObjectState::Owned);
6189 uint64_t returnValue__;
6191 return returnValue__;
6193void ActivityInvite::SetMessageId(uint64_t MessageId)
6195 assert(state_ == DiscordObjectState::Owned);
6200 assert(state_ == DiscordObjectState::Owned);
6207 assert(state_ == DiscordObjectState::Owned);
6210uint64_t ActivityInvite::ApplicationId()
const
6212 assert(state_ == DiscordObjectState::Owned);
6213 uint64_t returnValue__;
6215 return returnValue__;
6217void ActivityInvite::SetApplicationId(uint64_t ApplicationId)
6219 assert(state_ == DiscordObjectState::Owned);
6222uint64_t ActivityInvite::ParentApplicationId()
const
6224 assert(state_ == DiscordObjectState::Owned);
6225 uint64_t returnValue__;
6227 return returnValue__;
6229void ActivityInvite::SetParentApplicationId(uint64_t ParentApplicationId)
6231 assert(state_ == DiscordObjectState::Owned);
6234std::string ActivityInvite::PartyId()
const
6236 assert(state_ == DiscordObjectState::Owned);
6239 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
6240 returnValueNative__.
size);
6242 return returnValue__;
6244void ActivityInvite::SetPartyId(std::string PartyId)
6246 assert(state_ == DiscordObjectState::Owned);
6247 Discord_String PartyId__str{(uint8_t*)(PartyId.data()), PartyId.size()};
6250std::string ActivityInvite::SessionId()
const
6252 assert(state_ == DiscordObjectState::Owned);
6255 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
6256 returnValueNative__.
size);
6258 return returnValue__;
6260void ActivityInvite::SetSessionId(std::string SessionId)
6262 assert(state_ == DiscordObjectState::Owned);
6263 Discord_String SessionId__str{(uint8_t*)(SessionId.data()), SessionId.size()};
6266bool ActivityInvite::IsValid()
const
6268 assert(state_ == DiscordObjectState::Owned);
6271 return returnValue__;
6273void ActivityInvite::SetIsValid(
bool IsValid)
6275 assert(state_ == DiscordObjectState::Owned);
6278const ActivityAssets ActivityAssets::nullobj{{}, DiscordObjectState::Invalid};
6279ActivityAssets::~ActivityAssets()
6281 if (state_ == DiscordObjectState::Owned) {
6283 state_ = DiscordObjectState::Invalid;
6286ActivityAssets::ActivityAssets(ActivityAssets&& other) noexcept
6287 : instance_(other.instance_)
6288 , state_(other.state_)
6290 other.state_ = DiscordObjectState::Invalid;
6292ActivityAssets& ActivityAssets::operator=(ActivityAssets&& other)
noexcept
6294 if (
this != &other) {
6295 if (state_ == DiscordObjectState::Owned) {
6298 instance_ = other.instance_;
6299 state_ = other.state_;
6300 other.state_ = DiscordObjectState::Invalid;
6304ActivityAssets::ActivityAssets(
const ActivityAssets& arg0)
6309 Discord_ActivityAssets_Clone(&instance_, arg0.instance());
6311 state_ = DiscordObjectState::Owned;
6314ActivityAssets& ActivityAssets::operator=(
const ActivityAssets& arg0)
6316 if (
this != &arg0) {
6317 if (state_ == DiscordObjectState::Owned) {
6319 state_ = DiscordObjectState::Invalid;
6321 if (arg0.state_ == DiscordObjectState::Owned) {
6324 state_ = DiscordObjectState::Owned;
6330 : instance_(instance)
6334ActivityAssets::ActivityAssets()
6336 assert(state_ == DiscordObjectState::Invalid);
6338 state_ = DiscordObjectState::Owned;
6340void ActivityAssets::Drop()
6342 if (state_ != DiscordObjectState::Owned) {
6346 state_ = DiscordObjectState::Invalid;
6348std::optional<std::string> ActivityAssets::LargeImage()
const
6350 assert(state_ == DiscordObjectState::Owned);
6351 bool returnIsNonNull__;
6354 if (!returnIsNonNull__) {
6357 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
6358 returnValueNative__.
size);
6360 return returnValue__;
6362void ActivityAssets::SetLargeImage(std::optional<std::string> LargeImage)
6364 assert(state_ == DiscordObjectState::Owned);
6366 if (LargeImage.has_value()) {
6367 LargeImage__str.
ptr =
reinterpret_cast<uint8_t*
>(LargeImage->data());
6368 LargeImage__str.
size = LargeImage->size();
6371 (LargeImage.has_value() ? &LargeImage__str :
nullptr));
6373std::optional<std::string> ActivityAssets::LargeText()
const
6375 assert(state_ == DiscordObjectState::Owned);
6376 bool returnIsNonNull__;
6379 if (!returnIsNonNull__) {
6382 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
6383 returnValueNative__.
size);
6385 return returnValue__;
6387void ActivityAssets::SetLargeText(std::optional<std::string> LargeText)
6389 assert(state_ == DiscordObjectState::Owned);
6391 if (LargeText.has_value()) {
6392 LargeText__str.
ptr =
reinterpret_cast<uint8_t*
>(LargeText->data());
6393 LargeText__str.
size = LargeText->size();
6396 (LargeText.has_value() ? &LargeText__str :
nullptr));
6398std::optional<std::string> ActivityAssets::LargeUrl()
const
6400 assert(state_ == DiscordObjectState::Owned);
6401 bool returnIsNonNull__;
6404 if (!returnIsNonNull__) {
6407 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
6408 returnValueNative__.
size);
6410 return returnValue__;
6412void ActivityAssets::SetLargeUrl(std::optional<std::string> LargeUrl)
6414 assert(state_ == DiscordObjectState::Owned);
6416 if (LargeUrl.has_value()) {
6417 LargeUrl__str.
ptr =
reinterpret_cast<uint8_t*
>(LargeUrl->data());
6418 LargeUrl__str.
size = LargeUrl->size();
6421 (LargeUrl.has_value() ? &LargeUrl__str :
nullptr));
6423std::optional<std::string> ActivityAssets::SmallImage()
const
6425 assert(state_ == DiscordObjectState::Owned);
6426 bool returnIsNonNull__;
6429 if (!returnIsNonNull__) {
6432 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
6433 returnValueNative__.
size);
6435 return returnValue__;
6437void ActivityAssets::SetSmallImage(std::optional<std::string> SmallImage)
6439 assert(state_ == DiscordObjectState::Owned);
6441 if (SmallImage.has_value()) {
6442 SmallImage__str.
ptr =
reinterpret_cast<uint8_t*
>(SmallImage->data());
6443 SmallImage__str.
size = SmallImage->size();
6446 (SmallImage.has_value() ? &SmallImage__str :
nullptr));
6448std::optional<std::string> ActivityAssets::SmallText()
const
6450 assert(state_ == DiscordObjectState::Owned);
6451 bool returnIsNonNull__;
6454 if (!returnIsNonNull__) {
6457 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
6458 returnValueNative__.
size);
6460 return returnValue__;
6462void ActivityAssets::SetSmallText(std::optional<std::string> SmallText)
6464 assert(state_ == DiscordObjectState::Owned);
6466 if (SmallText.has_value()) {
6467 SmallText__str.
ptr =
reinterpret_cast<uint8_t*
>(SmallText->data());
6468 SmallText__str.
size = SmallText->size();
6471 (SmallText.has_value() ? &SmallText__str :
nullptr));
6473std::optional<std::string> ActivityAssets::SmallUrl()
const
6475 assert(state_ == DiscordObjectState::Owned);
6476 bool returnIsNonNull__;
6479 if (!returnIsNonNull__) {
6482 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
6483 returnValueNative__.
size);
6485 return returnValue__;
6487void ActivityAssets::SetSmallUrl(std::optional<std::string> SmallUrl)
6489 assert(state_ == DiscordObjectState::Owned);
6491 if (SmallUrl.has_value()) {
6492 SmallUrl__str.
ptr =
reinterpret_cast<uint8_t*
>(SmallUrl->data());
6493 SmallUrl__str.
size = SmallUrl->size();
6496 (SmallUrl.has_value() ? &SmallUrl__str :
nullptr));
6498std::optional<std::string> ActivityAssets::InviteCoverImage()
const
6500 assert(state_ == DiscordObjectState::Owned);
6501 bool returnIsNonNull__;
6504 if (!returnIsNonNull__) {
6507 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
6508 returnValueNative__.
size);
6510 return returnValue__;
6512void ActivityAssets::SetInviteCoverImage(std::optional<std::string> InviteCoverImage)
6514 assert(state_ == DiscordObjectState::Owned);
6516 if (InviteCoverImage.has_value()) {
6517 InviteCoverImage__str.
ptr =
reinterpret_cast<uint8_t*
>(InviteCoverImage->data());
6518 InviteCoverImage__str.
size = InviteCoverImage->size();
6521 &instance_, (InviteCoverImage.has_value() ? &InviteCoverImage__str :
nullptr));
6523const ActivityTimestamps ActivityTimestamps::nullobj{{}, DiscordObjectState::Invalid};
6524ActivityTimestamps::~ActivityTimestamps()
6526 if (state_ == DiscordObjectState::Owned) {
6528 state_ = DiscordObjectState::Invalid;
6531ActivityTimestamps::ActivityTimestamps(ActivityTimestamps&& other) noexcept
6532 : instance_(other.instance_)
6533 , state_(other.state_)
6535 other.state_ = DiscordObjectState::Invalid;
6537ActivityTimestamps& ActivityTimestamps::operator=(ActivityTimestamps&& other)
noexcept
6539 if (
this != &other) {
6540 if (state_ == DiscordObjectState::Owned) {
6543 instance_ = other.instance_;
6544 state_ = other.state_;
6545 other.state_ = DiscordObjectState::Invalid;
6549ActivityTimestamps::ActivityTimestamps(
const ActivityTimestamps& arg0)
6554 Discord_ActivityTimestamps_Clone(&instance_, arg0.instance());
6556 state_ = DiscordObjectState::Owned;
6559ActivityTimestamps& ActivityTimestamps::operator=(
const ActivityTimestamps& arg0)
6561 if (
this != &arg0) {
6562 if (state_ == DiscordObjectState::Owned) {
6564 state_ = DiscordObjectState::Invalid;
6566 if (arg0.state_ == DiscordObjectState::Owned) {
6569 state_ = DiscordObjectState::Owned;
6575 DiscordObjectState state)
6576 : instance_(instance)
6580ActivityTimestamps::ActivityTimestamps()
6582 assert(state_ == DiscordObjectState::Invalid);
6584 state_ = DiscordObjectState::Owned;
6586void ActivityTimestamps::Drop()
6588 if (state_ != DiscordObjectState::Owned) {
6592 state_ = DiscordObjectState::Invalid;
6594uint64_t ActivityTimestamps::Start()
const
6596 assert(state_ == DiscordObjectState::Owned);
6597 uint64_t returnValue__;
6599 return returnValue__;
6601void ActivityTimestamps::SetStart(uint64_t Start)
6603 assert(state_ == DiscordObjectState::Owned);
6606uint64_t ActivityTimestamps::End()
const
6608 assert(state_ == DiscordObjectState::Owned);
6609 uint64_t returnValue__;
6611 return returnValue__;
6613void ActivityTimestamps::SetEnd(uint64_t End)
6615 assert(state_ == DiscordObjectState::Owned);
6618const ActivityParty ActivityParty::nullobj{{}, DiscordObjectState::Invalid};
6619ActivityParty::~ActivityParty()
6621 if (state_ == DiscordObjectState::Owned) {
6623 state_ = DiscordObjectState::Invalid;
6626ActivityParty::ActivityParty(ActivityParty&& other) noexcept
6627 : instance_(other.instance_)
6628 , state_(other.state_)
6630 other.state_ = DiscordObjectState::Invalid;
6632ActivityParty& ActivityParty::operator=(ActivityParty&& other)
noexcept
6634 if (
this != &other) {
6635 if (state_ == DiscordObjectState::Owned) {
6638 instance_ = other.instance_;
6639 state_ = other.state_;
6640 other.state_ = DiscordObjectState::Invalid;
6644ActivityParty::ActivityParty(
const ActivityParty& arg0)
6649 Discord_ActivityParty_Clone(&instance_, arg0.instance());
6651 state_ = DiscordObjectState::Owned;
6654ActivityParty& ActivityParty::operator=(
const ActivityParty& arg0)
6656 if (
this != &arg0) {
6657 if (state_ == DiscordObjectState::Owned) {
6659 state_ = DiscordObjectState::Invalid;
6661 if (arg0.state_ == DiscordObjectState::Owned) {
6664 state_ = DiscordObjectState::Owned;
6670 : instance_(instance)
6674ActivityParty::ActivityParty()
6676 assert(state_ == DiscordObjectState::Invalid);
6678 state_ = DiscordObjectState::Owned;
6680void ActivityParty::Drop()
6682 if (state_ != DiscordObjectState::Owned) {
6686 state_ = DiscordObjectState::Invalid;
6688std::string ActivityParty::Id()
const
6690 assert(state_ == DiscordObjectState::Owned);
6693 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
6694 returnValueNative__.
size);
6696 return returnValue__;
6698void ActivityParty::SetId(std::string Id)
6700 assert(state_ == DiscordObjectState::Owned);
6704int32_t ActivityParty::CurrentSize()
const
6706 assert(state_ == DiscordObjectState::Owned);
6707 int32_t returnValue__;
6709 return returnValue__;
6711void ActivityParty::SetCurrentSize(int32_t CurrentSize)
6713 assert(state_ == DiscordObjectState::Owned);
6716int32_t ActivityParty::MaxSize()
const
6718 assert(state_ == DiscordObjectState::Owned);
6719 int32_t returnValue__;
6721 return returnValue__;
6723void ActivityParty::SetMaxSize(int32_t MaxSize)
6725 assert(state_ == DiscordObjectState::Owned);
6730 assert(state_ == DiscordObjectState::Owned);
6737 assert(state_ == DiscordObjectState::Owned);
6741const ActivitySecrets ActivitySecrets::nullobj{{}, DiscordObjectState::Invalid};
6742ActivitySecrets::~ActivitySecrets()
6744 if (state_ == DiscordObjectState::Owned) {
6746 state_ = DiscordObjectState::Invalid;
6749ActivitySecrets::ActivitySecrets(ActivitySecrets&& other) noexcept
6750 : instance_(other.instance_)
6751 , state_(other.state_)
6753 other.state_ = DiscordObjectState::Invalid;
6755ActivitySecrets& ActivitySecrets::operator=(ActivitySecrets&& other)
noexcept
6757 if (
this != &other) {
6758 if (state_ == DiscordObjectState::Owned) {
6761 instance_ = other.instance_;
6762 state_ = other.state_;
6763 other.state_ = DiscordObjectState::Invalid;
6767ActivitySecrets::ActivitySecrets(
const ActivitySecrets& arg0)
6772 Discord_ActivitySecrets_Clone(&instance_, arg0.instance());
6774 state_ = DiscordObjectState::Owned;
6777ActivitySecrets& ActivitySecrets::operator=(
const ActivitySecrets& arg0)
6779 if (
this != &arg0) {
6780 if (state_ == DiscordObjectState::Owned) {
6782 state_ = DiscordObjectState::Invalid;
6784 if (arg0.state_ == DiscordObjectState::Owned) {
6787 state_ = DiscordObjectState::Owned;
6793 : instance_(instance)
6797ActivitySecrets::ActivitySecrets()
6799 assert(state_ == DiscordObjectState::Invalid);
6801 state_ = DiscordObjectState::Owned;
6803void ActivitySecrets::Drop()
6805 if (state_ != DiscordObjectState::Owned) {
6809 state_ = DiscordObjectState::Invalid;
6811std::string ActivitySecrets::Join()
const
6813 assert(state_ == DiscordObjectState::Owned);
6816 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
6817 returnValueNative__.
size);
6819 return returnValue__;
6821void ActivitySecrets::SetJoin(std::string Join)
6823 assert(state_ == DiscordObjectState::Owned);
6827const ActivityButton ActivityButton::nullobj{{}, DiscordObjectState::Invalid};
6828ActivityButton::~ActivityButton()
6830 if (state_ == DiscordObjectState::Owned) {
6832 state_ = DiscordObjectState::Invalid;
6835ActivityButton::ActivityButton(ActivityButton&& other) noexcept
6836 : instance_(other.instance_)
6837 , state_(other.state_)
6839 other.state_ = DiscordObjectState::Invalid;
6841ActivityButton& ActivityButton::operator=(ActivityButton&& other)
noexcept
6843 if (
this != &other) {
6844 if (state_ == DiscordObjectState::Owned) {
6847 instance_ = other.instance_;
6848 state_ = other.state_;
6849 other.state_ = DiscordObjectState::Invalid;
6853ActivityButton::ActivityButton(
const ActivityButton& arg0)
6858 Discord_ActivityButton_Clone(&instance_, arg0.instance());
6860 state_ = DiscordObjectState::Owned;
6863ActivityButton& ActivityButton::operator=(
const ActivityButton& arg0)
6865 if (
this != &arg0) {
6866 if (state_ == DiscordObjectState::Owned) {
6868 state_ = DiscordObjectState::Invalid;
6870 if (arg0.state_ == DiscordObjectState::Owned) {
6873 state_ = DiscordObjectState::Owned;
6879 : instance_(instance)
6883ActivityButton::ActivityButton()
6885 assert(state_ == DiscordObjectState::Invalid);
6887 state_ = DiscordObjectState::Owned;
6889void ActivityButton::Drop()
6891 if (state_ != DiscordObjectState::Owned) {
6895 state_ = DiscordObjectState::Invalid;
6897std::string ActivityButton::Label()
const
6899 assert(state_ == DiscordObjectState::Owned);
6902 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
6903 returnValueNative__.
size);
6905 return returnValue__;
6907void ActivityButton::SetLabel(std::string Label)
6909 assert(state_ == DiscordObjectState::Owned);
6910 Discord_String Label__str{(uint8_t*)(Label.data()), Label.size()};
6913std::string ActivityButton::Url()
const
6915 assert(state_ == DiscordObjectState::Owned);
6918 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
6919 returnValueNative__.
size);
6921 return returnValue__;
6923void ActivityButton::SetUrl(std::string Url)
6925 assert(state_ == DiscordObjectState::Owned);
6929const Activity Activity::nullobj{{}, DiscordObjectState::Invalid};
6930Activity::~Activity()
6932 if (state_ == DiscordObjectState::Owned) {
6934 state_ = DiscordObjectState::Invalid;
6937Activity::Activity(Activity&& other) noexcept
6938 : instance_(other.instance_)
6939 , state_(other.state_)
6941 other.state_ = DiscordObjectState::Invalid;
6943Activity& Activity::operator=(Activity&& other)
noexcept
6945 if (
this != &other) {
6946 if (state_ == DiscordObjectState::Owned) {
6949 instance_ = other.instance_;
6950 state_ = other.state_;
6951 other.state_ = DiscordObjectState::Invalid;
6955Activity::Activity(
const Activity& arg0)
6960 Discord_Activity_Clone(&instance_, arg0.instance());
6962 state_ = DiscordObjectState::Owned;
6965Activity& Activity::operator=(
const Activity& arg0)
6967 if (
this != &arg0) {
6968 if (state_ == DiscordObjectState::Owned) {
6970 state_ = DiscordObjectState::Invalid;
6972 if (arg0.state_ == DiscordObjectState::Owned) {
6975 state_ = DiscordObjectState::Owned;
6981 : instance_(instance)
6987 assert(state_ == DiscordObjectState::Invalid);
6989 state_ = DiscordObjectState::Owned;
6991void Activity::Drop()
6993 if (state_ != DiscordObjectState::Owned) {
6997 state_ = DiscordObjectState::Invalid;
7001 assert(state_ == DiscordObjectState::Owned);
7006 assert(state_ == DiscordObjectState::Owned);
7009 return returnValue__;
7011std::vector<discordpp::ActivityButton> Activity::GetButtons()
const
7013 assert(state_ == DiscordObjectState::Owned);
7016 std::vector<discordpp::ActivityButton> returnValue__;
7017 returnValue__.reserve(returnValueNative__.
size);
7018 for (
size_t i__ = 0; i__ < returnValueNative__.
size; ++i__) {
7019 returnValue__.emplace_back(returnValueNative__.
ptr[i__], DiscordObjectState::Owned);
7022 return returnValue__;
7024std::string Activity::Name()
const
7026 assert(state_ == DiscordObjectState::Owned);
7029 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
7030 returnValueNative__.
size);
7032 return returnValue__;
7034void Activity::SetName(std::string Name)
7036 assert(state_ == DiscordObjectState::Owned);
7042 assert(state_ == DiscordObjectState::Owned);
7049 assert(state_ == DiscordObjectState::Owned);
7052std::optional<discordpp::StatusDisplayTypes> Activity::StatusDisplayType()
const
7054 assert(state_ == DiscordObjectState::Owned);
7055 bool returnIsNonNull__;
7058 if (!returnIsNonNull__) {
7062 return returnValue__;
7064void Activity::SetStatusDisplayType(std::optional<discordpp::StatusDisplayTypes> StatusDisplayType)
7066 assert(state_ == DiscordObjectState::Owned);
7069 (StatusDisplayType.has_value()
7073std::optional<std::string> Activity::State()
const
7075 assert(state_ == DiscordObjectState::Owned);
7076 bool returnIsNonNull__;
7079 if (!returnIsNonNull__) {
7082 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
7083 returnValueNative__.
size);
7085 return returnValue__;
7087void Activity::SetState(std::optional<std::string> State)
7089 assert(state_ == DiscordObjectState::Owned);
7091 if (
State.has_value()) {
7092 State__str.
ptr =
reinterpret_cast<uint8_t*
>(
State->data());
7097std::optional<std::string> Activity::StateUrl()
const
7099 assert(state_ == DiscordObjectState::Owned);
7100 bool returnIsNonNull__;
7103 if (!returnIsNonNull__) {
7106 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
7107 returnValueNative__.
size);
7109 return returnValue__;
7111void Activity::SetStateUrl(std::optional<std::string> StateUrl)
7113 assert(state_ == DiscordObjectState::Owned);
7115 if (StateUrl.has_value()) {
7116 StateUrl__str.
ptr =
reinterpret_cast<uint8_t*
>(StateUrl->data());
7117 StateUrl__str.
size = StateUrl->size();
7121std::optional<std::string> Activity::Details()
const
7123 assert(state_ == DiscordObjectState::Owned);
7124 bool returnIsNonNull__;
7127 if (!returnIsNonNull__) {
7130 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
7131 returnValueNative__.
size);
7133 return returnValue__;
7135void Activity::SetDetails(std::optional<std::string> Details)
7137 assert(state_ == DiscordObjectState::Owned);
7140 Details__str.
ptr =
reinterpret_cast<uint8_t*
>(
Details->data());
7145std::optional<std::string> Activity::DetailsUrl()
const
7147 assert(state_ == DiscordObjectState::Owned);
7148 bool returnIsNonNull__;
7151 if (!returnIsNonNull__) {
7154 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
7155 returnValueNative__.
size);
7157 return returnValue__;
7159void Activity::SetDetailsUrl(std::optional<std::string> DetailsUrl)
7161 assert(state_ == DiscordObjectState::Owned);
7163 if (DetailsUrl.has_value()) {
7164 DetailsUrl__str.
ptr =
reinterpret_cast<uint8_t*
>(DetailsUrl->data());
7165 DetailsUrl__str.
size = DetailsUrl->size();
7168 (DetailsUrl.has_value() ? &DetailsUrl__str :
nullptr));
7170std::optional<uint64_t> Activity::ApplicationId()
const
7172 assert(state_ == DiscordObjectState::Owned);
7173 bool returnIsNonNull__;
7174 uint64_t returnValue__;
7176 if (!returnIsNonNull__) {
7177 return std::nullopt;
7179 return returnValue__;
7181void Activity::SetApplicationId(std::optional<uint64_t> ApplicationId)
7183 assert(state_ == DiscordObjectState::Owned);
7187std::optional<uint64_t> Activity::ParentApplicationId()
const
7189 assert(state_ == DiscordObjectState::Owned);
7190 bool returnIsNonNull__;
7191 uint64_t returnValue__;
7193 if (!returnIsNonNull__) {
7194 return std::nullopt;
7196 return returnValue__;
7198void Activity::SetParentApplicationId(std::optional<uint64_t> ParentApplicationId)
7200 assert(state_ == DiscordObjectState::Owned);
7202 &instance_, (ParentApplicationId.has_value() ? &*ParentApplicationId :
nullptr));
7204std::optional<discordpp::ActivityAssets> Activity::Assets()
const
7206 assert(state_ == DiscordObjectState::Owned);
7207 bool returnIsNonNull__;
7210 if (!returnIsNonNull__) {
7214 return returnValue__;
7216void Activity::SetAssets(std::optional<discordpp::ActivityAssets> Assets)
7218 assert(state_ == DiscordObjectState::Owned);
7221std::optional<discordpp::ActivityTimestamps> Activity::Timestamps()
const
7223 assert(state_ == DiscordObjectState::Owned);
7224 bool returnIsNonNull__;
7227 if (!returnIsNonNull__) {
7231 return returnValue__;
7233void Activity::SetTimestamps(std::optional<discordpp::ActivityTimestamps> Timestamps)
7235 assert(state_ == DiscordObjectState::Owned);
7237 (Timestamps.has_value() ? Timestamps->instance() :
nullptr));
7239std::optional<discordpp::ActivityParty> Activity::Party()
const
7241 assert(state_ == DiscordObjectState::Owned);
7242 bool returnIsNonNull__;
7245 if (!returnIsNonNull__) {
7249 return returnValue__;
7251void Activity::SetParty(std::optional<discordpp::ActivityParty> Party)
7253 assert(state_ == DiscordObjectState::Owned);
7256std::optional<discordpp::ActivitySecrets> Activity::Secrets()
const
7258 assert(state_ == DiscordObjectState::Owned);
7259 bool returnIsNonNull__;
7262 if (!returnIsNonNull__) {
7266 return returnValue__;
7268void Activity::SetSecrets(std::optional<discordpp::ActivitySecrets> Secrets)
7270 assert(state_ == DiscordObjectState::Owned);
7275 assert(state_ == DiscordObjectState::Owned);
7282 assert(state_ == DiscordObjectState::Owned);
7286const ClientResult ClientResult::nullobj{{}, DiscordObjectState::Invalid};
7287ClientResult::~ClientResult()
7289 if (state_ == DiscordObjectState::Owned) {
7291 state_ = DiscordObjectState::Invalid;
7294ClientResult::ClientResult(ClientResult&& other) noexcept
7295 : instance_(other.instance_)
7296 , state_(other.state_)
7298 other.state_ = DiscordObjectState::Invalid;
7300ClientResult& ClientResult::operator=(ClientResult&& other)
noexcept
7302 if (
this != &other) {
7303 if (state_ == DiscordObjectState::Owned) {
7306 instance_ = other.instance_;
7307 state_ = other.state_;
7308 other.state_ = DiscordObjectState::Invalid;
7312ClientResult::ClientResult(
const ClientResult& arg0)
7317 Discord_ClientResult_Clone(&instance_, arg0.instance());
7319 state_ = DiscordObjectState::Owned;
7322ClientResult& ClientResult::operator=(
const ClientResult& arg0)
7324 if (
this != &arg0) {
7325 if (state_ == DiscordObjectState::Owned) {
7327 state_ = DiscordObjectState::Invalid;
7329 if (arg0.state_ == DiscordObjectState::Owned) {
7332 state_ = DiscordObjectState::Owned;
7338 : instance_(instance)
7342void ClientResult::Drop()
7344 if (state_ != DiscordObjectState::Owned) {
7348 state_ = DiscordObjectState::Invalid;
7350std::string ClientResult::ToString()
const
7352 assert(state_ == DiscordObjectState::Owned);
7355 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
7356 returnValueNative__.
size);
7358 return returnValue__;
7362 assert(state_ == DiscordObjectState::Owned);
7369 assert(state_ == DiscordObjectState::Owned);
7372std::string ClientResult::Error()
const
7374 assert(state_ == DiscordObjectState::Owned);
7377 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
7378 returnValueNative__.
size);
7380 return returnValue__;
7382void ClientResult::SetError(std::string Error)
7384 assert(state_ == DiscordObjectState::Owned);
7388int32_t ClientResult::ErrorCode()
const
7390 assert(state_ == DiscordObjectState::Owned);
7391 int32_t returnValue__;
7393 return returnValue__;
7395void ClientResult::SetErrorCode(int32_t ErrorCode)
7397 assert(state_ == DiscordObjectState::Owned);
7402 assert(state_ == DiscordObjectState::Owned);
7409 assert(state_ == DiscordObjectState::Owned);
7412std::string ClientResult::ResponseBody()
const
7414 assert(state_ == DiscordObjectState::Owned);
7417 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
7418 returnValueNative__.
size);
7420 return returnValue__;
7422void ClientResult::SetResponseBody(std::string ResponseBody)
7424 assert(state_ == DiscordObjectState::Owned);
7425 Discord_String ResponseBody__str{(uint8_t*)(ResponseBody.data()), ResponseBody.size()};
7428bool ClientResult::Successful()
const
7430 assert(state_ == DiscordObjectState::Owned);
7433 return returnValue__;
7435void ClientResult::SetSuccessful(
bool Successful)
7437 assert(state_ == DiscordObjectState::Owned);
7440bool ClientResult::Retryable()
const
7442 assert(state_ == DiscordObjectState::Owned);
7445 return returnValue__;
7447void ClientResult::SetRetryable(
bool Retryable)
7449 assert(state_ == DiscordObjectState::Owned);
7452float ClientResult::RetryAfter()
const
7454 assert(state_ == DiscordObjectState::Owned);
7455 float returnValue__;
7457 return returnValue__;
7459void ClientResult::SetRetryAfter(
float RetryAfter)
7461 assert(state_ == DiscordObjectState::Owned);
7464const AuthorizationCodeChallenge AuthorizationCodeChallenge::nullobj{{},
7465 DiscordObjectState::Invalid};
7466AuthorizationCodeChallenge::~AuthorizationCodeChallenge()
7468 if (state_ == DiscordObjectState::Owned) {
7470 state_ = DiscordObjectState::Invalid;
7473AuthorizationCodeChallenge::AuthorizationCodeChallenge(AuthorizationCodeChallenge&& other) noexcept
7474 : instance_(other.instance_)
7475 , state_(other.state_)
7477 other.state_ = DiscordObjectState::Invalid;
7479AuthorizationCodeChallenge& AuthorizationCodeChallenge::operator=(
7480 AuthorizationCodeChallenge&& other)
noexcept
7482 if (
this != &other) {
7483 if (state_ == DiscordObjectState::Owned) {
7486 instance_ = other.instance_;
7487 state_ = other.state_;
7488 other.state_ = DiscordObjectState::Invalid;
7492AuthorizationCodeChallenge::AuthorizationCodeChallenge(
const AuthorizationCodeChallenge& arg0)
7497 Discord_AuthorizationCodeChallenge_Clone(&instance_, arg0.instance());
7499 state_ = DiscordObjectState::Owned;
7502AuthorizationCodeChallenge& AuthorizationCodeChallenge::operator=(
7503 const AuthorizationCodeChallenge& arg0)
7505 if (
this != &arg0) {
7506 if (state_ == DiscordObjectState::Owned) {
7508 state_ = DiscordObjectState::Invalid;
7510 if (arg0.state_ == DiscordObjectState::Owned) {
7513 state_ = DiscordObjectState::Owned;
7519 DiscordObjectState state)
7520 : instance_(instance)
7524AuthorizationCodeChallenge::AuthorizationCodeChallenge()
7526 assert(state_ == DiscordObjectState::Invalid);
7528 state_ = DiscordObjectState::Owned;
7530void AuthorizationCodeChallenge::Drop()
7532 if (state_ != DiscordObjectState::Owned) {
7536 state_ = DiscordObjectState::Invalid;
7540 assert(state_ == DiscordObjectState::Owned);
7547 assert(state_ == DiscordObjectState::Owned);
7551std::string AuthorizationCodeChallenge::Challenge()
const
7553 assert(state_ == DiscordObjectState::Owned);
7556 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
7557 returnValueNative__.
size);
7559 return returnValue__;
7561void AuthorizationCodeChallenge::SetChallenge(std::string Challenge)
7563 assert(state_ == DiscordObjectState::Owned);
7564 Discord_String Challenge__str{(uint8_t*)(Challenge.data()), Challenge.size()};
7567const AuthorizationCodeVerifier AuthorizationCodeVerifier::nullobj{{}, DiscordObjectState::Invalid};
7568AuthorizationCodeVerifier::~AuthorizationCodeVerifier()
7570 if (state_ == DiscordObjectState::Owned) {
7572 state_ = DiscordObjectState::Invalid;
7575AuthorizationCodeVerifier::AuthorizationCodeVerifier(AuthorizationCodeVerifier&& other) noexcept
7576 : instance_(other.instance_)
7577 , state_(other.state_)
7579 other.state_ = DiscordObjectState::Invalid;
7581AuthorizationCodeVerifier& AuthorizationCodeVerifier::operator=(
7582 AuthorizationCodeVerifier&& other)
noexcept
7584 if (
this != &other) {
7585 if (state_ == DiscordObjectState::Owned) {
7588 instance_ = other.instance_;
7589 state_ = other.state_;
7590 other.state_ = DiscordObjectState::Invalid;
7594AuthorizationCodeVerifier::AuthorizationCodeVerifier(
const AuthorizationCodeVerifier& arg0)
7599 Discord_AuthorizationCodeVerifier_Clone(&instance_, arg0.instance());
7601 state_ = DiscordObjectState::Owned;
7604AuthorizationCodeVerifier& AuthorizationCodeVerifier::operator=(
7605 const AuthorizationCodeVerifier& arg0)
7607 if (
this != &arg0) {
7608 if (state_ == DiscordObjectState::Owned) {
7610 state_ = DiscordObjectState::Invalid;
7612 if (arg0.state_ == DiscordObjectState::Owned) {
7615 state_ = DiscordObjectState::Owned;
7621 DiscordObjectState state)
7622 : instance_(instance)
7626void AuthorizationCodeVerifier::Drop()
7628 if (state_ != DiscordObjectState::Owned) {
7632 state_ = DiscordObjectState::Invalid;
7636 assert(state_ == DiscordObjectState::Owned);
7640 DiscordObjectState::Owned);
7641 return returnValue__;
7645 assert(state_ == DiscordObjectState::Owned);
7648std::string AuthorizationCodeVerifier::Verifier()
const
7650 assert(state_ == DiscordObjectState::Owned);
7653 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
7654 returnValueNative__.
size);
7656 return returnValue__;
7658void AuthorizationCodeVerifier::SetVerifier(std::string Verifier)
7660 assert(state_ == DiscordObjectState::Owned);
7661 Discord_String Verifier__str{(uint8_t*)(Verifier.data()), Verifier.size()};
7664const AuthorizationArgs AuthorizationArgs::nullobj{{}, DiscordObjectState::Invalid};
7665AuthorizationArgs::~AuthorizationArgs()
7667 if (state_ == DiscordObjectState::Owned) {
7669 state_ = DiscordObjectState::Invalid;
7672AuthorizationArgs::AuthorizationArgs(AuthorizationArgs&& other) noexcept
7673 : instance_(other.instance_)
7674 , state_(other.state_)
7676 other.state_ = DiscordObjectState::Invalid;
7678AuthorizationArgs& AuthorizationArgs::operator=(AuthorizationArgs&& other)
noexcept
7680 if (
this != &other) {
7681 if (state_ == DiscordObjectState::Owned) {
7684 instance_ = other.instance_;
7685 state_ = other.state_;
7686 other.state_ = DiscordObjectState::Invalid;
7690AuthorizationArgs::AuthorizationArgs(
const AuthorizationArgs& arg0)
7695 Discord_AuthorizationArgs_Clone(&instance_, arg0.instance());
7697 state_ = DiscordObjectState::Owned;
7700AuthorizationArgs& AuthorizationArgs::operator=(
const AuthorizationArgs& arg0)
7702 if (
this != &arg0) {
7703 if (state_ == DiscordObjectState::Owned) {
7705 state_ = DiscordObjectState::Invalid;
7707 if (arg0.state_ == DiscordObjectState::Owned) {
7710 state_ = DiscordObjectState::Owned;
7716 : instance_(instance)
7720AuthorizationArgs::AuthorizationArgs()
7722 assert(state_ == DiscordObjectState::Invalid);
7724 state_ = DiscordObjectState::Owned;
7726void AuthorizationArgs::Drop()
7728 if (state_ != DiscordObjectState::Owned) {
7732 state_ = DiscordObjectState::Invalid;
7734uint64_t AuthorizationArgs::ClientId()
const
7736 assert(state_ == DiscordObjectState::Owned);
7737 uint64_t returnValue__;
7739 return returnValue__;
7741void AuthorizationArgs::SetClientId(uint64_t ClientId)
7743 assert(state_ == DiscordObjectState::Owned);
7746std::string AuthorizationArgs::Scopes()
const
7748 assert(state_ == DiscordObjectState::Owned);
7751 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
7752 returnValueNative__.
size);
7754 return returnValue__;
7756void AuthorizationArgs::SetScopes(std::string Scopes)
7758 assert(state_ == DiscordObjectState::Owned);
7759 Discord_String Scopes__str{(uint8_t*)(Scopes.data()), Scopes.size()};
7762std::optional<std::string> AuthorizationArgs::State()
const
7764 assert(state_ == DiscordObjectState::Owned);
7765 bool returnIsNonNull__;
7768 if (!returnIsNonNull__) {
7771 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
7772 returnValueNative__.
size);
7774 return returnValue__;
7776void AuthorizationArgs::SetState(std::optional<std::string> State)
7778 assert(state_ == DiscordObjectState::Owned);
7780 if (
State.has_value()) {
7781 State__str.
ptr =
reinterpret_cast<uint8_t*
>(
State->data());
7786std::optional<std::string> AuthorizationArgs::Nonce()
const
7788 assert(state_ == DiscordObjectState::Owned);
7789 bool returnIsNonNull__;
7792 if (!returnIsNonNull__) {
7795 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
7796 returnValueNative__.
size);
7798 return returnValue__;
7800void AuthorizationArgs::SetNonce(std::optional<std::string> Nonce)
7802 assert(state_ == DiscordObjectState::Owned);
7804 if (Nonce.has_value()) {
7805 Nonce__str.
ptr =
reinterpret_cast<uint8_t*
>(Nonce->data());
7806 Nonce__str.
size = Nonce->size();
7810std::optional<discordpp::AuthorizationCodeChallenge> AuthorizationArgs::CodeChallenge()
const
7812 assert(state_ == DiscordObjectState::Owned);
7813 bool returnIsNonNull__;
7816 if (!returnIsNonNull__) {
7820 DiscordObjectState::Owned);
7821 return returnValue__;
7823void AuthorizationArgs::SetCodeChallenge(
7824 std::optional<discordpp::AuthorizationCodeChallenge> CodeChallenge)
7826 assert(state_ == DiscordObjectState::Owned);
7828 &instance_, (CodeChallenge.has_value() ? CodeChallenge->instance() :
nullptr));
7830std::optional<discordpp::IntegrationType> AuthorizationArgs::IntegrationType()
const
7832 assert(state_ == DiscordObjectState::Owned);
7833 bool returnIsNonNull__;
7836 if (!returnIsNonNull__) {
7840 return returnValue__;
7842void AuthorizationArgs::SetIntegrationType(
7843 std::optional<discordpp::IntegrationType> IntegrationType)
7845 assert(state_ == DiscordObjectState::Owned);
7851std::optional<std::string> AuthorizationArgs::CustomSchemeParam()
const
7853 assert(state_ == DiscordObjectState::Owned);
7854 bool returnIsNonNull__;
7858 if (!returnIsNonNull__) {
7861 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
7862 returnValueNative__.
size);
7864 return returnValue__;
7866void AuthorizationArgs::SetCustomSchemeParam(std::optional<std::string> CustomSchemeParam)
7868 assert(state_ == DiscordObjectState::Owned);
7870 if (CustomSchemeParam.has_value()) {
7871 CustomSchemeParam__str.
ptr =
reinterpret_cast<uint8_t*
>(CustomSchemeParam->data());
7872 CustomSchemeParam__str.
size = CustomSchemeParam->size();
7875 &instance_, (CustomSchemeParam.has_value() ? &CustomSchemeParam__str :
nullptr));
7877const DeviceAuthorizationArgs DeviceAuthorizationArgs::nullobj{{}, DiscordObjectState::Invalid};
7878DeviceAuthorizationArgs::~DeviceAuthorizationArgs()
7880 if (state_ == DiscordObjectState::Owned) {
7882 state_ = DiscordObjectState::Invalid;
7885DeviceAuthorizationArgs::DeviceAuthorizationArgs(DeviceAuthorizationArgs&& other) noexcept
7886 : instance_(other.instance_)
7887 , state_(other.state_)
7889 other.state_ = DiscordObjectState::Invalid;
7891DeviceAuthorizationArgs& DeviceAuthorizationArgs::operator=(
7892 DeviceAuthorizationArgs&& other)
noexcept
7894 if (
this != &other) {
7895 if (state_ == DiscordObjectState::Owned) {
7898 instance_ = other.instance_;
7899 state_ = other.state_;
7900 other.state_ = DiscordObjectState::Invalid;
7904DeviceAuthorizationArgs::DeviceAuthorizationArgs(
const DeviceAuthorizationArgs& arg0)
7909 Discord_DeviceAuthorizationArgs_Clone(&instance_, arg0.instance());
7911 state_ = DiscordObjectState::Owned;
7914DeviceAuthorizationArgs& DeviceAuthorizationArgs::operator=(
const DeviceAuthorizationArgs& arg0)
7916 if (
this != &arg0) {
7917 if (state_ == DiscordObjectState::Owned) {
7919 state_ = DiscordObjectState::Invalid;
7921 if (arg0.state_ == DiscordObjectState::Owned) {
7924 state_ = DiscordObjectState::Owned;
7930 DiscordObjectState state)
7931 : instance_(instance)
7935DeviceAuthorizationArgs::DeviceAuthorizationArgs()
7937 assert(state_ == DiscordObjectState::Invalid);
7939 state_ = DiscordObjectState::Owned;
7941void DeviceAuthorizationArgs::Drop()
7943 if (state_ != DiscordObjectState::Owned) {
7947 state_ = DiscordObjectState::Invalid;
7949uint64_t DeviceAuthorizationArgs::ClientId()
const
7951 assert(state_ == DiscordObjectState::Owned);
7952 uint64_t returnValue__;
7954 return returnValue__;
7956void DeviceAuthorizationArgs::SetClientId(uint64_t ClientId)
7958 assert(state_ == DiscordObjectState::Owned);
7961std::string DeviceAuthorizationArgs::Scopes()
const
7963 assert(state_ == DiscordObjectState::Owned);
7966 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
7967 returnValueNative__.
size);
7969 return returnValue__;
7971void DeviceAuthorizationArgs::SetScopes(std::string Scopes)
7973 assert(state_ == DiscordObjectState::Owned);
7974 Discord_String Scopes__str{(uint8_t*)(Scopes.data()), Scopes.size()};
7977const VoiceStateHandle VoiceStateHandle::nullobj{{}, DiscordObjectState::Invalid};
7978VoiceStateHandle::~VoiceStateHandle()
7980 if (state_ == DiscordObjectState::Owned) {
7982 state_ = DiscordObjectState::Invalid;
7985VoiceStateHandle::VoiceStateHandle(VoiceStateHandle&& other) noexcept
7986 : instance_(other.instance_)
7987 , state_(other.state_)
7989 other.state_ = DiscordObjectState::Invalid;
7991VoiceStateHandle& VoiceStateHandle::operator=(VoiceStateHandle&& other)
noexcept
7993 if (
this != &other) {
7994 if (state_ == DiscordObjectState::Owned) {
7997 instance_ = other.instance_;
7998 state_ = other.state_;
7999 other.state_ = DiscordObjectState::Invalid;
8003VoiceStateHandle::VoiceStateHandle(
const VoiceStateHandle& other)
8008 Discord_VoiceStateHandle_Clone(&instance_, other.instance());
8010 state_ = DiscordObjectState::Owned;
8013VoiceStateHandle& VoiceStateHandle::operator=(
const VoiceStateHandle& other)
8015 if (
this != &other) {
8016 if (state_ == DiscordObjectState::Owned) {
8018 state_ = DiscordObjectState::Invalid;
8020 if (other.state_ == DiscordObjectState::Owned) {
8023 state_ = DiscordObjectState::Owned;
8029 : instance_(instance)
8033void VoiceStateHandle::Drop()
8035 if (state_ != DiscordObjectState::Owned) {
8039 state_ = DiscordObjectState::Invalid;
8041bool VoiceStateHandle::SelfDeaf()
const
8043 assert(state_ == DiscordObjectState::Owned);
8046 return returnValue__;
8048bool VoiceStateHandle::SelfMute()
const
8050 assert(state_ == DiscordObjectState::Owned);
8053 return returnValue__;
8055const VADThresholdSettings VADThresholdSettings::nullobj{{}, DiscordObjectState::Invalid};
8056VADThresholdSettings::~VADThresholdSettings()
8058 if (state_ == DiscordObjectState::Owned) {
8060 state_ = DiscordObjectState::Invalid;
8063VADThresholdSettings::VADThresholdSettings(VADThresholdSettings&& other) noexcept
8064 : instance_(other.instance_)
8065 , state_(other.state_)
8067 other.state_ = DiscordObjectState::Invalid;
8069VADThresholdSettings& VADThresholdSettings::operator=(VADThresholdSettings&& other)
noexcept
8071 if (
this != &other) {
8072 if (state_ == DiscordObjectState::Owned) {
8075 instance_ = other.instance_;
8076 state_ = other.state_;
8077 other.state_ = DiscordObjectState::Invalid;
8082 DiscordObjectState state)
8083 : instance_(instance)
8087void VADThresholdSettings::Drop()
8089 if (state_ != DiscordObjectState::Owned) {
8093 state_ = DiscordObjectState::Invalid;
8095float VADThresholdSettings::VadThreshold()
const
8097 assert(state_ == DiscordObjectState::Owned);
8098 float returnValue__;
8100 return returnValue__;
8102void VADThresholdSettings::SetVadThreshold(
float VadThreshold)
8104 assert(state_ == DiscordObjectState::Owned);
8107bool VADThresholdSettings::Automatic()
const
8109 assert(state_ == DiscordObjectState::Owned);
8112 return returnValue__;
8114void VADThresholdSettings::SetAutomatic(
bool Automatic)
8116 assert(state_ == DiscordObjectState::Owned);
8119const Call Call::nullobj{{}, DiscordObjectState::Invalid};
8122 if (state_ == DiscordObjectState::Owned) {
8124 state_ = DiscordObjectState::Invalid;
8127Call::Call(Call&& other) noexcept
8128 : instance_(other.instance_)
8129 , state_(other.state_)
8131 other.state_ = DiscordObjectState::Invalid;
8133Call& Call::operator=(Call&& other)
noexcept
8135 if (
this != &other) {
8136 if (state_ == DiscordObjectState::Owned) {
8139 instance_ = other.instance_;
8140 state_ = other.state_;
8141 other.state_ = DiscordObjectState::Invalid;
8145Call::Call(
const Call& other)
8150 Discord_Call_Clone(&instance_, other.instance());
8152 state_ = DiscordObjectState::Owned;
8155Call& Call::operator=(
const Call& other)
8157 if (
this != &other) {
8158 if (state_ == DiscordObjectState::Owned) {
8160 state_ = DiscordObjectState::Invalid;
8162 if (other.state_ == DiscordObjectState::Owned) {
8165 state_ = DiscordObjectState::Owned;
8170Call::Call(
Discord_Call instance, DiscordObjectState state)
8171 : instance_(instance)
8177 if (state_ != DiscordObjectState::Owned) {
8181 state_ = DiscordObjectState::Invalid;
8187 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
8188 returnValueNative__.
size);
8190 return returnValue__;
8194 assert(state_ == DiscordObjectState::Owned);
8199uint64_t Call::GetChannelId()
const
8201 assert(state_ == DiscordObjectState::Owned);
8202 uint64_t returnValue__;
8204 return returnValue__;
8206uint64_t Call::GetGuildId()
const
8208 assert(state_ == DiscordObjectState::Owned);
8209 uint64_t returnValue__;
8211 return returnValue__;
8213bool Call::GetLocalMute(uint64_t userId)
8215 assert(state_ == DiscordObjectState::Owned);
8218 return returnValue__;
8220std::vector<uint64_t> Call::GetParticipants()
const
8222 assert(state_ == DiscordObjectState::Owned);
8225 std::vector<uint64_t> returnValue__(returnValueNative__.
ptr,
8226 returnValueNative__.
ptr + returnValueNative__.
size);
8228 return returnValue__;
8230float Call::GetParticipantVolume(uint64_t userId)
8232 assert(state_ == DiscordObjectState::Owned);
8233 float returnValue__;
8235 return returnValue__;
8237bool Call::GetPTTActive()
8239 assert(state_ == DiscordObjectState::Owned);
8242 return returnValue__;
8244uint32_t Call::GetPTTReleaseDelay()
8246 assert(state_ == DiscordObjectState::Owned);
8247 uint32_t returnValue__;
8249 return returnValue__;
8251bool Call::GetSelfDeaf()
8253 assert(state_ == DiscordObjectState::Owned);
8256 return returnValue__;
8258bool Call::GetSelfMute()
8260 assert(state_ == DiscordObjectState::Owned);
8263 return returnValue__;
8267 assert(state_ == DiscordObjectState::Owned);
8274 assert(state_ == DiscordObjectState::Owned);
8278 return returnValue__;
8280std::optional<discordpp::VoiceStateHandle> Call::GetVoiceStateHandle(uint64_t userId)
const
8282 assert(state_ == DiscordObjectState::Owned);
8283 bool returnIsNonNull__;
8286 if (!returnIsNonNull__) {
8290 return returnValue__;
8294 assert(state_ == DiscordObjectState::Owned);
8297void Call::SetLocalMute(uint64_t userId,
bool mute)
8299 assert(state_ == DiscordObjectState::Owned);
8304 assert(state_ == DiscordObjectState::Owned);
8305 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
8306 auto cb__userData =
new Tcb__UserData(cb);
8308 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
8309 userData__typed->delegate(userId);
8312 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
8316 assert(state_ == DiscordObjectState::Owned);
8317 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
8318 auto cb__userData =
new Tcb__UserData(cb);
8320 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
8321 userData__typed->delegate(userId, added);
8324 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
8326void Call::SetParticipantVolume(uint64_t userId,
float volume)
8328 assert(state_ == DiscordObjectState::Owned);
8331void Call::SetPTTActive(
bool active)
8333 assert(state_ == DiscordObjectState::Owned);
8336void Call::SetPTTReleaseDelay(uint32_t releaseDelayMs)
8338 assert(state_ == DiscordObjectState::Owned);
8341void Call::SetSelfDeaf(
bool deaf)
8343 assert(state_ == DiscordObjectState::Owned);
8346void Call::SetSelfMute(
bool mute)
8348 assert(state_ == DiscordObjectState::Owned);
8353 assert(state_ == DiscordObjectState::Owned);
8354 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
8355 auto cb__userData =
new Tcb__UserData(cb);
8357 [](
auto userId,
auto isPlayingSound,
void* userData__) {
8358 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
8359 userData__typed->delegate(userId, isPlayingSound);
8362 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
8366 assert(state_ == DiscordObjectState::Owned);
8367 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
8368 auto cb__userData =
new Tcb__UserData(cb);
8370 [](
auto status,
auto error,
auto errorDetail,
void* userData__) {
8371 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
8377 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
8379void Call::SetVADThreshold(
bool automatic,
float threshold)
8381 assert(state_ == DiscordObjectState::Owned);
8388 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
8389 returnValueNative__.
size);
8391 return returnValue__;
8393const ChannelHandle ChannelHandle::nullobj{{}, DiscordObjectState::Invalid};
8394ChannelHandle::~ChannelHandle()
8396 if (state_ == DiscordObjectState::Owned) {
8398 state_ = DiscordObjectState::Invalid;
8401ChannelHandle::ChannelHandle(ChannelHandle&& other) noexcept
8402 : instance_(other.instance_)
8403 , state_(other.state_)
8405 other.state_ = DiscordObjectState::Invalid;
8407ChannelHandle& ChannelHandle::operator=(ChannelHandle&& other)
noexcept
8409 if (
this != &other) {
8410 if (state_ == DiscordObjectState::Owned) {
8413 instance_ = other.instance_;
8414 state_ = other.state_;
8415 other.state_ = DiscordObjectState::Invalid;
8419ChannelHandle::ChannelHandle(
const ChannelHandle& other)
8424 Discord_ChannelHandle_Clone(&instance_, other.instance());
8426 state_ = DiscordObjectState::Owned;
8429ChannelHandle& ChannelHandle::operator=(
const ChannelHandle& other)
8431 if (
this != &other) {
8432 if (state_ == DiscordObjectState::Owned) {
8434 state_ = DiscordObjectState::Invalid;
8436 if (other.state_ == DiscordObjectState::Owned) {
8439 state_ = DiscordObjectState::Owned;
8445 : instance_(instance)
8449void ChannelHandle::Drop()
8451 if (state_ != DiscordObjectState::Owned) {
8455 state_ = DiscordObjectState::Invalid;
8457uint64_t ChannelHandle::Id()
const
8459 assert(state_ == DiscordObjectState::Owned);
8460 uint64_t returnValue__;
8462 return returnValue__;
8464std::string ChannelHandle::Name()
const
8466 assert(state_ == DiscordObjectState::Owned);
8469 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
8470 returnValueNative__.
size);
8472 return returnValue__;
8474std::vector<uint64_t> ChannelHandle::Recipients()
const
8476 assert(state_ == DiscordObjectState::Owned);
8479 std::vector<uint64_t> returnValue__(returnValueNative__.
ptr,
8480 returnValueNative__.
ptr + returnValueNative__.
size);
8482 return returnValue__;
8486 assert(state_ == DiscordObjectState::Owned);
8491const GuildMinimal GuildMinimal::nullobj{{}, DiscordObjectState::Invalid};
8492GuildMinimal::~GuildMinimal()
8494 if (state_ == DiscordObjectState::Owned) {
8496 state_ = DiscordObjectState::Invalid;
8499GuildMinimal::GuildMinimal(GuildMinimal&& other) noexcept
8500 : instance_(other.instance_)
8501 , state_(other.state_)
8503 other.state_ = DiscordObjectState::Invalid;
8505GuildMinimal& GuildMinimal::operator=(GuildMinimal&& other)
noexcept
8507 if (
this != &other) {
8508 if (state_ == DiscordObjectState::Owned) {
8511 instance_ = other.instance_;
8512 state_ = other.state_;
8513 other.state_ = DiscordObjectState::Invalid;
8517GuildMinimal::GuildMinimal(
const GuildMinimal& arg0)
8522 Discord_GuildMinimal_Clone(&instance_, arg0.instance());
8524 state_ = DiscordObjectState::Owned;
8527GuildMinimal& GuildMinimal::operator=(
const GuildMinimal& arg0)
8529 if (
this != &arg0) {
8530 if (state_ == DiscordObjectState::Owned) {
8532 state_ = DiscordObjectState::Invalid;
8534 if (arg0.state_ == DiscordObjectState::Owned) {
8537 state_ = DiscordObjectState::Owned;
8543 : instance_(instance)
8547void GuildMinimal::Drop()
8549 if (state_ != DiscordObjectState::Owned) {
8553 state_ = DiscordObjectState::Invalid;
8555uint64_t GuildMinimal::Id()
const
8557 assert(state_ == DiscordObjectState::Owned);
8558 uint64_t returnValue__;
8560 return returnValue__;
8562void GuildMinimal::SetId(uint64_t Id)
8564 assert(state_ == DiscordObjectState::Owned);
8567std::string GuildMinimal::Name()
const
8569 assert(state_ == DiscordObjectState::Owned);
8572 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
8573 returnValueNative__.
size);
8575 return returnValue__;
8577void GuildMinimal::SetName(std::string Name)
8579 assert(state_ == DiscordObjectState::Owned);
8583const GuildChannel GuildChannel::nullobj{{}, DiscordObjectState::Invalid};
8584GuildChannel::~GuildChannel()
8586 if (state_ == DiscordObjectState::Owned) {
8588 state_ = DiscordObjectState::Invalid;
8591GuildChannel::GuildChannel(GuildChannel&& other) noexcept
8592 : instance_(other.instance_)
8593 , state_(other.state_)
8595 other.state_ = DiscordObjectState::Invalid;
8597GuildChannel& GuildChannel::operator=(GuildChannel&& other)
noexcept
8599 if (
this != &other) {
8600 if (state_ == DiscordObjectState::Owned) {
8603 instance_ = other.instance_;
8604 state_ = other.state_;
8605 other.state_ = DiscordObjectState::Invalid;
8609GuildChannel::GuildChannel(
const GuildChannel& arg0)
8614 Discord_GuildChannel_Clone(&instance_, arg0.instance());
8616 state_ = DiscordObjectState::Owned;
8619GuildChannel& GuildChannel::operator=(
const GuildChannel& arg0)
8621 if (
this != &arg0) {
8622 if (state_ == DiscordObjectState::Owned) {
8624 state_ = DiscordObjectState::Invalid;
8626 if (arg0.state_ == DiscordObjectState::Owned) {
8629 state_ = DiscordObjectState::Owned;
8635 : instance_(instance)
8639void GuildChannel::Drop()
8641 if (state_ != DiscordObjectState::Owned) {
8645 state_ = DiscordObjectState::Invalid;
8647uint64_t GuildChannel::Id()
const
8649 assert(state_ == DiscordObjectState::Owned);
8650 uint64_t returnValue__;
8652 return returnValue__;
8654void GuildChannel::SetId(uint64_t Id)
8656 assert(state_ == DiscordObjectState::Owned);
8659std::string GuildChannel::Name()
const
8661 assert(state_ == DiscordObjectState::Owned);
8664 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
8665 returnValueNative__.
size);
8667 return returnValue__;
8669void GuildChannel::SetName(std::string Name)
8671 assert(state_ == DiscordObjectState::Owned);
8677 assert(state_ == DiscordObjectState::Owned);
8684 assert(state_ == DiscordObjectState::Owned);
8687int32_t GuildChannel::Position()
const
8689 assert(state_ == DiscordObjectState::Owned);
8690 int32_t returnValue__;
8692 return returnValue__;
8694void GuildChannel::SetPosition(int32_t Position)
8696 assert(state_ == DiscordObjectState::Owned);
8699std::optional<uint64_t> GuildChannel::ParentId()
const
8701 assert(state_ == DiscordObjectState::Owned);
8702 bool returnIsNonNull__;
8703 uint64_t returnValue__;
8705 if (!returnIsNonNull__) {
8706 return std::nullopt;
8708 return returnValue__;
8710void GuildChannel::SetParentId(std::optional<uint64_t> ParentId)
8712 assert(state_ == DiscordObjectState::Owned);
8715bool GuildChannel::IsLinkable()
const
8717 assert(state_ == DiscordObjectState::Owned);
8720 return returnValue__;
8722void GuildChannel::SetIsLinkable(
bool IsLinkable)
8724 assert(state_ == DiscordObjectState::Owned);
8727bool GuildChannel::IsViewableAndWriteableByAllMembers()
const
8729 assert(state_ == DiscordObjectState::Owned);
8732 return returnValue__;
8734void GuildChannel::SetIsViewableAndWriteableByAllMembers(
bool IsViewableAndWriteableByAllMembers)
8736 assert(state_ == DiscordObjectState::Owned);
8738 IsViewableAndWriteableByAllMembers);
8740std::optional<discordpp::LinkedLobby> GuildChannel::LinkedLobby()
const
8742 assert(state_ == DiscordObjectState::Owned);
8743 bool returnIsNonNull__;
8746 if (!returnIsNonNull__) {
8750 return returnValue__;
8752void GuildChannel::SetLinkedLobby(std::optional<discordpp::LinkedLobby> LinkedLobby)
8754 assert(state_ == DiscordObjectState::Owned);
8756 &instance_, (LinkedLobby.has_value() ? LinkedLobby->instance() :
nullptr));
8758const LinkedLobby LinkedLobby::nullobj{{}, DiscordObjectState::Invalid};
8759LinkedLobby::~LinkedLobby()
8761 if (state_ == DiscordObjectState::Owned) {
8763 state_ = DiscordObjectState::Invalid;
8766LinkedLobby::LinkedLobby(LinkedLobby&& other) noexcept
8767 : instance_(other.instance_)
8768 , state_(other.state_)
8770 other.state_ = DiscordObjectState::Invalid;
8772LinkedLobby& LinkedLobby::operator=(LinkedLobby&& other)
noexcept
8774 if (
this != &other) {
8775 if (state_ == DiscordObjectState::Owned) {
8778 instance_ = other.instance_;
8779 state_ = other.state_;
8780 other.state_ = DiscordObjectState::Invalid;
8784LinkedLobby::LinkedLobby(
const LinkedLobby& arg0)
8789 Discord_LinkedLobby_Clone(&instance_, arg0.instance());
8791 state_ = DiscordObjectState::Owned;
8794LinkedLobby& LinkedLobby::operator=(
const LinkedLobby& arg0)
8796 if (
this != &arg0) {
8797 if (state_ == DiscordObjectState::Owned) {
8799 state_ = DiscordObjectState::Invalid;
8801 if (arg0.state_ == DiscordObjectState::Owned) {
8804 state_ = DiscordObjectState::Owned;
8810 : instance_(instance)
8814LinkedLobby::LinkedLobby()
8816 assert(state_ == DiscordObjectState::Invalid);
8818 state_ = DiscordObjectState::Owned;
8820void LinkedLobby::Drop()
8822 if (state_ != DiscordObjectState::Owned) {
8826 state_ = DiscordObjectState::Invalid;
8828uint64_t LinkedLobby::ApplicationId()
const
8830 assert(state_ == DiscordObjectState::Owned);
8831 uint64_t returnValue__;
8833 return returnValue__;
8835void LinkedLobby::SetApplicationId(uint64_t ApplicationId)
8837 assert(state_ == DiscordObjectState::Owned);
8840uint64_t LinkedLobby::LobbyId()
const
8842 assert(state_ == DiscordObjectState::Owned);
8843 uint64_t returnValue__;
8845 return returnValue__;
8847void LinkedLobby::SetLobbyId(uint64_t LobbyId)
8849 assert(state_ == DiscordObjectState::Owned);
8852const LinkedChannel LinkedChannel::nullobj{{}, DiscordObjectState::Invalid};
8853LinkedChannel::~LinkedChannel()
8855 if (state_ == DiscordObjectState::Owned) {
8857 state_ = DiscordObjectState::Invalid;
8860LinkedChannel::LinkedChannel(LinkedChannel&& other) noexcept
8861 : instance_(other.instance_)
8862 , state_(other.state_)
8864 other.state_ = DiscordObjectState::Invalid;
8866LinkedChannel& LinkedChannel::operator=(LinkedChannel&& other)
noexcept
8868 if (
this != &other) {
8869 if (state_ == DiscordObjectState::Owned) {
8872 instance_ = other.instance_;
8873 state_ = other.state_;
8874 other.state_ = DiscordObjectState::Invalid;
8878LinkedChannel::LinkedChannel(
const LinkedChannel& arg0)
8883 Discord_LinkedChannel_Clone(&instance_, arg0.instance());
8885 state_ = DiscordObjectState::Owned;
8888LinkedChannel& LinkedChannel::operator=(
const LinkedChannel& arg0)
8890 if (
this != &arg0) {
8891 if (state_ == DiscordObjectState::Owned) {
8893 state_ = DiscordObjectState::Invalid;
8895 if (arg0.state_ == DiscordObjectState::Owned) {
8898 state_ = DiscordObjectState::Owned;
8904 : instance_(instance)
8908void LinkedChannel::Drop()
8910 if (state_ != DiscordObjectState::Owned) {
8914 state_ = DiscordObjectState::Invalid;
8916uint64_t LinkedChannel::Id()
const
8918 assert(state_ == DiscordObjectState::Owned);
8919 uint64_t returnValue__;
8921 return returnValue__;
8923void LinkedChannel::SetId(uint64_t Id)
8925 assert(state_ == DiscordObjectState::Owned);
8928std::string LinkedChannel::Name()
const
8930 assert(state_ == DiscordObjectState::Owned);
8933 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
8934 returnValueNative__.
size);
8936 return returnValue__;
8938void LinkedChannel::SetName(std::string Name)
8940 assert(state_ == DiscordObjectState::Owned);
8944uint64_t LinkedChannel::GuildId()
const
8946 assert(state_ == DiscordObjectState::Owned);
8947 uint64_t returnValue__;
8949 return returnValue__;
8951void LinkedChannel::SetGuildId(uint64_t GuildId)
8953 assert(state_ == DiscordObjectState::Owned);
8956const RelationshipHandle RelationshipHandle::nullobj{{}, DiscordObjectState::Invalid};
8957RelationshipHandle::~RelationshipHandle()
8959 if (state_ == DiscordObjectState::Owned) {
8961 state_ = DiscordObjectState::Invalid;
8964RelationshipHandle::RelationshipHandle(RelationshipHandle&& other) noexcept
8965 : instance_(other.instance_)
8966 , state_(other.state_)
8968 other.state_ = DiscordObjectState::Invalid;
8970RelationshipHandle& RelationshipHandle::operator=(RelationshipHandle&& other)
noexcept
8972 if (
this != &other) {
8973 if (state_ == DiscordObjectState::Owned) {
8976 instance_ = other.instance_;
8977 state_ = other.state_;
8978 other.state_ = DiscordObjectState::Invalid;
8982RelationshipHandle::RelationshipHandle(
const RelationshipHandle& other)
8987 Discord_RelationshipHandle_Clone(&instance_, other.instance());
8989 state_ = DiscordObjectState::Owned;
8992RelationshipHandle& RelationshipHandle::operator=(
const RelationshipHandle& other)
8994 if (
this != &other) {
8995 if (state_ == DiscordObjectState::Owned) {
8997 state_ = DiscordObjectState::Invalid;
8999 if (other.state_ == DiscordObjectState::Owned) {
9002 state_ = DiscordObjectState::Owned;
9008 DiscordObjectState state)
9009 : instance_(instance)
9013void RelationshipHandle::Drop()
9015 if (state_ != DiscordObjectState::Owned) {
9019 state_ = DiscordObjectState::Invalid;
9023 assert(state_ == DiscordObjectState::Owned);
9030 assert(state_ == DiscordObjectState::Owned);
9035uint64_t RelationshipHandle::Id()
const
9037 assert(state_ == DiscordObjectState::Owned);
9038 uint64_t returnValue__;
9040 return returnValue__;
9042bool RelationshipHandle::IsSpamRequest()
const
9044 assert(state_ == DiscordObjectState::Owned);
9047 return returnValue__;
9049std::optional<discordpp::UserHandle> RelationshipHandle::User()
const
9051 assert(state_ == DiscordObjectState::Owned);
9052 bool returnIsNonNull__;
9055 if (!returnIsNonNull__) {
9059 return returnValue__;
9061const UserApplicationProfileHandle UserApplicationProfileHandle::nullobj{
9063 DiscordObjectState::Invalid};
9064UserApplicationProfileHandle::~UserApplicationProfileHandle()
9066 if (state_ == DiscordObjectState::Owned) {
9068 state_ = DiscordObjectState::Invalid;
9071UserApplicationProfileHandle::UserApplicationProfileHandle(
9072 UserApplicationProfileHandle&& other) noexcept
9073 : instance_(other.instance_)
9074 , state_(other.state_)
9076 other.state_ = DiscordObjectState::Invalid;
9078UserApplicationProfileHandle& UserApplicationProfileHandle::operator=(
9079 UserApplicationProfileHandle&& other)
noexcept
9081 if (
this != &other) {
9082 if (state_ == DiscordObjectState::Owned) {
9085 instance_ = other.instance_;
9086 state_ = other.state_;
9087 other.state_ = DiscordObjectState::Invalid;
9091UserApplicationProfileHandle::UserApplicationProfileHandle(
9092 const UserApplicationProfileHandle& other)
9097 Discord_UserApplicationProfileHandle_Clone(&instance_, other.instance());
9099 state_ = DiscordObjectState::Owned;
9102UserApplicationProfileHandle& UserApplicationProfileHandle::operator=(
9103 const UserApplicationProfileHandle& other)
9105 if (
this != &other) {
9106 if (state_ == DiscordObjectState::Owned) {
9108 state_ = DiscordObjectState::Invalid;
9110 if (other.state_ == DiscordObjectState::Owned) {
9113 state_ = DiscordObjectState::Owned;
9118UserApplicationProfileHandle::UserApplicationProfileHandle(
9120 DiscordObjectState state)
9121 : instance_(instance)
9125void UserApplicationProfileHandle::Drop()
9127 if (state_ != DiscordObjectState::Owned) {
9131 state_ = DiscordObjectState::Invalid;
9133std::string UserApplicationProfileHandle::AvatarHash()
const
9135 assert(state_ == DiscordObjectState::Owned);
9138 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
9139 returnValueNative__.
size);
9141 return returnValue__;
9143std::string UserApplicationProfileHandle::Metadata()
const
9145 assert(state_ == DiscordObjectState::Owned);
9148 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
9149 returnValueNative__.
size);
9151 return returnValue__;
9153std::optional<std::string> UserApplicationProfileHandle::ProviderId()
const
9155 assert(state_ == DiscordObjectState::Owned);
9156 bool returnIsNonNull__;
9160 if (!returnIsNonNull__) {
9163 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
9164 returnValueNative__.
size);
9166 return returnValue__;
9168std::string UserApplicationProfileHandle::ProviderIssuedUserId()
const
9170 assert(state_ == DiscordObjectState::Owned);
9173 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
9174 returnValueNative__.
size);
9176 return returnValue__;
9180 assert(state_ == DiscordObjectState::Owned);
9185std::string UserApplicationProfileHandle::Username()
const
9187 assert(state_ == DiscordObjectState::Owned);
9190 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
9191 returnValueNative__.
size);
9193 return returnValue__;
9195const UserHandle UserHandle::nullobj{{}, DiscordObjectState::Invalid};
9196UserHandle::~UserHandle()
9198 if (state_ == DiscordObjectState::Owned) {
9200 state_ = DiscordObjectState::Invalid;
9203UserHandle::UserHandle(UserHandle&& other) noexcept
9204 : instance_(other.instance_)
9205 , state_(other.state_)
9207 other.state_ = DiscordObjectState::Invalid;
9209UserHandle& UserHandle::operator=(UserHandle&& other)
noexcept
9211 if (
this != &other) {
9212 if (state_ == DiscordObjectState::Owned) {
9215 instance_ = other.instance_;
9216 state_ = other.state_;
9217 other.state_ = DiscordObjectState::Invalid;
9221UserHandle::UserHandle(
const UserHandle& arg0)
9226 Discord_UserHandle_Clone(&instance_, arg0.instance());
9228 state_ = DiscordObjectState::Owned;
9231UserHandle& UserHandle::operator=(
const UserHandle& arg0)
9233 if (
this != &arg0) {
9234 if (state_ == DiscordObjectState::Owned) {
9236 state_ = DiscordObjectState::Invalid;
9238 if (arg0.state_ == DiscordObjectState::Owned) {
9241 state_ = DiscordObjectState::Owned;
9247 : instance_(instance)
9251void UserHandle::Drop()
9253 if (state_ != DiscordObjectState::Owned) {
9257 state_ = DiscordObjectState::Invalid;
9259std::optional<std::string> UserHandle::Avatar()
const
9261 assert(state_ == DiscordObjectState::Owned);
9262 bool returnIsNonNull__;
9265 if (!returnIsNonNull__) {
9268 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
9269 returnValueNative__.
size);
9271 return returnValue__;
9277 &returnValueNative__);
9278 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
9279 returnValueNative__.
size);
9281 return returnValue__;
9286 assert(state_ == DiscordObjectState::Owned);
9291 &returnValueNative__);
9292 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
9293 returnValueNative__.
size);
9295 return returnValue__;
9297std::string UserHandle::DisplayName()
const
9299 assert(state_ == DiscordObjectState::Owned);
9302 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
9303 returnValueNative__.
size);
9305 return returnValue__;
9307std::optional<discordpp::Activity> UserHandle::GameActivity()
const
9309 assert(state_ == DiscordObjectState::Owned);
9310 bool returnIsNonNull__;
9313 if (!returnIsNonNull__) {
9317 return returnValue__;
9319std::optional<std::string> UserHandle::GlobalName()
const
9321 assert(state_ == DiscordObjectState::Owned);
9322 bool returnIsNonNull__;
9325 if (!returnIsNonNull__) {
9328 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
9329 returnValueNative__.
size);
9331 return returnValue__;
9333uint64_t UserHandle::Id()
const
9335 assert(state_ == DiscordObjectState::Owned);
9336 uint64_t returnValue__;
9338 return returnValue__;
9340bool UserHandle::IsProvisional()
const
9342 assert(state_ == DiscordObjectState::Owned);
9345 return returnValue__;
9349 assert(state_ == DiscordObjectState::Owned);
9353 return returnValue__;
9357 assert(state_ == DiscordObjectState::Owned);
9362std::vector<discordpp::UserApplicationProfileHandle> UserHandle::UserApplicationProfiles()
const
9364 assert(state_ == DiscordObjectState::Owned);
9367 std::vector<discordpp::UserApplicationProfileHandle> returnValue__;
9368 returnValue__.reserve(returnValueNative__.
size);
9369 for (
size_t i__ = 0; i__ < returnValueNative__.
size; ++i__) {
9370 returnValue__.emplace_back(returnValueNative__.
ptr[i__], DiscordObjectState::Owned);
9373 return returnValue__;
9375std::string UserHandle::Username()
const
9377 assert(state_ == DiscordObjectState::Owned);
9380 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
9381 returnValueNative__.
size);
9383 return returnValue__;
9385const LobbyMemberHandle LobbyMemberHandle::nullobj{{}, DiscordObjectState::Invalid};
9386LobbyMemberHandle::~LobbyMemberHandle()
9388 if (state_ == DiscordObjectState::Owned) {
9390 state_ = DiscordObjectState::Invalid;
9393LobbyMemberHandle::LobbyMemberHandle(LobbyMemberHandle&& other) noexcept
9394 : instance_(other.instance_)
9395 , state_(other.state_)
9397 other.state_ = DiscordObjectState::Invalid;
9399LobbyMemberHandle& LobbyMemberHandle::operator=(LobbyMemberHandle&& other)
noexcept
9401 if (
this != &other) {
9402 if (state_ == DiscordObjectState::Owned) {
9405 instance_ = other.instance_;
9406 state_ = other.state_;
9407 other.state_ = DiscordObjectState::Invalid;
9411LobbyMemberHandle::LobbyMemberHandle(
const LobbyMemberHandle& other)
9416 Discord_LobbyMemberHandle_Clone(&instance_, other.instance());
9418 state_ = DiscordObjectState::Owned;
9421LobbyMemberHandle& LobbyMemberHandle::operator=(
const LobbyMemberHandle& other)
9423 if (
this != &other) {
9424 if (state_ == DiscordObjectState::Owned) {
9426 state_ = DiscordObjectState::Invalid;
9428 if (other.state_ == DiscordObjectState::Owned) {
9431 state_ = DiscordObjectState::Owned;
9437 : instance_(instance)
9441void LobbyMemberHandle::Drop()
9443 if (state_ != DiscordObjectState::Owned) {
9447 state_ = DiscordObjectState::Invalid;
9449bool LobbyMemberHandle::CanLinkLobby()
const
9451 assert(state_ == DiscordObjectState::Owned);
9454 return returnValue__;
9456bool LobbyMemberHandle::Connected()
const
9458 assert(state_ == DiscordObjectState::Owned);
9461 return returnValue__;
9463uint64_t LobbyMemberHandle::Id()
const
9465 assert(state_ == DiscordObjectState::Owned);
9466 uint64_t returnValue__;
9468 return returnValue__;
9470std::unordered_map<std::string, std::string> LobbyMemberHandle::Metadata()
const
9472 assert(state_ == DiscordObjectState::Owned);
9475 std::unordered_map<std::string, std::string> returnValue__ =
9476 ConvertReturnedProperties(returnValueNative__);
9478 return returnValue__;
9480std::optional<discordpp::UserHandle> LobbyMemberHandle::User()
const
9482 assert(state_ == DiscordObjectState::Owned);
9483 bool returnIsNonNull__;
9486 if (!returnIsNonNull__) {
9490 return returnValue__;
9492const LobbyHandle LobbyHandle::nullobj{{}, DiscordObjectState::Invalid};
9493LobbyHandle::~LobbyHandle()
9495 if (state_ == DiscordObjectState::Owned) {
9497 state_ = DiscordObjectState::Invalid;
9500LobbyHandle::LobbyHandle(LobbyHandle&& other) noexcept
9501 : instance_(other.instance_)
9502 , state_(other.state_)
9504 other.state_ = DiscordObjectState::Invalid;
9506LobbyHandle& LobbyHandle::operator=(LobbyHandle&& other)
noexcept
9508 if (
this != &other) {
9509 if (state_ == DiscordObjectState::Owned) {
9512 instance_ = other.instance_;
9513 state_ = other.state_;
9514 other.state_ = DiscordObjectState::Invalid;
9518LobbyHandle::LobbyHandle(
const LobbyHandle& other)
9523 Discord_LobbyHandle_Clone(&instance_, other.instance());
9525 state_ = DiscordObjectState::Owned;
9528LobbyHandle& LobbyHandle::operator=(
const LobbyHandle& other)
9530 if (
this != &other) {
9531 if (state_ == DiscordObjectState::Owned) {
9533 state_ = DiscordObjectState::Invalid;
9535 if (other.state_ == DiscordObjectState::Owned) {
9538 state_ = DiscordObjectState::Owned;
9544 : instance_(instance)
9548void LobbyHandle::Drop()
9550 if (state_ != DiscordObjectState::Owned) {
9554 state_ = DiscordObjectState::Invalid;
9556std::optional<discordpp::CallInfoHandle> LobbyHandle::GetCallInfoHandle()
const
9558 assert(state_ == DiscordObjectState::Owned);
9559 bool returnIsNonNull__;
9562 if (!returnIsNonNull__) {
9566 return returnValue__;
9568std::optional<discordpp::LobbyMemberHandle> LobbyHandle::GetLobbyMemberHandle(
9569 uint64_t memberId)
const
9571 assert(state_ == DiscordObjectState::Owned);
9572 bool returnIsNonNull__;
9576 if (!returnIsNonNull__) {
9580 return returnValue__;
9582uint64_t LobbyHandle::Id()
const
9584 assert(state_ == DiscordObjectState::Owned);
9585 uint64_t returnValue__;
9587 return returnValue__;
9589std::optional<discordpp::LinkedChannel> LobbyHandle::LinkedChannel()
const
9591 assert(state_ == DiscordObjectState::Owned);
9592 bool returnIsNonNull__;
9595 if (!returnIsNonNull__) {
9599 return returnValue__;
9601std::vector<uint64_t> LobbyHandle::LobbyMemberIds()
const
9603 assert(state_ == DiscordObjectState::Owned);
9606 std::vector<uint64_t> returnValue__(returnValueNative__.
ptr,
9607 returnValueNative__.
ptr + returnValueNative__.
size);
9609 return returnValue__;
9611std::vector<discordpp::LobbyMemberHandle> LobbyHandle::LobbyMembers()
const
9613 assert(state_ == DiscordObjectState::Owned);
9616 std::vector<discordpp::LobbyMemberHandle> returnValue__;
9617 returnValue__.reserve(returnValueNative__.
size);
9618 for (
size_t i__ = 0; i__ < returnValueNative__.
size; ++i__) {
9619 returnValue__.emplace_back(returnValueNative__.
ptr[i__], DiscordObjectState::Owned);
9622 return returnValue__;
9624std::unordered_map<std::string, std::string> LobbyHandle::Metadata()
const
9626 assert(state_ == DiscordObjectState::Owned);
9629 std::unordered_map<std::string, std::string> returnValue__ =
9630 ConvertReturnedProperties(returnValueNative__);
9632 return returnValue__;
9634const AdditionalContent AdditionalContent::nullobj{{}, DiscordObjectState::Invalid};
9635AdditionalContent::~AdditionalContent()
9637 if (state_ == DiscordObjectState::Owned) {
9639 state_ = DiscordObjectState::Invalid;
9642AdditionalContent::AdditionalContent(AdditionalContent&& other) noexcept
9643 : instance_(other.instance_)
9644 , state_(other.state_)
9646 other.state_ = DiscordObjectState::Invalid;
9648AdditionalContent& AdditionalContent::operator=(AdditionalContent&& other)
noexcept
9650 if (
this != &other) {
9651 if (state_ == DiscordObjectState::Owned) {
9654 instance_ = other.instance_;
9655 state_ = other.state_;
9656 other.state_ = DiscordObjectState::Invalid;
9660AdditionalContent::AdditionalContent(
const AdditionalContent& arg0)
9665 Discord_AdditionalContent_Clone(&instance_, arg0.instance());
9667 state_ = DiscordObjectState::Owned;
9670AdditionalContent& AdditionalContent::operator=(
const AdditionalContent& arg0)
9672 if (
this != &arg0) {
9673 if (state_ == DiscordObjectState::Owned) {
9675 state_ = DiscordObjectState::Invalid;
9677 if (arg0.state_ == DiscordObjectState::Owned) {
9680 state_ = DiscordObjectState::Owned;
9686 : instance_(instance)
9690AdditionalContent::AdditionalContent()
9692 assert(state_ == DiscordObjectState::Invalid);
9694 state_ = DiscordObjectState::Owned;
9696void AdditionalContent::Drop()
9698 if (state_ != DiscordObjectState::Owned) {
9702 state_ = DiscordObjectState::Invalid;
9706 assert(state_ == DiscordObjectState::Owned);
9709 return returnValue__;
9715 &returnValueNative__);
9716 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
9717 returnValueNative__.
size);
9719 return returnValue__;
9723 assert(state_ == DiscordObjectState::Owned);
9730 assert(state_ == DiscordObjectState::Owned);
9733std::optional<std::string> AdditionalContent::Title()
const
9735 assert(state_ == DiscordObjectState::Owned);
9736 bool returnIsNonNull__;
9739 if (!returnIsNonNull__) {
9742 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
9743 returnValueNative__.
size);
9745 return returnValue__;
9747void AdditionalContent::SetTitle(std::optional<std::string> Title)
9749 assert(state_ == DiscordObjectState::Owned);
9751 if (Title.has_value()) {
9752 Title__str.
ptr =
reinterpret_cast<uint8_t*
>(Title->data());
9753 Title__str.
size = Title->size();
9757uint8_t AdditionalContent::Count()
const
9759 assert(state_ == DiscordObjectState::Owned);
9760 uint8_t returnValue__;
9762 return returnValue__;
9764void AdditionalContent::SetCount(uint8_t Count)
9766 assert(state_ == DiscordObjectState::Owned);
9769const MessageHandle MessageHandle::nullobj{{}, DiscordObjectState::Invalid};
9770MessageHandle::~MessageHandle()
9772 if (state_ == DiscordObjectState::Owned) {
9774 state_ = DiscordObjectState::Invalid;
9777MessageHandle::MessageHandle(MessageHandle&& other) noexcept
9778 : instance_(other.instance_)
9779 , state_(other.state_)
9781 other.state_ = DiscordObjectState::Invalid;
9783MessageHandle& MessageHandle::operator=(MessageHandle&& other)
noexcept
9785 if (
this != &other) {
9786 if (state_ == DiscordObjectState::Owned) {
9789 instance_ = other.instance_;
9790 state_ = other.state_;
9791 other.state_ = DiscordObjectState::Invalid;
9795MessageHandle::MessageHandle(
const MessageHandle& other)
9800 Discord_MessageHandle_Clone(&instance_, other.instance());
9802 state_ = DiscordObjectState::Owned;
9805MessageHandle& MessageHandle::operator=(
const MessageHandle& other)
9807 if (
this != &other) {
9808 if (state_ == DiscordObjectState::Owned) {
9810 state_ = DiscordObjectState::Invalid;
9812 if (other.state_ == DiscordObjectState::Owned) {
9815 state_ = DiscordObjectState::Owned;
9821 : instance_(instance)
9825void MessageHandle::Drop()
9827 if (state_ != DiscordObjectState::Owned) {
9831 state_ = DiscordObjectState::Invalid;
9833std::optional<discordpp::AdditionalContent> MessageHandle::AdditionalContent()
const
9835 assert(state_ == DiscordObjectState::Owned);
9836 bool returnIsNonNull__;
9839 if (!returnIsNonNull__) {
9843 return returnValue__;
9845std::optional<std::string> MessageHandle::AdditionalName()
const
9847 assert(state_ == DiscordObjectState::Owned);
9848 bool returnIsNonNull__;
9851 if (!returnIsNonNull__) {
9854 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
9855 returnValueNative__.
size);
9857 return returnValue__;
9859std::optional<uint64_t> MessageHandle::ApplicationId()
const
9861 assert(state_ == DiscordObjectState::Owned);
9862 bool returnIsNonNull__;
9863 uint64_t returnValue__;
9865 if (!returnIsNonNull__) {
9866 return std::nullopt;
9868 return returnValue__;
9870std::optional<discordpp::UserHandle> MessageHandle::Author()
const
9872 assert(state_ == DiscordObjectState::Owned);
9873 bool returnIsNonNull__;
9876 if (!returnIsNonNull__) {
9880 return returnValue__;
9882uint64_t MessageHandle::AuthorId()
const
9884 assert(state_ == DiscordObjectState::Owned);
9885 uint64_t returnValue__;
9887 return returnValue__;
9889std::optional<discordpp::ChannelHandle> MessageHandle::Channel()
const
9891 assert(state_ == DiscordObjectState::Owned);
9892 bool returnIsNonNull__;
9895 if (!returnIsNonNull__) {
9899 return returnValue__;
9901uint64_t MessageHandle::ChannelId()
const
9903 assert(state_ == DiscordObjectState::Owned);
9904 uint64_t returnValue__;
9906 return returnValue__;
9908std::string MessageHandle::Content()
const
9910 assert(state_ == DiscordObjectState::Owned);
9913 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
9914 returnValueNative__.
size);
9916 return returnValue__;
9918std::optional<discordpp::DisclosureTypes> MessageHandle::DisclosureType()
const
9920 assert(state_ == DiscordObjectState::Owned);
9921 bool returnIsNonNull__;
9924 if (!returnIsNonNull__) {
9928 return returnValue__;
9930uint64_t MessageHandle::EditedTimestamp()
const
9932 assert(state_ == DiscordObjectState::Owned);
9933 uint64_t returnValue__;
9935 return returnValue__;
9937uint64_t MessageHandle::Id()
const
9939 assert(state_ == DiscordObjectState::Owned);
9940 uint64_t returnValue__;
9942 return returnValue__;
9944std::optional<discordpp::LobbyHandle> MessageHandle::Lobby()
const
9946 assert(state_ == DiscordObjectState::Owned);
9947 bool returnIsNonNull__;
9950 if (!returnIsNonNull__) {
9954 return returnValue__;
9956std::unordered_map<std::string, std::string> MessageHandle::Metadata()
const
9958 assert(state_ == DiscordObjectState::Owned);
9961 std::unordered_map<std::string, std::string> returnValue__ =
9962 ConvertReturnedProperties(returnValueNative__);
9964 return returnValue__;
9966std::unordered_map<std::string, std::string> MessageHandle::ModerationMetadata()
const
9968 assert(state_ == DiscordObjectState::Owned);
9971 std::unordered_map<std::string, std::string> returnValue__ =
9972 ConvertReturnedProperties(returnValueNative__);
9974 return returnValue__;
9976std::string MessageHandle::RawContent()
const
9978 assert(state_ == DiscordObjectState::Owned);
9981 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
9982 returnValueNative__.
size);
9984 return returnValue__;
9986std::optional<discordpp::UserHandle> MessageHandle::Recipient()
const
9988 assert(state_ == DiscordObjectState::Owned);
9989 bool returnIsNonNull__;
9992 if (!returnIsNonNull__) {
9996 return returnValue__;
9998uint64_t MessageHandle::RecipientId()
const
10000 assert(state_ == DiscordObjectState::Owned);
10001 uint64_t returnValue__;
10003 return returnValue__;
10005bool MessageHandle::SentFromGame()
const
10007 assert(state_ == DiscordObjectState::Owned);
10008 bool returnValue__;
10010 return returnValue__;
10012uint64_t MessageHandle::SentTimestamp()
const
10014 assert(state_ == DiscordObjectState::Owned);
10015 uint64_t returnValue__;
10017 return returnValue__;
10019const AudioDevice AudioDevice::nullobj{{}, DiscordObjectState::Invalid};
10020AudioDevice::~AudioDevice()
10022 if (state_ == DiscordObjectState::Owned) {
10024 state_ = DiscordObjectState::Invalid;
10027AudioDevice::AudioDevice(AudioDevice&& other) noexcept
10028 : instance_(other.instance_)
10029 , state_(other.state_)
10031 other.state_ = DiscordObjectState::Invalid;
10033AudioDevice& AudioDevice::operator=(AudioDevice&& other)
noexcept
10035 if (
this != &other) {
10036 if (state_ == DiscordObjectState::Owned) {
10039 instance_ = other.instance_;
10040 state_ = other.state_;
10041 other.state_ = DiscordObjectState::Invalid;
10045AudioDevice::AudioDevice(
const AudioDevice& arg0)
10050 Discord_AudioDevice_Clone(&instance_, arg0.instance());
10052 state_ = DiscordObjectState::Owned;
10055AudioDevice& AudioDevice::operator=(
const AudioDevice& arg0)
10057 if (
this != &arg0) {
10058 if (state_ == DiscordObjectState::Owned) {
10060 state_ = DiscordObjectState::Invalid;
10062 if (arg0.state_ == DiscordObjectState::Owned) {
10065 state_ = DiscordObjectState::Owned;
10071 : instance_(instance)
10075void AudioDevice::Drop()
10077 if (state_ != DiscordObjectState::Owned) {
10081 state_ = DiscordObjectState::Invalid;
10085 assert(state_ == DiscordObjectState::Owned);
10086 bool returnValue__;
10088 return returnValue__;
10090std::string AudioDevice::Id()
const
10092 assert(state_ == DiscordObjectState::Owned);
10095 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
10096 returnValueNative__.
size);
10098 return returnValue__;
10100void AudioDevice::SetId(std::string Id)
10102 assert(state_ == DiscordObjectState::Owned);
10106std::string AudioDevice::Name()
const
10108 assert(state_ == DiscordObjectState::Owned);
10111 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
10112 returnValueNative__.
size);
10114 return returnValue__;
10116void AudioDevice::SetName(std::string Name)
10118 assert(state_ == DiscordObjectState::Owned);
10122bool AudioDevice::IsDefault()
const
10124 assert(state_ == DiscordObjectState::Owned);
10125 bool returnValue__;
10127 return returnValue__;
10129void AudioDevice::SetIsDefault(
bool IsDefault)
10131 assert(state_ == DiscordObjectState::Owned);
10134const VoiceSettings VoiceSettings::nullobj{{}, DiscordObjectState::Invalid};
10135VoiceSettings::~VoiceSettings()
10137 if (state_ == DiscordObjectState::Owned) {
10139 state_ = DiscordObjectState::Invalid;
10142VoiceSettings::VoiceSettings(VoiceSettings&& other) noexcept
10143 : instance_(other.instance_)
10144 , state_(other.state_)
10146 other.state_ = DiscordObjectState::Invalid;
10148VoiceSettings& VoiceSettings::operator=(VoiceSettings&& other)
noexcept
10150 if (
this != &other) {
10151 if (state_ == DiscordObjectState::Owned) {
10154 instance_ = other.instance_;
10155 state_ = other.state_;
10156 other.state_ = DiscordObjectState::Invalid;
10160VoiceSettings::VoiceSettings(
const VoiceSettings& arg0)
10165 Discord_VoiceSettings_Clone(&instance_, arg0.instance());
10167 state_ = DiscordObjectState::Owned;
10170VoiceSettings& VoiceSettings::operator=(
const VoiceSettings& arg0)
10172 if (
this != &arg0) {
10173 if (state_ == DiscordObjectState::Owned) {
10175 state_ = DiscordObjectState::Invalid;
10177 if (arg0.state_ == DiscordObjectState::Owned) {
10180 state_ = DiscordObjectState::Owned;
10186 : instance_(instance)
10190void VoiceSettings::Drop()
10192 if (state_ != DiscordObjectState::Owned) {
10196 state_ = DiscordObjectState::Invalid;
10198bool VoiceSettings::SelfMute()
const
10200 assert(state_ == DiscordObjectState::Owned);
10201 bool returnValue__;
10203 return returnValue__;
10205void VoiceSettings::SetSelfMute(
bool SelfMute)
10207 assert(state_ == DiscordObjectState::Owned);
10210bool VoiceSettings::SelfDeaf()
const
10212 assert(state_ == DiscordObjectState::Owned);
10213 bool returnValue__;
10215 return returnValue__;
10217void VoiceSettings::SetSelfDeaf(
bool SelfDeaf)
10219 assert(state_ == DiscordObjectState::Owned);
10224 assert(state_ == DiscordObjectState::Owned);
10231 assert(state_ == DiscordObjectState::Owned);
10235std::string VoiceSettings::PttKey()
const
10237 assert(state_ == DiscordObjectState::Owned);
10240 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
10241 returnValueNative__.
size);
10243 return returnValue__;
10245void VoiceSettings::SetPttKey(std::string PttKey)
10247 assert(state_ == DiscordObjectState::Owned);
10248 Discord_String PttKey__str{(uint8_t*)(PttKey.data()), PttKey.size()};
10251float VoiceSettings::InputVolume()
const
10253 assert(state_ == DiscordObjectState::Owned);
10254 float returnValue__;
10256 return returnValue__;
10258void VoiceSettings::SetInputVolume(
float InputVolume)
10260 assert(state_ == DiscordObjectState::Owned);
10263float VoiceSettings::OutputVolume()
const
10265 assert(state_ == DiscordObjectState::Owned);
10266 float returnValue__;
10268 return returnValue__;
10270void VoiceSettings::SetOutputVolume(
float OutputVolume)
10272 assert(state_ == DiscordObjectState::Owned);
10275bool VoiceSettings::AutomaticGainControl()
const
10277 assert(state_ == DiscordObjectState::Owned);
10278 bool returnValue__;
10280 return returnValue__;
10282void VoiceSettings::SetAutomaticGainControl(
bool AutomaticGainControl)
10284 assert(state_ == DiscordObjectState::Owned);
10287bool VoiceSettings::EchoCancellation()
const
10289 assert(state_ == DiscordObjectState::Owned);
10290 bool returnValue__;
10292 return returnValue__;
10294void VoiceSettings::SetEchoCancellation(
bool EchoCancellation)
10296 assert(state_ == DiscordObjectState::Owned);
10299bool VoiceSettings::NoiseSuppression()
const
10301 assert(state_ == DiscordObjectState::Owned);
10302 bool returnValue__;
10304 return returnValue__;
10306void VoiceSettings::SetNoiseSuppression(
bool NoiseSuppression)
10308 assert(state_ == DiscordObjectState::Owned);
10311bool VoiceSettings::NoiseCancellation()
const
10313 assert(state_ == DiscordObjectState::Owned);
10314 bool returnValue__;
10316 return returnValue__;
10318void VoiceSettings::SetNoiseCancellation(
bool NoiseCancellation)
10320 assert(state_ == DiscordObjectState::Owned);
10323const UserMessageSummary UserMessageSummary::nullobj{{}, DiscordObjectState::Invalid};
10324UserMessageSummary::~UserMessageSummary()
10326 if (state_ == DiscordObjectState::Owned) {
10328 state_ = DiscordObjectState::Invalid;
10331UserMessageSummary::UserMessageSummary(UserMessageSummary&& other) noexcept
10332 : instance_(other.instance_)
10333 , state_(other.state_)
10335 other.state_ = DiscordObjectState::Invalid;
10337UserMessageSummary& UserMessageSummary::operator=(UserMessageSummary&& other)
noexcept
10339 if (
this != &other) {
10340 if (state_ == DiscordObjectState::Owned) {
10343 instance_ = other.instance_;
10344 state_ = other.state_;
10345 other.state_ = DiscordObjectState::Invalid;
10349UserMessageSummary::UserMessageSummary(
const UserMessageSummary& arg0)
10354 Discord_UserMessageSummary_Clone(&instance_, arg0.instance());
10356 state_ = DiscordObjectState::Owned;
10359UserMessageSummary& UserMessageSummary::operator=(
const UserMessageSummary& arg0)
10361 if (
this != &arg0) {
10362 if (state_ == DiscordObjectState::Owned) {
10364 state_ = DiscordObjectState::Invalid;
10366 if (arg0.state_ == DiscordObjectState::Owned) {
10369 state_ = DiscordObjectState::Owned;
10375 DiscordObjectState state)
10376 : instance_(instance)
10380void UserMessageSummary::Drop()
10382 if (state_ != DiscordObjectState::Owned) {
10386 state_ = DiscordObjectState::Invalid;
10388uint64_t UserMessageSummary::LastMessageId()
const
10390 assert(state_ == DiscordObjectState::Owned);
10391 uint64_t returnValue__;
10393 return returnValue__;
10395uint64_t UserMessageSummary::UserId()
const
10397 assert(state_ == DiscordObjectState::Owned);
10398 uint64_t returnValue__;
10400 return returnValue__;
10402const ClientCreateOptions ClientCreateOptions::nullobj{{}, DiscordObjectState::Invalid};
10403ClientCreateOptions::~ClientCreateOptions()
10405 if (state_ == DiscordObjectState::Owned) {
10407 state_ = DiscordObjectState::Invalid;
10410ClientCreateOptions::ClientCreateOptions(ClientCreateOptions&& other) noexcept
10411 : instance_(other.instance_)
10412 , state_(other.state_)
10414 other.state_ = DiscordObjectState::Invalid;
10416ClientCreateOptions& ClientCreateOptions::operator=(ClientCreateOptions&& other)
noexcept
10418 if (
this != &other) {
10419 if (state_ == DiscordObjectState::Owned) {
10422 instance_ = other.instance_;
10423 state_ = other.state_;
10424 other.state_ = DiscordObjectState::Invalid;
10428ClientCreateOptions::ClientCreateOptions(
const ClientCreateOptions& arg0)
10433 Discord_ClientCreateOptions_Clone(&instance_, arg0.instance());
10435 state_ = DiscordObjectState::Owned;
10438ClientCreateOptions& ClientCreateOptions::operator=(
const ClientCreateOptions& arg0)
10440 if (
this != &arg0) {
10441 if (state_ == DiscordObjectState::Owned) {
10443 state_ = DiscordObjectState::Invalid;
10445 if (arg0.state_ == DiscordObjectState::Owned) {
10448 state_ = DiscordObjectState::Owned;
10454 DiscordObjectState state)
10455 : instance_(instance)
10459ClientCreateOptions::ClientCreateOptions()
10461 assert(state_ == DiscordObjectState::Invalid);
10463 state_ = DiscordObjectState::Owned;
10465void ClientCreateOptions::Drop()
10467 if (state_ != DiscordObjectState::Owned) {
10471 state_ = DiscordObjectState::Invalid;
10473std::string ClientCreateOptions::WebBase()
const
10475 assert(state_ == DiscordObjectState::Owned);
10478 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
10479 returnValueNative__.
size);
10481 return returnValue__;
10483void ClientCreateOptions::SetWebBase(std::string WebBase)
10485 assert(state_ == DiscordObjectState::Owned);
10486 Discord_String WebBase__str{(uint8_t*)(WebBase.data()), WebBase.size()};
10489std::string ClientCreateOptions::ApiBase()
const
10491 assert(state_ == DiscordObjectState::Owned);
10494 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
10495 returnValueNative__.
size);
10497 return returnValue__;
10499void ClientCreateOptions::SetApiBase(std::string ApiBase)
10501 assert(state_ == DiscordObjectState::Owned);
10502 Discord_String ApiBase__str{(uint8_t*)(ApiBase.data()), ApiBase.size()};
10507 assert(state_ == DiscordObjectState::Owned);
10514 assert(state_ == DiscordObjectState::Owned);
10518bool ClientCreateOptions::ExperimentalAndroidPreventCommsForBluetooth()
const
10520 assert(state_ == DiscordObjectState::Owned);
10521 bool returnValue__;
10524 return returnValue__;
10526void ClientCreateOptions::SetExperimentalAndroidPreventCommsForBluetooth(
10527 bool ExperimentalAndroidPreventCommsForBluetooth)
10529 assert(state_ == DiscordObjectState::Owned);
10531 &instance_, ExperimentalAndroidPreventCommsForBluetooth);
10533std::optional<uint64_t> ClientCreateOptions::CpuAffinityMask()
const
10535 assert(state_ == DiscordObjectState::Owned);
10536 bool returnIsNonNull__;
10537 uint64_t returnValue__;
10539 if (!returnIsNonNull__) {
10540 return std::nullopt;
10542 return returnValue__;
10544void ClientCreateOptions::SetCpuAffinityMask(std::optional<uint64_t> CpuAffinityMask)
10546 assert(state_ == DiscordObjectState::Owned);
10548 &instance_, (CpuAffinityMask.has_value() ? &*CpuAffinityMask :
nullptr));
10550const Client Client::nullobj{{}, DiscordObjectState::Invalid};
10553 if (state_ == DiscordObjectState::Owned) {
10555 state_ = DiscordObjectState::Invalid;
10558Client::Client(Client&& other) noexcept
10559 : instance_(other.instance_)
10560 , state_(other.state_)
10562 other.state_ = DiscordObjectState::Invalid;
10564Client& Client::operator=(Client&& other)
noexcept
10566 if (
this != &other) {
10567 if (state_ == DiscordObjectState::Owned) {
10570 instance_ = other.instance_;
10571 state_ = other.state_;
10572 other.state_ = DiscordObjectState::Invalid;
10576Client::Client(
Discord_Client instance, DiscordObjectState state)
10577 : instance_(instance)
10583 assert(state_ == DiscordObjectState::Invalid);
10585 state_ = DiscordObjectState::Owned;
10587Client::Client(std::string apiBase, std::string webBase)
10589 assert(state_ == DiscordObjectState::Invalid);
10590 Discord_String apiBase__str{(uint8_t*)(apiBase.data()), apiBase.size()};
10591 Discord_String webBase__str{(uint8_t*)(webBase.data()), webBase.size()};
10593 state_ = DiscordObjectState::Owned;
10597 assert(state_ == DiscordObjectState::Invalid);
10599 state_ = DiscordObjectState::Owned;
10603 if (state_ != DiscordObjectState::Owned) {
10607 state_ = DiscordObjectState::Invalid;
10613 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
10614 returnValueNative__.
size);
10616 return returnValue__;
10618uint64_t Client::GetApplicationId()
10620 assert(state_ == DiscordObjectState::Owned);
10621 uint64_t returnValue__;
10623 return returnValue__;
10627 assert(state_ == DiscordObjectState::Owned);
10631 return returnValue__;
10633std::string Client::GetDefaultAudioDeviceId()
10637 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
10638 returnValueNative__.
size);
10640 return returnValue__;
10642std::string Client::GetDefaultCommunicationScopes()
10646 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
10647 returnValueNative__.
size);
10649 return returnValue__;
10651std::string Client::GetDefaultPresenceScopes()
10655 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
10656 returnValueNative__.
size);
10658 return returnValue__;
10660std::string Client::GetVersionHash()
10664 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
10665 returnValueNative__.
size);
10667 return returnValue__;
10669int32_t Client::GetVersionMajor()
10671 int32_t returnValue__;
10673 return returnValue__;
10675int32_t Client::GetVersionMinor()
10677 int32_t returnValue__;
10679 return returnValue__;
10681int32_t Client::GetVersionPatch()
10683 int32_t returnValue__;
10685 return returnValue__;
10687void Client::SetHttpRequestTimeout(int32_t httpTimeoutInMilliseconds)
10689 assert(state_ == DiscordObjectState::Owned);
10696 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
10697 returnValueNative__.
size);
10699 return returnValue__;
10705 std::string returnValue__(
reinterpret_cast<char*
>(returnValueNative__.
ptr),
10706 returnValueNative__.
size);
10708 return returnValue__;
10712 assert(state_ == DiscordObjectState::Owned);
10713 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
10714 auto callback__userData =
new Tcallback__UserData(callback);
10716 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
10717 userData__typed->delegate();
10720 &instance_, channelId, callback__native, Tcallback__UserData::Free, callback__userData);
10724 assert(state_ == DiscordObjectState::Owned);
10725 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
10726 auto callback__userData =
new Tcallback__UserData(callback);
10728 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
10729 userData__typed->delegate();
10732 &instance_, callback__native, Tcallback__UserData::Free, callback__userData);
10736 assert(state_ == DiscordObjectState::Owned);
10737 bool returnIsNonNull__;
10741 returnValueNative__,
10742 returnIsNonNull__ ? DiscordObjectState::Owned : DiscordObjectState::Invalid);
10743 return returnValue__;
10745std::vector<discordpp::Call> Client::GetCalls()
10747 assert(state_ == DiscordObjectState::Owned);
10750 std::vector<discordpp::Call> returnValue__;
10751 returnValue__.reserve(returnValueNative__.
size);
10752 for (
size_t i__ = 0; i__ < returnValueNative__.
size; ++i__) {
10753 returnValue__.emplace_back(returnValueNative__.
ptr[i__], DiscordObjectState::Owned);
10756 return returnValue__;
10760 assert(state_ == DiscordObjectState::Owned);
10761 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
10762 auto cb__userData =
new Tcb__UserData(cb);
10764 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
10766 userData__typed->delegate(std::move(device__obj));
10772 assert(state_ == DiscordObjectState::Owned);
10773 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
10774 auto cb__userData =
new Tcb__UserData(cb);
10776 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
10778 userData__typed->delegate(std::move(device__obj));
10781 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
10785 assert(state_ == DiscordObjectState::Owned);
10786 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
10787 auto cb__userData =
new Tcb__UserData(cb);
10789 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
10790 std::vector<discordpp::AudioDevice> devices__vec;
10791 devices__vec.reserve(devices.size);
10792 for (
size_t i__ = 0; i__ < devices.size; ++i__) {
10793 devices__vec.emplace_back(devices.ptr[i__], DiscordObjectState::Owned);
10796 userData__typed->delegate(std::move(devices__vec));
10800float Client::GetInputVolume()
10802 assert(state_ == DiscordObjectState::Owned);
10803 float returnValue__;
10805 return returnValue__;
10809 assert(state_ == DiscordObjectState::Owned);
10810 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
10811 auto cb__userData =
new Tcb__UserData(cb);
10813 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
10814 std::vector<discordpp::AudioDevice> devices__vec;
10815 devices__vec.reserve(devices.size);
10816 for (
size_t i__ = 0; i__ < devices.size; ++i__) {
10817 devices__vec.emplace_back(devices.ptr[i__], DiscordObjectState::Owned);
10820 userData__typed->delegate(std::move(devices__vec));
10824float Client::GetOutputVolume()
10826 assert(state_ == DiscordObjectState::Owned);
10827 float returnValue__;
10829 return returnValue__;
10831bool Client::GetSelfDeafAll()
const
10833 assert(state_ == DiscordObjectState::Owned);
10834 bool returnValue__;
10836 return returnValue__;
10838bool Client::GetSelfMuteAll()
const
10840 assert(state_ == DiscordObjectState::Owned);
10841 bool returnValue__;
10843 return returnValue__;
10847 assert(state_ == DiscordObjectState::Owned);
10848 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
10849 auto cb__userData =
new Tcb__UserData(cb);
10851 [](
auto result,
auto settings,
void* userData__) {
10852 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
10855 userData__typed->delegate(std::move(result__obj), std::move(settings__obj));
10859void Client::SetAecDump(
bool on)
10861 assert(state_ == DiscordObjectState::Owned);
10864void Client::SetAutomaticGainControl(
bool on)
10866 assert(state_ == DiscordObjectState::Owned);
10871 assert(state_ == DiscordObjectState::Owned);
10872 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
10873 auto callback__userData =
new Tcallback__UserData(callback);
10875 [](
auto inputDevices,
auto outputDevices,
void* userData__) {
10876 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
10877 std::vector<discordpp::AudioDevice> inputDevices__vec;
10878 inputDevices__vec.reserve(inputDevices.size);
10879 for (
size_t i__ = 0; i__ < inputDevices.size; ++i__) {
10880 inputDevices__vec.emplace_back(inputDevices.ptr[i__], DiscordObjectState::Owned);
10883 std::vector<discordpp::AudioDevice> outputDevices__vec;
10884 outputDevices__vec.reserve(outputDevices.size);
10885 for (
size_t i__ = 0; i__ < outputDevices.size; ++i__) {
10886 outputDevices__vec.emplace_back(outputDevices.ptr[i__], DiscordObjectState::Owned);
10889 userData__typed->delegate(std::move(inputDevices__vec), std::move(outputDevices__vec));
10892 &instance_, callback__native, Tcallback__UserData::Free, callback__userData);
10894void Client::SetEchoCancellation(
bool on)
10896 assert(state_ == DiscordObjectState::Owned);
10899void Client::SetEngineManagedAudioSession(
bool isEngineManaged)
10901 assert(state_ == DiscordObjectState::Owned);
10906 assert(state_ == DiscordObjectState::Owned);
10907 Discord_String deviceId__str{(uint8_t*)(deviceId.data()), deviceId.size()};
10908 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
10909 auto cb__userData =
new Tcb__UserData(cb);
10911 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
10913 userData__typed->delegate(std::move(result__obj));
10916 &instance_, deviceId__str, cb__native, Tcb__UserData::Free, cb__userData);
10918void Client::SetInputVolume(
float inputVolume)
10920 assert(state_ == DiscordObjectState::Owned);
10925 assert(state_ == DiscordObjectState::Owned);
10926 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
10927 auto callback__userData =
new Tcallback__UserData(callback);
10929 void* userData__) {
10930 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
10931 userData__typed->delegate(inputDetected);
10934 &instance_, callback__native, Tcallback__UserData::Free, callback__userData);
10936void Client::SetNoAudioInputThreshold(
float dBFSThreshold)
10938 assert(state_ == DiscordObjectState::Owned);
10941void Client::SetNoiseCancellation(
bool on)
10943 assert(state_ == DiscordObjectState::Owned);
10946void Client::SetNoiseSuppression(
bool on)
10948 assert(state_ == DiscordObjectState::Owned);
10951void Client::SetOpusHardwareCoding(
bool encode,
bool decode)
10953 assert(state_ == DiscordObjectState::Owned);
10958 assert(state_ == DiscordObjectState::Owned);
10959 Discord_String deviceId__str{(uint8_t*)(deviceId.data()), deviceId.size()};
10960 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
10961 auto cb__userData =
new Tcb__UserData(cb);
10963 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
10965 userData__typed->delegate(std::move(result__obj));
10968 &instance_, deviceId__str, cb__native, Tcb__UserData::Free, cb__userData);
10970void Client::SetOutputVolume(
float outputVolume)
10972 assert(state_ == DiscordObjectState::Owned);
10975void Client::SetSelfDeafAll(
bool deaf)
10977 assert(state_ == DiscordObjectState::Owned);
10980void Client::SetSelfMuteAll(
bool mute)
10982 assert(state_ == DiscordObjectState::Owned);
10985bool Client::SetSpeakerMode(
bool speakerMode)
10987 assert(state_ == DiscordObjectState::Owned);
10988 bool returnValue__;
10990 return returnValue__;
10994 assert(state_ == DiscordObjectState::Owned);
10998void Client::SetVoiceParticipantChangedCallback(
11001 assert(state_ == DiscordObjectState::Owned);
11002 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
11003 auto cb__userData =
new Tcb__UserData(cb);
11005 [](
auto lobbyId,
auto memberId,
auto added,
void* userData__) {
11006 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
11007 userData__typed->delegate(lobbyId, memberId, added);
11010 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
11012void Client::SetVoiceSettingsUpdatedCallback(
11015 assert(state_ == DiscordObjectState::Owned);
11016 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
11017 auto callback__userData =
new Tcallback__UserData(callback);
11019 void* userData__) {
11020 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
11022 userData__typed->delegate(std::move(settings__obj));
11025 &instance_, callback__native, Tcallback__UserData::Free, callback__userData);
11027bool Client::ShowAudioRoutePicker()
11029 assert(state_ == DiscordObjectState::Owned);
11030 bool returnValue__;
11032 return returnValue__;
11036 assert(state_ == DiscordObjectState::Owned);
11037 bool returnIsNonNull__;
11041 returnValueNative__,
11042 returnIsNonNull__ ? DiscordObjectState::Owned : DiscordObjectState::Invalid);
11043 return returnValue__;
11050 assert(state_ == DiscordObjectState::Owned);
11051 bool returnIsNonNull__;
11053 using TreceivedCb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(receivedCb)>>;
11054 auto receivedCb__userData =
new TreceivedCb__UserData(receivedCb);
11057 auto samplesPerChannel,
11060 auto outShouldMute,
11061 void* userData__) {
11062 auto userData__typed =
static_cast<TreceivedCb__UserData*
>(userData__);
11063 userData__typed->delegate(
11064 userId, data, samplesPerChannel, sampleRate, channels, *outShouldMute);
11066 using TcapturedCb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(capturedCb)>>;
11067 auto capturedCb__userData =
new TcapturedCb__UserData(capturedCb);
11069 [](
auto data,
auto samplesPerChannel,
auto sampleRate,
auto channels,
void* userData__) {
11070 auto userData__typed =
static_cast<TcapturedCb__UserData*
>(userData__);
11071 userData__typed->delegate(data, samplesPerChannel, sampleRate, channels);
11075 receivedCb__native,
11076 TreceivedCb__UserData::Free,
11077 receivedCb__userData,
11078 capturedCb__native,
11079 TcapturedCb__UserData::Free,
11080 capturedCb__userData,
11081 &returnValueNative__);
11083 returnValueNative__,
11084 returnIsNonNull__ ? DiscordObjectState::Owned : DiscordObjectState::Invalid);
11085 return returnValue__;
11087void Client::AbortAuthorize()
11089 assert(state_ == DiscordObjectState::Owned);
11092void Client::AbortGetTokenFromDevice()
11094 assert(state_ == DiscordObjectState::Owned);
11100 assert(state_ == DiscordObjectState::Owned);
11101 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
11102 auto callback__userData =
new Tcallback__UserData(callback);
11104 [](
auto result,
auto code,
auto redirectUri,
void* userData__) {
11105 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
11107 std::string code__str(
reinterpret_cast<char*
>(code.ptr), code.size);
11108 std::string redirectUri__str(
reinterpret_cast<char*
>(redirectUri.ptr), redirectUri.size);
11109 userData__typed->delegate(
11110 std::move(result__obj), std::move(code__str), std::move(redirectUri__str));
11115 &instance_,
args.instance(), callback__native, Tcallback__UserData::Free, callback__userData);
11117void Client::CloseAuthorizeDeviceScreen()
11119 assert(state_ == DiscordObjectState::Owned);
11124 assert(state_ == DiscordObjectState::Owned);
11128 DiscordObjectState::Owned);
11129 return returnValue__;
11131void Client::ExchangeChildToken(std::string
const& parentApplicationToken,
11132 uint64_t childApplicationId,
11135 assert(state_ == DiscordObjectState::Owned);
11136 Discord_String parentApplicationToken__str{(uint8_t*)(parentApplicationToken.data()),
11137 parentApplicationToken.size()};
11138 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
11139 auto callback__userData =
new Tcallback__UserData(callback);
11145 void* userData__) {
11146 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
11148 std::string accessToken__str(
reinterpret_cast<char*
>(accessToken.ptr), accessToken.size);
11149 std::string scopes__str(
reinterpret_cast<char*
>(scopes.ptr), scopes.size);
11150 userData__typed->delegate(std::move(result__obj),
11151 std::move(accessToken__str),
11154 std::move(scopes__str));
11159 parentApplicationToken__str,
11160 childApplicationId,
11162 Tcallback__UserData::Free,
11163 callback__userData);
11166 std::string
const& token,
11169 assert(state_ == DiscordObjectState::Owned);
11170 Discord_String token__str{(uint8_t*)(token.data()), token.size()};
11171 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
11172 auto callback__userData =
new Tcallback__UserData(callback);
11174 [](
auto result,
auto id,
auto name,
void* userData__) {
11175 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
11177 std::string name__str(
reinterpret_cast<char*
>(name.ptr), name.size);
11178 userData__typed->delegate(std::move(result__obj),
id, std::move(name__str));
11185 Tcallback__UserData::Free,
11186 callback__userData);
11188void Client::GetProvisionalToken(uint64_t applicationId,
11190 std::string
const& externalAuthToken,
11193 assert(state_ == DiscordObjectState::Owned);
11194 Discord_String externalAuthToken__str{(uint8_t*)(externalAuthToken.data()),
11195 externalAuthToken.size()};
11196 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
11197 auto callback__userData =
new Tcallback__UserData(callback);
11204 void* userData__) {
11205 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
11207 std::string accessToken__str(
reinterpret_cast<char*
>(accessToken.ptr), accessToken.size);
11208 std::string refreshToken__str(
reinterpret_cast<char*
>(refreshToken.ptr), refreshToken.size);
11209 std::string scopes__str(
reinterpret_cast<char*
>(scopes.ptr), scopes.size);
11210 userData__typed->delegate(std::move(result__obj),
11211 std::move(accessToken__str),
11212 std::move(refreshToken__str),
11215 std::move(scopes__str));
11224 externalAuthToken__str,
11226 Tcallback__UserData::Free,
11227 callback__userData);
11229void Client::GetToken(uint64_t applicationId,
11230 std::string
const& code,
11231 std::string
const& codeVerifier,
11232 std::string
const& redirectUri,
11235 assert(state_ == DiscordObjectState::Owned);
11237 Discord_String codeVerifier__str{(uint8_t*)(codeVerifier.data()), codeVerifier.size()};
11238 Discord_String redirectUri__str{(uint8_t*)(redirectUri.data()), redirectUri.size()};
11239 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
11240 auto callback__userData =
new Tcallback__UserData(callback);
11247 void* userData__) {
11248 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
11250 std::string accessToken__str(
reinterpret_cast<char*
>(accessToken.ptr), accessToken.size);
11251 std::string refreshToken__str(
reinterpret_cast<char*
>(refreshToken.ptr), refreshToken.size);
11252 std::string scopes__str(
reinterpret_cast<char*
>(scopes.ptr), scopes.size);
11253 userData__typed->delegate(std::move(result__obj),
11254 std::move(accessToken__str),
11255 std::move(refreshToken__str),
11258 std::move(scopes__str));
11269 Tcallback__UserData::Free,
11270 callback__userData);
11275 assert(state_ == DiscordObjectState::Owned);
11276 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
11277 auto callback__userData =
new Tcallback__UserData(callback);
11284 void* userData__) {
11285 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
11287 std::string accessToken__str(
reinterpret_cast<char*
>(accessToken.ptr), accessToken.size);
11288 std::string refreshToken__str(
reinterpret_cast<char*
>(refreshToken.ptr), refreshToken.size);
11289 std::string scopes__str(
reinterpret_cast<char*
>(scopes.ptr), scopes.size);
11290 userData__typed->delegate(std::move(result__obj),
11291 std::move(accessToken__str),
11292 std::move(refreshToken__str),
11295 std::move(scopes__str));
11301 &instance_,
args.instance(), callback__native, Tcallback__UserData::Free, callback__userData);
11303void Client::GetTokenFromDeviceProvisionalMerge(
11306 std::string
const& externalAuthToken,
11309 assert(state_ == DiscordObjectState::Owned);
11310 Discord_String externalAuthToken__str{(uint8_t*)(externalAuthToken.data()),
11311 externalAuthToken.size()};
11312 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
11313 auto callback__userData =
new Tcallback__UserData(callback);
11320 void* userData__) {
11321 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
11323 std::string accessToken__str(
reinterpret_cast<char*
>(accessToken.ptr), accessToken.size);
11324 std::string refreshToken__str(
reinterpret_cast<char*
>(refreshToken.ptr), refreshToken.size);
11325 std::string scopes__str(
reinterpret_cast<char*
>(scopes.ptr), scopes.size);
11326 userData__typed->delegate(std::move(result__obj),
11327 std::move(accessToken__str),
11328 std::move(refreshToken__str),
11331 std::move(scopes__str));
11340 externalAuthToken__str,
11342 Tcallback__UserData::Free,
11343 callback__userData);
11345void Client::GetTokenFromProvisionalMerge(
11346 uint64_t applicationId,
11347 std::string
const& code,
11348 std::string
const& codeVerifier,
11349 std::string
const& redirectUri,
11351 std::string
const& externalAuthToken,
11354 assert(state_ == DiscordObjectState::Owned);
11356 Discord_String codeVerifier__str{(uint8_t*)(codeVerifier.data()), codeVerifier.size()};
11357 Discord_String redirectUri__str{(uint8_t*)(redirectUri.data()), redirectUri.size()};
11358 Discord_String externalAuthToken__str{(uint8_t*)(externalAuthToken.data()),
11359 externalAuthToken.size()};
11360 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
11361 auto callback__userData =
new Tcallback__UserData(callback);
11368 void* userData__) {
11369 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
11371 std::string accessToken__str(
reinterpret_cast<char*
>(accessToken.ptr), accessToken.size);
11372 std::string refreshToken__str(
reinterpret_cast<char*
>(refreshToken.ptr), refreshToken.size);
11373 std::string scopes__str(
reinterpret_cast<char*
>(scopes.ptr), scopes.size);
11374 userData__typed->delegate(std::move(result__obj),
11375 std::move(accessToken__str),
11376 std::move(refreshToken__str),
11379 std::move(scopes__str));
11391 externalAuthToken__str,
11393 Tcallback__UserData::Free,
11394 callback__userData);
11396bool Client::IsAuthenticated()
11398 assert(state_ == DiscordObjectState::Owned);
11399 bool returnValue__;
11401 return returnValue__;
11403void Client::OpenAuthorizeDeviceScreen(uint64_t clientId, std::string
const& userCode)
11405 assert(state_ == DiscordObjectState::Owned);
11406 Discord_String userCode__str{(uint8_t*)(userCode.data()), userCode.size()};
11409void Client::ProvisionalUserMergeCompleted(
bool success)
11411 assert(state_ == DiscordObjectState::Owned);
11414void Client::RefreshToken(uint64_t applicationId,
11415 std::string
const& refreshToken,
11418 assert(state_ == DiscordObjectState::Owned);
11419 Discord_String refreshToken__str{(uint8_t*)(refreshToken.data()), refreshToken.size()};
11420 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
11421 auto callback__userData =
new Tcallback__UserData(callback);
11428 void* userData__) {
11429 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
11431 std::string accessToken__str(
reinterpret_cast<char*
>(accessToken.ptr), accessToken.size);
11432 std::string refreshToken__str(
reinterpret_cast<char*
>(refreshToken.ptr), refreshToken.size);
11433 std::string scopes__str(
reinterpret_cast<char*
>(scopes.ptr), scopes.size);
11434 userData__typed->delegate(std::move(result__obj),
11435 std::move(accessToken__str),
11436 std::move(refreshToken__str),
11439 std::move(scopes__str));
11448 Tcallback__UserData::Free,
11449 callback__userData);
11453 assert(state_ == DiscordObjectState::Owned);
11454 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
11455 auto callback__userData =
new Tcallback__UserData(callback);
11457 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
11458 userData__typed->delegate();
11461 &instance_, callback__native, Tcallback__UserData::Free, callback__userData);
11463void Client::RemoveAuthorizeRequestCallback()
11465 assert(state_ == DiscordObjectState::Owned);
11468void Client::RevokeToken(uint64_t applicationId,
11469 std::string
const& token,
11472 assert(state_ == DiscordObjectState::Owned);
11473 Discord_String token__str{(uint8_t*)(token.data()), token.size()};
11474 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
11475 auto callback__userData =
new Tcallback__UserData(callback);
11477 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
11479 userData__typed->delegate(std::move(result__obj));
11485 Tcallback__UserData::Free,
11486 callback__userData);
11488void Client::SetAuthorizeDeviceScreenClosedCallback(
11491 assert(state_ == DiscordObjectState::Owned);
11492 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
11493 auto cb__userData =
new Tcb__UserData(cb);
11495 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
11496 userData__typed->delegate();
11499 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
11501void Client::SetGameWindowPid(int32_t pid)
11503 assert(state_ == DiscordObjectState::Owned);
11508 assert(state_ == DiscordObjectState::Owned);
11509 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
11510 auto callback__userData =
new Tcallback__UserData(callback);
11512 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
11513 userData__typed->delegate();
11516 &instance_, callback__native, Tcallback__UserData::Free, callback__userData);
11518void Client::UnmergeIntoProvisionalAccount(
11519 uint64_t applicationId,
11521 std::string
const& externalAuthToken,
11524 assert(state_ == DiscordObjectState::Owned);
11525 Discord_String externalAuthToken__str{(uint8_t*)(externalAuthToken.data()),
11526 externalAuthToken.size()};
11527 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
11528 auto callback__userData =
new Tcallback__UserData(callback);
11530 void* userData__) {
11531 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
11533 userData__typed->delegate(std::move(result__obj));
11539 externalAuthToken__str,
11541 Tcallback__UserData::Free,
11542 callback__userData);
11544void Client::UpdateProvisionalAccountDisplayName(
11545 std::string
const& name,
11548 assert(state_ == DiscordObjectState::Owned);
11550 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
11551 auto callback__userData =
new Tcallback__UserData(callback);
11553 [](
auto result,
void* userData__) {
11554 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
11556 userData__typed->delegate(std::move(result__obj));
11559 &instance_, name__str, callback__native, Tcallback__UserData::Free, callback__userData);
11565 assert(state_ == DiscordObjectState::Owned);
11566 Discord_String token__str{(uint8_t*)(token.data()), token.size()};
11567 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
11568 auto callback__userData =
new Tcallback__UserData(callback);
11570 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
11572 userData__typed->delegate(std::move(result__obj));
11578 Tcallback__UserData::Free,
11579 callback__userData);
11581bool Client::CanOpenMessageInDiscord(uint64_t messageId)
11583 assert(state_ == DiscordObjectState::Owned);
11584 bool returnValue__;
11586 return returnValue__;
11588void Client::DeleteUserMessage(uint64_t recipientId,
11589 uint64_t messageId,
11592 assert(state_ == DiscordObjectState::Owned);
11593 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
11594 auto cb__userData =
new Tcb__UserData(cb);
11596 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
11598 userData__typed->delegate(std::move(result__obj));
11601 &instance_, recipientId, messageId, cb__native, Tcb__UserData::Free, cb__userData);
11603void Client::EditUserMessage(uint64_t recipientId,
11604 uint64_t messageId,
11605 std::string
const& content,
11608 assert(state_ == DiscordObjectState::Owned);
11609 Discord_String content__str{(uint8_t*)(content.data()), content.size()};
11610 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
11611 auto cb__userData =
new Tcb__UserData(cb);
11613 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
11615 userData__typed->delegate(std::move(result__obj));
11622 Tcb__UserData::Free,
11625std::optional<discordpp::ChannelHandle> Client::GetChannelHandle(uint64_t channelId)
const
11627 assert(state_ == DiscordObjectState::Owned);
11628 bool returnIsNonNull__;
11630 returnIsNonNull__ =
11632 if (!returnIsNonNull__) {
11636 return returnValue__;
11638void Client::GetLobbyMessagesWithLimit(uint64_t lobbyId,
11642 assert(state_ == DiscordObjectState::Owned);
11643 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
11644 auto cb__userData =
new Tcb__UserData(cb);
11646 [](
auto result,
auto messages,
void* userData__) {
11647 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
11649 std::vector<discordpp::MessageHandle> messages__vec;
11650 messages__vec.reserve(
messages.size);
11651 for (
size_t i__ = 0; i__ <
messages.size; ++i__) {
11652 messages__vec.emplace_back(
messages.ptr[i__], DiscordObjectState::Owned);
11655 userData__typed->delegate(std::move(result__obj), std::move(messages__vec));
11658 &instance_, lobbyId, limit, cb__native, Tcb__UserData::Free, cb__userData);
11660std::optional<discordpp::MessageHandle> Client::GetMessageHandle(uint64_t messageId)
const
11662 assert(state_ == DiscordObjectState::Owned);
11663 bool returnIsNonNull__;
11665 returnIsNonNull__ =
11667 if (!returnIsNonNull__) {
11671 return returnValue__;
11675 assert(state_ == DiscordObjectState::Owned);
11676 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
11677 auto cb__userData =
new Tcb__UserData(cb);
11679 [](
auto result,
auto summaries,
void* userData__) {
11680 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
11682 std::vector<discordpp::UserMessageSummary> summaries__vec;
11683 summaries__vec.reserve(summaries.size);
11684 for (
size_t i__ = 0; i__ < summaries.size; ++i__) {
11685 summaries__vec.emplace_back(summaries.ptr[i__], DiscordObjectState::Owned);
11688 userData__typed->delegate(std::move(result__obj), std::move(summaries__vec));
11691 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
11693void Client::GetUserMessagesWithLimit(uint64_t recipientId,
11697 assert(state_ == DiscordObjectState::Owned);
11698 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
11699 auto cb__userData =
new Tcb__UserData(cb);
11701 [](
auto result,
auto messages,
void* userData__) {
11702 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
11704 std::vector<discordpp::MessageHandle> messages__vec;
11705 messages__vec.reserve(
messages.size);
11706 for (
size_t i__ = 0; i__ <
messages.size; ++i__) {
11707 messages__vec.emplace_back(
messages.ptr[i__], DiscordObjectState::Owned);
11710 userData__typed->delegate(std::move(result__obj), std::move(messages__vec));
11713 &instance_, recipientId, limit, cb__native, Tcb__UserData::Free, cb__userData);
11715void Client::OpenMessageInDiscord(
11716 uint64_t messageId,
11720 assert(state_ == DiscordObjectState::Owned);
11721 using TprovisionalUserMergeRequiredCallback__UserData =
11722 TDelegateUserData<std::remove_reference_t<
decltype(provisionalUserMergeRequiredCallback)>>;
11723 auto provisionalUserMergeRequiredCallback__userData =
11724 new TprovisionalUserMergeRequiredCallback__UserData(provisionalUserMergeRequiredCallback);
11726 provisionalUserMergeRequiredCallback__native = [](
void* userData__) {
11727 auto userData__typed =
11728 static_cast<TprovisionalUserMergeRequiredCallback__UserData*
>(userData__);
11729 userData__typed->delegate();
11731 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
11732 auto callback__userData =
new Tcallback__UserData(callback);
11734 void* userData__) {
11735 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
11737 userData__typed->delegate(std::move(result__obj));
11741 provisionalUserMergeRequiredCallback__native,
11742 TprovisionalUserMergeRequiredCallback__UserData::Free,
11743 provisionalUserMergeRequiredCallback__userData,
11745 Tcallback__UserData::Free,
11746 callback__userData);
11748void Client::SendLobbyMessage(uint64_t lobbyId,
11749 std::string
const& content,
11752 assert(state_ == DiscordObjectState::Owned);
11753 Discord_String content__str{(uint8_t*)(content.data()), content.size()};
11754 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
11755 auto cb__userData =
new Tcb__UserData(cb);
11757 [](
auto result,
auto messageId,
void* userData__) {
11758 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
11760 userData__typed->delegate(std::move(result__obj), messageId);
11763 &instance_, lobbyId, content__str, cb__native, Tcb__UserData::Free, cb__userData);
11765void Client::SendLobbyMessageWithMetadata(
11767 std::string
const& content,
11768 std::unordered_map<std::string, std::string>
const& metadata,
11771 assert(state_ == DiscordObjectState::Owned);
11772 Discord_String content__str{(uint8_t*)(content.data()), content.size()};
11773 ConvertedProperties metadata__convert(metadata);
11774 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
11775 auto cb__userData =
new Tcb__UserData(cb);
11777 [](
auto result,
auto messageId,
void* userData__) {
11778 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
11780 userData__typed->delegate(std::move(result__obj), messageId);
11785 metadata__convert.Properties,
11787 Tcb__UserData::Free,
11790void Client::SendUserMessage(uint64_t recipientId,
11791 std::string
const& content,
11794 assert(state_ == DiscordObjectState::Owned);
11795 Discord_String content__str{(uint8_t*)(content.data()), content.size()};
11796 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
11797 auto cb__userData =
new Tcb__UserData(cb);
11799 [](
auto result,
auto messageId,
void* userData__) {
11800 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
11802 userData__typed->delegate(std::move(result__obj), messageId);
11805 &instance_, recipientId, content__str, cb__native, Tcb__UserData::Free, cb__userData);
11807void Client::SendUserMessageWithMetadata(
11808 uint64_t recipientId,
11809 std::string
const& content,
11810 std::unordered_map<std::string, std::string>
const& metadata,
11813 assert(state_ == DiscordObjectState::Owned);
11814 Discord_String content__str{(uint8_t*)(content.data()), content.size()};
11815 ConvertedProperties metadata__convert(metadata);
11816 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
11817 auto cb__userData =
new Tcb__UserData(cb);
11819 [](
auto result,
auto messageId,
void* userData__) {
11820 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
11822 userData__typed->delegate(std::move(result__obj), messageId);
11827 metadata__convert.Properties,
11829 Tcb__UserData::Free,
11834 assert(state_ == DiscordObjectState::Owned);
11835 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
11836 auto cb__userData =
new Tcb__UserData(cb);
11838 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
11839 userData__typed->delegate(messageId);
11842 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
11846 assert(state_ == DiscordObjectState::Owned);
11847 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
11848 auto cb__userData =
new Tcb__UserData(cb);
11850 [](
auto messageId,
auto channelId,
void* userData__) {
11851 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
11852 userData__typed->delegate(messageId, channelId);
11855 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
11859 assert(state_ == DiscordObjectState::Owned);
11860 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
11861 auto cb__userData =
new Tcb__UserData(cb);
11863 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
11864 userData__typed->delegate(messageId);
11867 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
11869void Client::SetShowingChat(
bool showingChat)
11871 assert(state_ == DiscordObjectState::Owned);
11877 assert(state_ == DiscordObjectState::Owned);
11878 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
11879 auto callback__userData =
new Tcallback__UserData(callback);
11881 auto message,
auto severity,
void* userData__) {
11882 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
11883 std::string message__str(
reinterpret_cast<char*
>(message.ptr), message.size);
11884 userData__typed->delegate(std::move(message__str),
11890 Tcallback__UserData::Free,
11891 callback__userData,
11897 assert(state_ == DiscordObjectState::Owned);
11898 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
11899 auto callback__userData =
new Tcallback__UserData(callback);
11901 auto message,
auto severity,
void* userData__) {
11902 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
11903 std::string message__str(
reinterpret_cast<char*
>(message.ptr), message.size);
11904 userData__typed->delegate(std::move(message__str),
11910 Tcallback__UserData::Free,
11911 callback__userData,
11914void Client::Connect()
11916 assert(state_ == DiscordObjectState::Owned);
11919void Client::Disconnect()
11921 assert(state_ == DiscordObjectState::Owned);
11926 assert(state_ == DiscordObjectState::Owned);
11931void Client::OpenConnectedGamesSettingsInDiscord(
11934 assert(state_ == DiscordObjectState::Owned);
11935 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
11936 auto callback__userData =
new Tcallback__UserData(callback);
11938 [](
auto result,
void* userData__) {
11939 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
11941 userData__typed->delegate(std::move(result__obj));
11944 &instance_, callback__native, Tcallback__UserData::Free, callback__userData);
11946void Client::SetApplicationId(uint64_t applicationId)
11948 assert(state_ == DiscordObjectState::Owned);
11953 assert(state_ == DiscordObjectState::Owned);
11954 bool returnValue__;
11958 return returnValue__;
11962 assert(state_ == DiscordObjectState::Owned);
11963 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
11964 auto cb__userData =
new Tcb__UserData(cb);
11966 [](
auto status,
auto error,
auto errorDetail,
void* userData__) {
11967 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
11973 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
11977 assert(state_ == DiscordObjectState::Owned);
11982void Client::CreateOrJoinLobby(std::string
const& secret,
11985 assert(state_ == DiscordObjectState::Owned);
11986 Discord_String secret__str{(uint8_t*)(secret.data()), secret.size()};
11987 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
11988 auto callback__userData =
new Tcallback__UserData(callback);
11990 [](
auto result,
auto lobbyId,
void* userData__) {
11991 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
11993 userData__typed->delegate(std::move(result__obj), lobbyId);
11996 &instance_, secret__str, callback__native, Tcallback__UserData::Free, callback__userData);
11998void Client::CreateOrJoinLobbyWithMetadata(
11999 std::string
const& secret,
12000 std::unordered_map<std::string, std::string>
const& lobbyMetadata,
12001 std::unordered_map<std::string, std::string>
const& memberMetadata,
12004 assert(state_ == DiscordObjectState::Owned);
12005 Discord_String secret__str{(uint8_t*)(secret.data()), secret.size()};
12006 ConvertedProperties lobbyMetadata__convert(lobbyMetadata);
12007 ConvertedProperties memberMetadata__convert(memberMetadata);
12008 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
12009 auto callback__userData =
new Tcallback__UserData(callback);
12011 [](
auto result,
auto lobbyId,
void* userData__) {
12012 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
12014 userData__typed->delegate(std::move(result__obj), lobbyId);
12018 lobbyMetadata__convert.Properties,
12019 memberMetadata__convert.Properties,
12021 Tcallback__UserData::Free,
12022 callback__userData);
12026 assert(state_ == DiscordObjectState::Owned);
12027 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12028 auto cb__userData =
new Tcb__UserData(cb);
12030 [](
auto result,
auto guildChannels,
void* userData__) {
12031 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12033 std::vector<discordpp::GuildChannel> guildChannels__vec;
12034 guildChannels__vec.reserve(guildChannels.size);
12035 for (
size_t i__ = 0; i__ < guildChannels.size; ++i__) {
12036 guildChannels__vec.emplace_back(guildChannels.ptr[i__], DiscordObjectState::Owned);
12039 userData__typed->delegate(std::move(result__obj), std::move(guildChannels__vec));
12042 &instance_, guildId, cb__native, Tcb__UserData::Free, cb__userData);
12044std::optional<discordpp::LobbyHandle> Client::GetLobbyHandle(uint64_t lobbyId)
const
12046 assert(state_ == DiscordObjectState::Owned);
12047 bool returnIsNonNull__;
12050 if (!returnIsNonNull__) {
12054 return returnValue__;
12056std::vector<uint64_t> Client::GetLobbyIds()
const
12058 assert(state_ == DiscordObjectState::Owned);
12061 std::vector<uint64_t> returnValue__(returnValueNative__.
ptr,
12062 returnValueNative__.
ptr + returnValueNative__.
size);
12064 return returnValue__;
12068 assert(state_ == DiscordObjectState::Owned);
12069 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12070 auto cb__userData =
new Tcb__UserData(cb);
12072 [](
auto result,
auto guilds,
void* userData__) {
12073 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12075 std::vector<discordpp::GuildMinimal> guilds__vec;
12076 guilds__vec.reserve(guilds.size);
12077 for (
size_t i__ = 0; i__ < guilds.size; ++i__) {
12078 guilds__vec.emplace_back(guilds.ptr[i__], DiscordObjectState::Owned);
12081 userData__typed->delegate(std::move(result__obj), std::move(guilds__vec));
12085void Client::JoinLinkedLobbyGuild(
12090 assert(state_ == DiscordObjectState::Owned);
12091 using TprovisionalUserMergeRequiredCallback__UserData =
12092 TDelegateUserData<std::remove_reference_t<
decltype(provisionalUserMergeRequiredCallback)>>;
12093 auto provisionalUserMergeRequiredCallback__userData =
12094 new TprovisionalUserMergeRequiredCallback__UserData(provisionalUserMergeRequiredCallback);
12096 provisionalUserMergeRequiredCallback__native = [](
void* userData__) {
12097 auto userData__typed =
12098 static_cast<TprovisionalUserMergeRequiredCallback__UserData*
>(userData__);
12099 userData__typed->delegate();
12101 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
12102 auto callback__userData =
new Tcallback__UserData(callback);
12104 [](
auto result,
auto inviteUrl,
void* userData__) {
12105 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
12107 std::string inviteUrl__str(
reinterpret_cast<char*
>(inviteUrl.ptr), inviteUrl.size);
12108 userData__typed->delegate(std::move(result__obj), std::move(inviteUrl__str));
12113 provisionalUserMergeRequiredCallback__native,
12114 TprovisionalUserMergeRequiredCallback__UserData::Free,
12115 provisionalUserMergeRequiredCallback__userData,
12117 Tcallback__UserData::Free,
12118 callback__userData);
12122 assert(state_ == DiscordObjectState::Owned);
12123 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
12124 auto callback__userData =
new Tcallback__UserData(callback);
12126 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
12128 userData__typed->delegate(std::move(result__obj));
12131 &instance_, lobbyId, callback__native, Tcallback__UserData::Free, callback__userData);
12133void Client::LinkChannelToLobby(uint64_t lobbyId,
12134 uint64_t channelId,
12137 assert(state_ == DiscordObjectState::Owned);
12138 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
12139 auto callback__userData =
new Tcallback__UserData(callback);
12141 void* userData__) {
12142 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
12144 userData__typed->delegate(std::move(result__obj));
12150 Tcallback__UserData::Free,
12151 callback__userData);
12155 assert(state_ == DiscordObjectState::Owned);
12156 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12157 auto cb__userData =
new Tcb__UserData(cb);
12159 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12160 userData__typed->delegate(lobbyId);
12163 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
12167 assert(state_ == DiscordObjectState::Owned);
12168 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12169 auto cb__userData =
new Tcb__UserData(cb);
12171 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12172 userData__typed->delegate(lobbyId);
12175 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
12179 assert(state_ == DiscordObjectState::Owned);
12180 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12181 auto cb__userData =
new Tcb__UserData(cb);
12183 [](
auto lobbyId,
auto memberId,
void* userData__) {
12184 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12185 userData__typed->delegate(lobbyId, memberId);
12188 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
12192 assert(state_ == DiscordObjectState::Owned);
12193 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12194 auto cb__userData =
new Tcb__UserData(cb);
12196 [](
auto lobbyId,
auto memberId,
void* userData__) {
12197 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12198 userData__typed->delegate(lobbyId, memberId);
12201 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
12205 assert(state_ == DiscordObjectState::Owned);
12206 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12207 auto cb__userData =
new Tcb__UserData(cb);
12209 [](
auto lobbyId,
auto memberId,
void* userData__) {
12210 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12211 userData__typed->delegate(lobbyId, memberId);
12214 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
12218 assert(state_ == DiscordObjectState::Owned);
12219 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12220 auto cb__userData =
new Tcb__UserData(cb);
12222 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12223 userData__typed->delegate(lobbyId);
12226 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
12228void Client::UnlinkChannelFromLobby(uint64_t lobbyId,
12231 assert(state_ == DiscordObjectState::Owned);
12232 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
12233 auto callback__userData =
new Tcallback__UserData(callback);
12235 void* userData__) {
12236 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
12238 userData__typed->delegate(std::move(result__obj));
12241 &instance_, lobbyId, callback__native, Tcallback__UserData::Free, callback__userData);
12245 assert(state_ == DiscordObjectState::Owned);
12246 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
12247 auto callback__userData =
new Tcallback__UserData(callback);
12249 void* userData__) {
12250 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
12251 userData__typed->delegate(installed);
12254 &instance_, callback__native, Tcallback__UserData::Free, callback__userData);
12259 assert(state_ == DiscordObjectState::Owned);
12260 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12261 auto cb__userData =
new Tcb__UserData(cb);
12263 [](
auto result,
auto joinSecret,
void* userData__) {
12264 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12266 std::string joinSecret__str(
reinterpret_cast<char*
>(joinSecret.ptr), joinSecret.size);
12267 userData__typed->delegate(std::move(result__obj), std::move(joinSecret__str));
12271 &instance_, invite.instance(), cb__native, Tcb__UserData::Free, cb__userData);
12273void Client::ClearRichPresence()
12275 assert(state_ == DiscordObjectState::Owned);
12278bool Client::RegisterLaunchCommand(uint64_t applicationId, std::string command)
12280 assert(state_ == DiscordObjectState::Owned);
12281 bool returnValue__;
12282 Discord_String command__str{(uint8_t*)(command.data()), command.size()};
12284 return returnValue__;
12286bool Client::RegisterLaunchSteamApplication(uint64_t applicationId, uint32_t steamAppId)
12288 assert(state_ == DiscordObjectState::Owned);
12289 bool returnValue__;
12292 return returnValue__;
12294void Client::SendActivityInvite(uint64_t userId,
12295 std::string
const& content,
12298 assert(state_ == DiscordObjectState::Owned);
12299 Discord_String content__str{(uint8_t*)(content.data()), content.size()};
12300 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12301 auto cb__userData =
new Tcb__UserData(cb);
12303 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12305 userData__typed->delegate(std::move(result__obj));
12308 &instance_, userId, content__str, cb__native, Tcb__UserData::Free, cb__userData);
12310void Client::SendActivityJoinRequest(uint64_t userId,
12313 assert(state_ == DiscordObjectState::Owned);
12314 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12315 auto cb__userData =
new Tcb__UserData(cb);
12317 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12319 userData__typed->delegate(std::move(result__obj));
12322 &instance_, userId, cb__native, Tcb__UserData::Free, cb__userData);
12327 assert(state_ == DiscordObjectState::Owned);
12328 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12329 auto cb__userData =
new Tcb__UserData(cb);
12331 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12333 userData__typed->delegate(std::move(result__obj));
12336 &instance_, invite.instance(), cb__native, Tcb__UserData::Free, cb__userData);
12340 assert(state_ == DiscordObjectState::Owned);
12341 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12342 auto cb__userData =
new Tcb__UserData(cb);
12344 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12346 userData__typed->delegate(std::move(invite__obj));
12349 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
12353 assert(state_ == DiscordObjectState::Owned);
12354 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12355 auto cb__userData =
new Tcb__UserData(cb);
12357 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12359 userData__typed->delegate(std::move(invite__obj));
12362 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
12366 assert(state_ == DiscordObjectState::Owned);
12367 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12368 auto cb__userData =
new Tcb__UserData(cb);
12370 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12371 std::string joinSecret__str(
reinterpret_cast<char*
>(joinSecret.ptr), joinSecret.size);
12372 userData__typed->delegate(std::move(joinSecret__str));
12376 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
12378void Client::SetActivityJoinWithApplicationCallback(
12381 assert(state_ == DiscordObjectState::Owned);
12382 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12383 auto cb__userData =
new Tcb__UserData(cb);
12385 [](
auto applicationId,
auto joinSecret,
void* userData__) {
12386 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12387 std::string joinSecret__str(
reinterpret_cast<char*
>(joinSecret.ptr), joinSecret.size);
12388 userData__typed->delegate(applicationId, std::move(joinSecret__str));
12392 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
12397 assert(state_ == DiscordObjectState::Owned);
12398 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
12399 auto callback__userData =
new Tcallback__UserData(callback);
12401 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
12403 userData__typed->delegate(std::move(result__obj));
12408 Tcallback__UserData::Free,
12409 callback__userData);
12414 assert(state_ == DiscordObjectState::Owned);
12415 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12416 auto cb__userData =
new Tcb__UserData(cb);
12418 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12420 userData__typed->delegate(std::move(result__obj));
12423 &instance_, activity.instance(), cb__native, Tcb__UserData::Free, cb__userData);
12425void Client::AcceptDiscordFriendRequest(uint64_t userId,
12428 assert(state_ == DiscordObjectState::Owned);
12429 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12430 auto cb__userData =
new Tcb__UserData(cb);
12432 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12434 userData__typed->delegate(std::move(result__obj));
12437 &instance_, userId, cb__native, Tcb__UserData::Free, cb__userData);
12439void Client::AcceptGameFriendRequest(uint64_t userId,
12442 assert(state_ == DiscordObjectState::Owned);
12443 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12444 auto cb__userData =
new Tcb__UserData(cb);
12446 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12448 userData__typed->delegate(std::move(result__obj));
12451 &instance_, userId, cb__native, Tcb__UserData::Free, cb__userData);
12455 assert(state_ == DiscordObjectState::Owned);
12456 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12457 auto cb__userData =
new Tcb__UserData(cb);
12459 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12461 userData__typed->delegate(std::move(result__obj));
12465void Client::CancelDiscordFriendRequest(uint64_t userId,
12468 assert(state_ == DiscordObjectState::Owned);
12469 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12470 auto cb__userData =
new Tcb__UserData(cb);
12472 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12474 userData__typed->delegate(std::move(result__obj));
12477 &instance_, userId, cb__native, Tcb__UserData::Free, cb__userData);
12479void Client::CancelGameFriendRequest(uint64_t userId,
12482 assert(state_ == DiscordObjectState::Owned);
12483 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12484 auto cb__userData =
new Tcb__UserData(cb);
12486 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12488 userData__typed->delegate(std::move(result__obj));
12491 &instance_, userId, cb__native, Tcb__UserData::Free, cb__userData);
12495 assert(state_ == DiscordObjectState::Owned);
12499 return returnValue__;
12501std::vector<discordpp::RelationshipHandle> Client::GetRelationships()
const
12503 assert(state_ == DiscordObjectState::Owned);
12506 std::vector<discordpp::RelationshipHandle> returnValue__;
12507 returnValue__.reserve(returnValueNative__.
size);
12508 for (
size_t i__ = 0; i__ < returnValueNative__.
size; ++i__) {
12509 returnValue__.emplace_back(returnValueNative__.
ptr[i__], DiscordObjectState::Owned);
12512 return returnValue__;
12514std::vector<discordpp::RelationshipHandle> Client::GetRelationshipsByGroup(
12517 assert(state_ == DiscordObjectState::Owned);
12521 std::vector<discordpp::RelationshipHandle> returnValue__;
12522 returnValue__.reserve(returnValueNative__.
size);
12523 for (
size_t i__ = 0; i__ < returnValueNative__.
size; ++i__) {
12524 returnValue__.emplace_back(returnValueNative__.
ptr[i__], DiscordObjectState::Owned);
12527 return returnValue__;
12529void Client::RejectDiscordFriendRequest(uint64_t userId,
12532 assert(state_ == DiscordObjectState::Owned);
12533 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12534 auto cb__userData =
new Tcb__UserData(cb);
12536 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12538 userData__typed->delegate(std::move(result__obj));
12541 &instance_, userId, cb__native, Tcb__UserData::Free, cb__userData);
12543void Client::RejectGameFriendRequest(uint64_t userId,
12546 assert(state_ == DiscordObjectState::Owned);
12547 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12548 auto cb__userData =
new Tcb__UserData(cb);
12550 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12552 userData__typed->delegate(std::move(result__obj));
12555 &instance_, userId, cb__native, Tcb__UserData::Free, cb__userData);
12557void Client::RemoveDiscordAndGameFriend(uint64_t userId,
12560 assert(state_ == DiscordObjectState::Owned);
12561 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12562 auto cb__userData =
new Tcb__UserData(cb);
12564 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12566 userData__typed->delegate(std::move(result__obj));
12569 &instance_, userId, cb__native, Tcb__UserData::Free, cb__userData);
12573 assert(state_ == DiscordObjectState::Owned);
12574 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12575 auto cb__userData =
new Tcb__UserData(cb);
12577 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12579 userData__typed->delegate(std::move(result__obj));
12582 &instance_, userId, cb__native, Tcb__UserData::Free, cb__userData);
12584std::vector<discordpp::UserHandle> Client::SearchFriendsByUsername(std::string searchStr)
const
12586 assert(state_ == DiscordObjectState::Owned);
12588 Discord_String searchStr__str{(uint8_t*)(searchStr.data()), searchStr.size()};
12590 std::vector<discordpp::UserHandle> returnValue__;
12591 returnValue__.reserve(returnValueNative__.
size);
12592 for (
size_t i__ = 0; i__ < returnValueNative__.
size; ++i__) {
12593 returnValue__.emplace_back(returnValueNative__.
ptr[i__], DiscordObjectState::Owned);
12596 return returnValue__;
12598void Client::SendDiscordFriendRequest(std::string
const& username,
12601 assert(state_ == DiscordObjectState::Owned);
12602 Discord_String username__str{(uint8_t*)(username.data()), username.size()};
12603 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12604 auto cb__userData =
new Tcb__UserData(cb);
12606 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12608 userData__typed->delegate(std::move(result__obj));
12611 &instance_, username__str, cb__native, Tcb__UserData::Free, cb__userData);
12613void Client::SendDiscordFriendRequestById(uint64_t userId,
12616 assert(state_ == DiscordObjectState::Owned);
12617 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12618 auto cb__userData =
new Tcb__UserData(cb);
12620 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12622 userData__typed->delegate(std::move(result__obj));
12625 &instance_, userId, cb__native, Tcb__UserData::Free, cb__userData);
12627void Client::SendGameFriendRequest(std::string
const& username,
12630 assert(state_ == DiscordObjectState::Owned);
12631 Discord_String username__str{(uint8_t*)(username.data()), username.size()};
12632 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12633 auto cb__userData =
new Tcb__UserData(cb);
12635 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12637 userData__typed->delegate(std::move(result__obj));
12640 &instance_, username__str, cb__native, Tcb__UserData::Free, cb__userData);
12642void Client::SendGameFriendRequestById(uint64_t userId,
12645 assert(state_ == DiscordObjectState::Owned);
12646 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12647 auto cb__userData =
new Tcb__UserData(cb);
12649 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12651 userData__typed->delegate(std::move(result__obj));
12654 &instance_, userId, cb__native, Tcb__UserData::Free, cb__userData);
12658 assert(state_ == DiscordObjectState::Owned);
12659 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12660 auto cb__userData =
new Tcb__UserData(cb);
12662 [](
auto userId,
auto isDiscordRelationshipUpdate,
void* userData__) {
12663 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12664 userData__typed->delegate(userId, isDiscordRelationshipUpdate);
12667 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
12671 assert(state_ == DiscordObjectState::Owned);
12672 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12673 auto cb__userData =
new Tcb__UserData(cb);
12675 [](
auto userId,
auto isDiscordRelationshipUpdate,
void* userData__) {
12676 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12677 userData__typed->delegate(userId, isDiscordRelationshipUpdate);
12680 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
12684 assert(state_ == DiscordObjectState::Owned);
12685 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12686 auto cb__userData =
new Tcb__UserData(cb);
12688 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12690 userData__typed->delegate(std::move(result__obj));
12694std::optional<discordpp::UserHandle> Client::GetCurrentUserV2()
const
12696 assert(state_ == DiscordObjectState::Owned);
12697 bool returnIsNonNull__;
12700 if (!returnIsNonNull__) {
12704 return returnValue__;
12706void Client::GetDiscordClientConnectedUser(
12707 uint64_t applicationId,
12710 assert(state_ == DiscordObjectState::Owned);
12711 using Tcallback__UserData = TDelegateUserData<std::remove_reference_t<
decltype(callback)>>;
12712 auto callback__userData =
new Tcallback__UserData(callback);
12714 [](
auto result,
auto user,
void* userData__) {
12715 auto userData__typed =
static_cast<Tcallback__UserData*
>(userData__);
12717 std::optional<discordpp::UserHandle> user__opt{};
12721 userData__typed->delegate(std::move(result__obj), std::move(user__opt));
12724 &instance_, applicationId, callback__native, Tcallback__UserData::Free, callback__userData);
12726std::optional<discordpp::UserHandle> Client::GetUser(uint64_t userId)
const
12728 assert(state_ == DiscordObjectState::Owned);
12729 bool returnIsNonNull__;
12732 if (!returnIsNonNull__) {
12736 return returnValue__;
12738void Client::SetRelationshipGroupsUpdatedCallback(
12741 assert(state_ == DiscordObjectState::Owned);
12742 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12743 auto cb__userData =
new Tcb__UserData(cb);
12745 void* userData__) {
12746 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12747 userData__typed->delegate(userId);
12750 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
12754 assert(state_ == DiscordObjectState::Owned);
12755 using Tcb__UserData = TDelegateUserData<std::remove_reference_t<
decltype(cb)>>;
12756 auto cb__userData =
new Tcb__UserData(cb);
12758 auto userData__typed =
static_cast<Tcb__UserData*
>(userData__);
12759 userData__typed->delegate(userId);
12762 &instance_, cb__native, Tcb__UserData::Free, cb__userData);
12764const CallInfoHandle CallInfoHandle::nullobj{{}, DiscordObjectState::Invalid};
12765CallInfoHandle::~CallInfoHandle()
12767 if (state_ == DiscordObjectState::Owned) {
12769 state_ = DiscordObjectState::Invalid;
12772CallInfoHandle::CallInfoHandle(CallInfoHandle&& other) noexcept
12773 : instance_(other.instance_)
12774 , state_(other.state_)
12776 other.state_ = DiscordObjectState::Invalid;
12778CallInfoHandle& CallInfoHandle::operator=(CallInfoHandle&& other)
noexcept
12780 if (
this != &other) {
12781 if (state_ == DiscordObjectState::Owned) {
12784 instance_ = other.instance_;
12785 state_ = other.state_;
12786 other.state_ = DiscordObjectState::Invalid;
12790CallInfoHandle::CallInfoHandle(
const CallInfoHandle& other)
12795 Discord_CallInfoHandle_Clone(&instance_, other.instance());
12797 state_ = DiscordObjectState::Owned;
12800CallInfoHandle& CallInfoHandle::operator=(
const CallInfoHandle& other)
12802 if (
this != &other) {
12803 if (state_ == DiscordObjectState::Owned) {
12805 state_ = DiscordObjectState::Invalid;
12807 if (other.state_ == DiscordObjectState::Owned) {
12810 state_ = DiscordObjectState::Owned;
12816 : instance_(instance)
12820void CallInfoHandle::Drop()
12822 if (state_ != DiscordObjectState::Owned) {
12826 state_ = DiscordObjectState::Invalid;
12828uint64_t CallInfoHandle::ChannelId()
const
12830 assert(state_ == DiscordObjectState::Owned);
12831 uint64_t returnValue__;
12833 return returnValue__;
12835std::vector<uint64_t> CallInfoHandle::GetParticipants()
const
12837 assert(state_ == DiscordObjectState::Owned);
12840 std::vector<uint64_t> returnValue__(returnValueNative__.
ptr,
12841 returnValueNative__.
ptr + returnValueNative__.
size);
12843 return returnValue__;
12845std::optional<discordpp::VoiceStateHandle> CallInfoHandle::GetVoiceStateHandle(
12846 uint64_t userId)
const
12848 assert(state_ == DiscordObjectState::Owned);
12849 bool returnIsNonNull__;
12851 returnIsNonNull__ =
12853 if (!returnIsNonNull__) {
12857 return returnValue__;
12859uint64_t CallInfoHandle::GuildId()
const
12861 assert(state_ == DiscordObjectState::Owned);
12862 uint64_t returnValue__;
12864 return returnValue__;
void DISCORD_API Discord_Call_SetSelfDeaf(Discord_Call *self, bool deaf)
void(*) Discord_Client_LobbyDeletedCallback(uint64_t lobbyId, void *userData)
void(*) Discord_Client_GetVoiceSettingsCallback(Discord_ClientResult *result, Discord_VoiceSettings *settings, void *userData)
void DISCORD_API Discord_AuthorizationArgs_SetCustomSchemeParam(Discord_AuthorizationArgs *self, Discord_String *value)
void DISCORD_API Discord_ActivitySecrets_Join(Discord_ActivitySecrets *self, Discord_String *returnValue)
void DISCORD_API Discord_ActivityButton_Clone(Discord_ActivityButton *self, Discord_ActivityButton const *arg0)
void DISCORD_API Discord_LinkedChannel_Name(Discord_LinkedChannel *self, Discord_String *returnValue)
void DISCORD_API Discord_ActivityInvite_SetMessageId(Discord_ActivityInvite *self, uint64_t value)
void DISCORD_API Discord_Client_UpdateToken(Discord_Client *self, Discord_AuthorizationTokenType tokenType, Discord_String token, Discord_Client_UpdateTokenCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void DISCORD_API Discord_ActivityButton_SetUrl(Discord_ActivityButton *self, Discord_String value)
void DISCORD_API Discord_Client_GetLobbyIds(Discord_Client *self, Discord_UInt64Span *returnValue)
void DISCORD_API Discord_ClientCreateOptions_ApiBase(Discord_ClientCreateOptions *self, Discord_String *returnValue)
void DISCORD_API Discord_AuthorizationArgs_SetIntegrationType(Discord_AuthorizationArgs *self, Discord_IntegrationType *value)
bool DISCORD_API Discord_RelationshipHandle_User(Discord_RelationshipHandle *self, Discord_UserHandle *returnValue)
void DISCORD_API Discord_Activity_SetParentApplicationId(Discord_Activity *self, uint64_t *value)
void DISCORD_API Discord_Call_Clone(Discord_Call *self, Discord_Call *other)
bool DISCORD_API Discord_Activity_Party(Discord_Activity *self, Discord_ActivityParty *returnValue)
void DISCORD_API Discord_Client_SetInputVolume(Discord_Client *self, float inputVolume)
void DISCORD_API Discord_Client_ProvisionalUserMergeCompleted(Discord_Client *self, bool success)
bool DISCORD_API Discord_MessageHandle_Author(Discord_MessageHandle *self, Discord_UserHandle *returnValue)
bool DISCORD_API Discord_Client_StartCall(Discord_Client *self, uint64_t channelId, Discord_Call *returnValue)
void DISCORD_API Discord_Client_GetProvisionalToken(Discord_Client *self, uint64_t applicationId, Discord_AuthenticationExternalAuthType externalAuthType, Discord_String externalAuthToken, Discord_Client_TokenExchangeCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void DISCORD_API Discord_ClientResult_SetStatus(Discord_ClientResult *self, Discord_HttpStatusCode value)
void DISCORD_API Discord_DeviceAuthorizationArgs_Clone(Discord_DeviceAuthorizationArgs *self, Discord_DeviceAuthorizationArgs const *arg0)
bool DISCORD_API Discord_MessageHandle_Lobby(Discord_MessageHandle *self, Discord_LobbyHandle *returnValue)
uint64_t DISCORD_API Discord_MessageHandle_SentTimestamp(Discord_MessageHandle *self)
void DISCORD_API Discord_ActivityTimestamps_SetStart(Discord_ActivityTimestamps *self, uint64_t value)
void DISCORD_API Discord_Client_GetTokenFromDeviceProvisionalMerge(Discord_Client *self, Discord_DeviceAuthorizationArgs *args, Discord_AuthenticationExternalAuthType externalAuthType, Discord_String externalAuthToken, Discord_Client_TokenExchangeCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
float DISCORD_API Discord_VoiceSettings_OutputVolume(Discord_VoiceSettings *self)
Discord_StatusDisplayTypes
void DISCORD_API Discord_Activity_Clone(Discord_Activity *self, Discord_Activity const *arg0)
Discord_ErrorType DISCORD_API Discord_ClientResult_Type(Discord_ClientResult *self)
void DISCORD_API Discord_DeviceAuthorizationArgs_Init(Discord_DeviceAuthorizationArgs *self)
bool DISCORD_API Discord_GuildChannel_LinkedLobby(Discord_GuildChannel *self, Discord_LinkedLobby *returnValue)
uint64_t DISCORD_API Discord_UserMessageSummary_LastMessageId(Discord_UserMessageSummary *self)
uint64_t DISCORD_API Discord_LinkedLobby_LobbyId(Discord_LinkedLobby *self)
void DISCORD_API Discord_AudioDevice_Clone(Discord_AudioDevice *self, Discord_AudioDevice const *arg0)
void DISCORD_API Discord_Activity_SetDetails(Discord_Activity *self, Discord_String *value)
void DISCORD_API Discord_ActivityTimestamps_SetEnd(Discord_ActivityTimestamps *self, uint64_t value)
void DISCORD_API Discord_Client_SetLobbyDeletedCallback(Discord_Client *self, Discord_Client_LobbyDeletedCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_ChannelHandle_Drop(Discord_ChannelHandle *self)
void DISCORD_API Discord_Activity_Name(Discord_Activity *self, Discord_String *returnValue)
void DISCORD_API Discord_GuildChannel_SetIsLinkable(Discord_GuildChannel *self, bool value)
void(*) Discord_Client_UpdateRichPresenceCallback(Discord_ClientResult *result, void *userData)
bool DISCORD_API Discord_Client_RegisterLaunchCommand(Discord_Client *self, uint64_t applicationId, Discord_String command)
void DISCORD_API Discord_Client_GetInputDevices(Discord_Client *self, Discord_Client_GetInputDevicesCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_LinkedLobby_Drop(Discord_LinkedLobby *self)
void DISCORD_API Discord_Client_IsDiscordAppInstalled(Discord_Client *self, Discord_Client_IsDiscordAppInstalledCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void DISCORD_API Discord_Activity_SetAssets(Discord_Activity *self, Discord_ActivityAssets *value)
uint64_t DISCORD_API Discord_LinkedChannel_GuildId(Discord_LinkedChannel *self)
void(*) Discord_Client_LeaveLobbyCallback(Discord_ClientResult *result, void *userData)
bool DISCORD_API Discord_ClientCreateOptions_CpuAffinityMask(Discord_ClientCreateOptions *self, uint64_t *returnValue)
void DISCORD_API Discord_Client_SetTokenExpirationCallback(Discord_Client *self, Discord_Client_TokenExpirationCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void DISCORD_API Discord_MessageHandle_Content(Discord_MessageHandle *self, Discord_String *returnValue)
void DISCORD_API Discord_Activity_Init(Discord_Activity *self)
bool DISCORD_API Discord_Call_GetSelfMute(Discord_Call *self)
void DISCORD_API Discord_Client_GetUserMessagesWithLimit(Discord_Client *self, uint64_t recipientId, int32_t limit, Discord_Client_UserMessagesWithLimitCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_Client_SetActivityJoinWithApplicationCallback(Discord_Client *self, Discord_Client_ActivityJoinWithApplicationCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_Client_GetVoiceSettings(Discord_Client *self, Discord_Client_GetVoiceSettingsCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
Discord_ActivityGamePlatforms DISCORD_API Discord_Activity_SupportedPlatforms(Discord_Activity *self)
uint64_t DISCORD_API Discord_DeviceAuthorizationArgs_ClientId(Discord_DeviceAuthorizationArgs *self)
uint64_t DISCORD_API Discord_Call_GetGuildId(Discord_Call *self)
void DISCORD_API Discord_AudioDevice_Name(Discord_AudioDevice *self, Discord_String *returnValue)
void DISCORD_API Discord_Client_ThreadToString(Discord_Client_Thread type, Discord_String *returnValue)
void(*) Discord_Client_UpdateTokenCallback(Discord_ClientResult *result, void *userData)
void DISCORD_API Discord_Client_SendActivityJoinRequestReply(Discord_Client *self, Discord_ActivityInvite *invite, Discord_Client_SendActivityInviteCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_Client_UnblockUser(Discord_Client *self, uint64_t userId, Discord_Client_UpdateRelationshipCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void(*) Discord_Client_VoiceSettingsUpdatedCallback(Discord_VoiceSettings *settings, void *userData)
void DISCORD_API Discord_CallInfoHandle_Clone(Discord_CallInfoHandle *self, Discord_CallInfoHandle const *other)
void DISCORD_API Discord_Client_GetOutputDevices(Discord_Client *self, Discord_Client_GetOutputDevicesCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_UserApplicationProfileHandle_AvatarHash(Discord_UserApplicationProfileHandle *self, Discord_String *returnValue)
void DISCORD_API Discord_ActivitySecrets_Init(Discord_ActivitySecrets *self)
void(*) Discord_Client_LobbyMemberUpdatedCallback(uint64_t lobbyId, uint64_t memberId, void *userData)
void DISCORD_API Discord_AuthorizationCodeChallenge_Drop(Discord_AuthorizationCodeChallenge *self)
bool DISCORD_API Discord_ActivityAssets_LargeImage(Discord_ActivityAssets *self, Discord_String *returnValue)
void DISCORD_API Discord_AuthorizationCodeVerifier_SetChallenge(Discord_AuthorizationCodeVerifier *self, Discord_AuthorizationCodeChallenge *value)
void DISCORD_API Discord_LinkedChannel_SetId(Discord_LinkedChannel *self, uint64_t value)
bool DISCORD_API Discord_ClientResult_Successful(Discord_ClientResult *self)
void DISCORD_API Discord_AudioDevice_SetName(Discord_AudioDevice *self, Discord_String value)
bool DISCORD_API Discord_VoiceSettings_NoiseCancellation(Discord_VoiceSettings *self)
void DISCORD_API Discord_AuthorizationArgs_Scopes(Discord_AuthorizationArgs *self, Discord_String *returnValue)
void DISCORD_API Discord_GuildMinimal_Name(Discord_GuildMinimal *self, Discord_String *returnValue)
bool DISCORD_API Discord_UserApplicationProfileHandle_ProviderId(Discord_UserApplicationProfileHandle *self, Discord_String *returnValue)
void DISCORD_API Discord_Call_GetVADThreshold(Discord_Call *self, Discord_VADThresholdSettings *returnValue)
bool DISCORD_API Discord_LobbyMemberHandle_Connected(Discord_LobbyMemberHandle *self)
void(*) Discord_Client_MessageDeletedCallback(uint64_t messageId, uint64_t channelId, void *userData)
void DISCORD_API Discord_Client_SearchFriendsByUsername(Discord_Client *self, Discord_String searchStr, Discord_UserHandleSpan *returnValue)
void(*) Discord_Client_IsDiscordAppInstalledCallback(bool installed, void *userData)
void DISCORD_API Discord_Client_CreateOrJoinLobby(Discord_Client *self, Discord_String secret, Discord_Client_CreateOrJoinLobbyCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void(*) Discord_Client_AuthorizationCallback(Discord_ClientResult *result, Discord_String code, Discord_String redirectUri, void *userData)
void DISCORD_API Discord_ActivityInvite_Init(Discord_ActivityInvite *self)
void(*) Discord_Client_UnmergeIntoProvisionalAccountCallback(Discord_ClientResult *result, void *userData)
void DISCORD_API Discord_AudioDevice_SetIsDefault(Discord_AudioDevice *self, bool value)
bool DISCORD_API Discord_Client_RegisterLaunchSteamApplication(Discord_Client *self, uint64_t applicationId, uint32_t steamAppId)
bool DISCORD_API Discord_UserHandle_IsProvisional(Discord_UserHandle *self)
void DISCORD_API Discord_AuthorizationCodeVerifier_Drop(Discord_AuthorizationCodeVerifier *self)
void DISCORD_API Discord_Client_SetLobbyUpdatedCallback(Discord_Client *self, Discord_Client_LobbyUpdatedCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
Discord_VoiceInputModeType DISCORD_API Discord_VoiceSettings_InputMode(Discord_VoiceSettings *self)
bool DISCORD_API Discord_LobbyHandle_GetCallInfoHandle(Discord_LobbyHandle *self, Discord_CallInfoHandle *returnValue)
void DISCORD_API Discord_Client_SetMessageCreatedCallback(Discord_Client *self, Discord_Client_MessageCreatedCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
bool DISCORD_API Discord_AdditionalContent_Equals(Discord_AdditionalContent *self, Discord_AdditionalContent const *rhs)
void DISCORD_API Discord_Client_AbortGetTokenFromDevice(Discord_Client *self)
void DISCORD_API Discord_LobbyHandle_Clone(Discord_LobbyHandle *self, Discord_LobbyHandle const *other)
void(*) Discord_Client_LobbyUpdatedCallback(uint64_t lobbyId, void *userData)
void DISCORD_API Discord_Client_SetNoAudioInputThreshold(Discord_Client *self, float dBFSThreshold)
void DISCORD_API Discord_Call_StatusToString(Discord_Call_Status type, Discord_String *returnValue)
bool DISCORD_API Discord_MessageHandle_DisclosureType(Discord_MessageHandle *self, Discord_DisclosureTypes *returnValue)
float DISCORD_API Discord_ClientResult_RetryAfter(Discord_ClientResult *self)
void DISCORD_API Discord_Client_SendGameFriendRequest(Discord_Client *self, Discord_String username, Discord_Client_SendFriendRequestCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_Client_Connect(Discord_Client *self)
Discord_ChannelType DISCORD_API Discord_GuildChannel_Type(Discord_GuildChannel *self)
uint64_t DISCORD_API Discord_ActivityInvite_ApplicationId(Discord_ActivityInvite *self)
void DISCORD_API Discord_UserHandle_UserApplicationProfiles(Discord_UserHandle *self, Discord_UserApplicationProfileHandleSpan *returnValue)
void DISCORD_API Discord_ActivityAssets_Drop(Discord_ActivityAssets *self)
Discord_HttpStatusCode DISCORD_API Discord_ClientResult_Status(Discord_ClientResult *self)
void(*) Discord_Client_OpenConnectedGamesSettingsInDiscordCallback(Discord_ClientResult *result, void *userData)
void DISCORD_API Discord_Client_LinkChannelToLobby(Discord_Client *self, uint64_t lobbyId, uint64_t channelId, Discord_Client_LinkOrUnlinkChannelCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void(*) Discord_Client_UpdateRelationshipCallback(Discord_ClientResult *result, void *userData)
void DISCORD_API Discord_Activity_SetTimestamps(Discord_Activity *self, Discord_ActivityTimestamps *value)
bool DISCORD_API Discord_Activity_Secrets(Discord_Activity *self, Discord_ActivitySecrets *returnValue)
void DISCORD_API Discord_ClientResult_Drop(Discord_ClientResult *self)
void DISCORD_API Discord_Client_RemoveDiscordAndGameFriend(Discord_Client *self, uint64_t userId, Discord_Client_UpdateRelationshipCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_Client_GetGuildChannels(Discord_Client *self, uint64_t guildId, Discord_Client_GetGuildChannelsCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_Client_SetActivityJoinCallback(Discord_Client *self, Discord_Client_ActivityJoinCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_AudioDevice_Drop(Discord_AudioDevice *self)
uint64_t DISCORD_API Discord_ChannelHandle_Id(Discord_ChannelHandle *self)
bool DISCORD_API Discord_MessageHandle_AdditionalContent(Discord_MessageHandle *self, Discord_AdditionalContent *returnValue)
void DISCORD_API Discord_AuthorizationCodeChallenge_SetChallenge(Discord_AuthorizationCodeChallenge *self, Discord_String value)
void DISCORD_API Discord_Client_SetRelationshipCreatedCallback(Discord_Client *self, Discord_Client_RelationshipCreatedCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
int32_t DISCORD_API Discord_GuildChannel_Position(Discord_GuildChannel *self)
void DISCORD_API Discord_Call_SetParticipantVolume(Discord_Call *self, uint64_t userId, float volume)
bool DISCORD_API Discord_Activity_Assets(Discord_Activity *self, Discord_ActivityAssets *returnValue)
void DISCORD_API Discord_Client_OpenMessageInDiscord(Discord_Client *self, uint64_t messageId, Discord_Client_ProvisionalUserMergeRequiredCallback provisionalUserMergeRequiredCallback, Discord_FreeFn provisionalUserMergeRequiredCallback__userDataFree, void *provisionalUserMergeRequiredCallback__userData, Discord_Client_OpenMessageInDiscordCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void DISCORD_API Discord_Call_GetParticipants(Discord_Call *self, Discord_UInt64Span *returnValue)
void(*) Discord_Client_SetOutputDeviceCallback(Discord_ClientResult *result, void *userData)
void DISCORD_API Discord_ActivityInvite_PartyId(Discord_ActivityInvite *self, Discord_String *returnValue)
void(*) Discord_Client_ActivityInviteCallback(Discord_ActivityInvite *invite, void *userData)
bool DISCORD_API Discord_AudioDevice_IsDefault(Discord_AudioDevice *self)
void(*) Discord_Client_TokenExchangeCallback(Discord_ClientResult *result, Discord_String accessToken, Discord_String refreshToken, Discord_AuthorizationTokenType tokenType, int32_t expiresIn, Discord_String scopes, void *userData)
void DISCORD_API Discord_DeviceAuthorizationArgs_Drop(Discord_DeviceAuthorizationArgs *self)
uint64_t DISCORD_API Discord_Client_GetApplicationId(Discord_Client *self)
void DISCORD_API Discord_Client_Drop(Discord_Client *self)
void DISCORD_API Discord_Client_SetSelfDeafAll(Discord_Client *self, bool deaf)
bool DISCORD_API Discord_Client_GetChannelHandle(Discord_Client *self, uint64_t channelId, Discord_ChannelHandle *returnValue)
void DISCORD_API Discord_Client_GetToken(Discord_Client *self, uint64_t applicationId, Discord_String code, Discord_String codeVerifier, Discord_String redirectUri, Discord_Client_TokenExchangeCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
float DISCORD_API Discord_VoiceSettings_InputVolume(Discord_VoiceSettings *self)
void(*) Discord_Client_RelationshipDeletedCallback(uint64_t userId, bool isDiscordRelationshipUpdate, void *userData)
void DISCORD_API Discord_ActivityInvite_SetParentApplicationId(Discord_ActivityInvite *self, uint64_t value)
void DISCORD_API Discord_Client_SendActivityJoinRequest(Discord_Client *self, uint64_t userId, Discord_Client_SendActivityInviteCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
bool DISCORD_API Discord_CallInfoHandle_GetVoiceStateHandle(Discord_CallInfoHandle *self, uint64_t userId, Discord_VoiceStateHandle *returnValue)
void(*) Discord_Client_LogCallback(Discord_String message, Discord_LoggingSeverity severity, void *userData)
void DISCORD_API Discord_Activity_Drop(Discord_Activity *self)
uint64_t DISCORD_API Discord_GuildChannel_Id(Discord_GuildChannel *self)
float DISCORD_API Discord_Call_GetParticipantVolume(Discord_Call *self, uint64_t userId)
void DISCORD_API Discord_ClientResult_SetRetryable(Discord_ClientResult *self, bool value)
void DISCORD_API Discord_AuthorizationCodeChallenge_SetMethod(Discord_AuthorizationCodeChallenge *self, Discord_AuthenticationCodeChallengeMethod value)
Discord_ExternalIdentityProviderType
void DISCORD_API Discord_AuthorizationArgs_SetNonce(Discord_AuthorizationArgs *self, Discord_String *value)
void(*) Discord_Client_OpenMessageInDiscordCallback(Discord_ClientResult *result, void *userData)
void(*) Discord_Call_OnStatusChanged(Discord_Call_Status status, Discord_Call_Error error, int32_t errorDetail, void *userData)
bool DISCORD_API Discord_Client_SetSpeakerMode(Discord_Client *self, bool speakerMode)
bool DISCORD_API Discord_Activity_StateUrl(Discord_Activity *self, Discord_String *returnValue)
void(*) Discord_Client_NoAudioInputCallback(bool inputDetected, void *userData)
void DISCORD_API Discord_Client_CancelGameFriendRequest(Discord_Client *self, uint64_t userId, Discord_Client_UpdateRelationshipCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_GuildMinimal_SetName(Discord_GuildMinimal *self, Discord_String value)
void DISCORD_API Discord_Client_OpenConnectedGamesSettingsInDiscord(Discord_Client *self, Discord_Client_OpenConnectedGamesSettingsInDiscordCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void DISCORD_API Discord_ClientResult_Error(Discord_ClientResult *self, Discord_String *returnValue)
void DISCORD_API Discord_VoiceSettings_SetEchoCancellation(Discord_VoiceSettings *self, bool value)
void DISCORD_API Discord_ActivityInvite_Drop(Discord_ActivityInvite *self)
int32_t DISCORD_API Discord_ClientResult_ErrorCode(Discord_ClientResult *self)
void DISCORD_API Discord_Client_AbortAuthorize(Discord_Client *self)
void DISCORD_API Discord_AuthorizationArgs_Clone(Discord_AuthorizationArgs *self, Discord_AuthorizationArgs const *arg0)
void DISCORD_API Discord_ClientResult_SetResponseBody(Discord_ClientResult *self, Discord_String value)
void DISCORD_API Discord_Client_RemoveAuthorizeRequestCallback(Discord_Client *self)
void DISCORD_API Discord_ActivityInvite_SetChannelId(Discord_ActivityInvite *self, uint64_t value)
void DISCORD_API Discord_LinkedLobby_Clone(Discord_LinkedLobby *self, Discord_LinkedLobby const *arg0)
uint64_t DISCORD_API Discord_MessageHandle_AuthorId(Discord_MessageHandle *self)
DISCORD_API void Discord_FreeProperties(Discord_Properties props)
void(*) Discord_Client_EndCallCallback(void *userData)
void DISCORD_API Discord_Client_SetLobbyMemberAddedCallback(Discord_Client *self, Discord_Client_LobbyMemberAddedCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void(*) Discord_Client_OnStatusChanged(Discord_Client_Status status, Discord_Client_Error error, int32_t errorDetail, void *userData)
void DISCORD_API Discord_LinkedChannel_SetName(Discord_LinkedChannel *self, Discord_String value)
void DISCORD_API Discord_ActivitySecrets_SetJoin(Discord_ActivitySecrets *self, Discord_String value)
void DISCORD_API Discord_GuildMinimal_SetId(Discord_GuildMinimal *self, uint64_t value)
Discord_AuthenticationCodeChallengeMethod
void DISCORD_API Discord_Call_SetAudioMode(Discord_Call *self, Discord_AudioModeType audioMode)
void DISCORD_API Discord_Client_SetMessageDeletedCallback(Discord_Client *self, Discord_Client_MessageDeletedCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void(*) Discord_Client_VoiceParticipantChangedCallback(uint64_t lobbyId, uint64_t memberId, bool added, void *userData)
bool DISCORD_API Discord_VoiceSettings_AutomaticGainControl(Discord_VoiceSettings *self)
void DISCORD_API Discord_AuthorizationArgs_Init(Discord_AuthorizationArgs *self)
float DISCORD_API Discord_Client_GetInputVolume(Discord_Client *self)
bool DISCORD_API Discord_Client_GetSelfMuteAll(Discord_Client *self)
void DISCORD_API Discord_Activity_SetSupportedPlatforms(Discord_Activity *self, Discord_ActivityGamePlatforms value)
bool DISCORD_API Discord_MessageHandle_SentFromGame(Discord_MessageHandle *self)
void DISCORD_API Discord_VoiceSettings_SetOutputVolume(Discord_VoiceSettings *self, float value)
void DISCORD_API Discord_Client_SetActivityInviteUpdatedCallback(Discord_Client *self, Discord_Client_ActivityInviteCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_VoiceSettings_Clone(Discord_VoiceSettings *self, Discord_VoiceSettings const *arg0)
void(*) Discord_Client_UserUpdatedCallback(uint64_t userId, void *userData)
void(*) Discord_Client_GetUserGuildsCallback(Discord_ClientResult *result, Discord_GuildMinimalSpan guilds, void *userData)
int32_t DISCORD_API Discord_ActivityParty_MaxSize(Discord_ActivityParty *self)
void DISCORD_API Discord_Client_SetUserUpdatedCallback(Discord_Client *self, Discord_Client_UserUpdatedCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_ClientCreateOptions_SetExperimentalAndroidPreventCommsForBluetooth(Discord_ClientCreateOptions *self, bool value)
void DISCORD_API Discord_Client_RejectGameFriendRequest(Discord_Client *self, uint64_t userId, Discord_Client_UpdateRelationshipCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_Client_SendUserMessage(Discord_Client *self, uint64_t recipientId, Discord_String content, Discord_Client_SendUserMessageCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
float DISCORD_API Discord_Client_GetOutputVolume(Discord_Client *self)
void DISCORD_API Discord_ActivityParty_SetMaxSize(Discord_ActivityParty *self, int32_t value)
bool DISCORD_API Discord_AudioDevice_Equals(Discord_AudioDevice *self, Discord_AudioDevice const *rhs)
void DISCORD_API Discord_VoiceSettings_SetPttKey(Discord_VoiceSettings *self, Discord_String value)
bool DISCORD_API Discord_MessageHandle_Recipient(Discord_MessageHandle *self, Discord_UserHandle *returnValue)
bool DISCORD_API Discord_ActivityInvite_IsValid(Discord_ActivityInvite *self)
void DISCORD_API Discord_DeviceAuthorizationArgs_SetClientId(Discord_DeviceAuthorizationArgs *self, uint64_t value)
bool DISCORD_API Discord_UserHandle_GameActivity(Discord_UserHandle *self, Discord_Activity *returnValue)
void DISCORD_API Discord_ClientResult_SetSuccessful(Discord_ClientResult *self, bool value)
void DISCORD_API Discord_Client_SetOutputDevice(Discord_Client *self, Discord_String deviceId, Discord_Client_SetOutputDeviceCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_ActivityTimestamps_Init(Discord_ActivityTimestamps *self)
uint64_t DISCORD_API Discord_ActivityInvite_SenderId(Discord_ActivityInvite *self)
void DISCORD_API Discord_Client_EditUserMessage(Discord_Client *self, uint64_t recipientId, uint64_t messageId, Discord_String content, Discord_Client_EditUserMessageCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
Discord_Call_Status DISCORD_API Discord_Call_GetStatus(Discord_Call *self)
bool DISCORD_API Discord_ActivityAssets_SmallUrl(Discord_ActivityAssets *self, Discord_String *returnValue)
void DISCORD_API Discord_Client_Disconnect(Discord_Client *self)
void DISCORD_API Discord_RelationshipHandle_Drop(Discord_RelationshipHandle *self)
void DISCORD_API Discord_VADThresholdSettings_SetAutomatic(Discord_VADThresholdSettings *self, bool value)
bool DISCORD_API Discord_ActivityAssets_LargeUrl(Discord_ActivityAssets *self, Discord_String *returnValue)
void(*) Discord_Client_LobbyMemberAddedCallback(uint64_t lobbyId, uint64_t memberId, void *userData)
void DISCORD_API Discord_Client_SetVoiceParticipantChangedCallback(Discord_Client *self, Discord_Client_VoiceParticipantChangedCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
uint64_t DISCORD_API Discord_CallInfoHandle_ChannelId(Discord_CallInfoHandle *self)
void(*) Discord_Client_RelationshipGroupsUpdatedCallback(uint64_t userId, void *userData)
void DISCORD_API Discord_VoiceSettings_SetInputMode(Discord_VoiceSettings *self, Discord_VoiceInputModeType value)
void(*) Discord_Client_SendFriendRequestCallback(Discord_ClientResult *result, void *userData)
bool DISCORD_API Discord_ActivityAssets_SmallImage(Discord_ActivityAssets *self, Discord_String *returnValue)
Discord_AudioModeType DISCORD_API Discord_Call_GetAudioMode(Discord_Call *self)
void(*) Discord_Client_EditUserMessageCallback(Discord_ClientResult *result, void *userData)
void DISCORD_API Discord_Client_JoinLinkedLobbyGuild(Discord_Client *self, uint64_t lobbyId, Discord_Client_ProvisionalUserMergeRequiredCallback provisionalUserMergeRequiredCallback, Discord_FreeFn provisionalUserMergeRequiredCallback__userDataFree, void *provisionalUserMergeRequiredCallback__userData, Discord_Client_JoinLinkedLobbyGuildCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
uint64_t DISCORD_API Discord_MessageHandle_ChannelId(Discord_MessageHandle *self)
void DISCORD_API Discord_ActivityButton_SetLabel(Discord_ActivityButton *self, Discord_String value)
void DISCORD_API Discord_AdditionalContent_SetType(Discord_AdditionalContent *self, Discord_AdditionalContentType value)
void(*) Discord_Client_SendActivityInviteCallback(Discord_ClientResult *result, void *userData)
void(*) Discord_Client_ActivityJoinCallback(Discord_String joinSecret, void *userData)
DISCORD_API void Discord_Free(void *ptr)
void DISCORD_API Discord_Client_AddVoiceLogCallback(Discord_Client *self, Discord_Client_LogCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData, Discord_LoggingSeverity minSeverity)
void DISCORD_API Discord_AudioDevice_Id(Discord_AudioDevice *self, Discord_String *returnValue)
void DISCORD_API Discord_LobbyHandle_LobbyMembers(Discord_LobbyHandle *self, Discord_LobbyMemberHandleSpan *returnValue)
void DISCORD_API Discord_GuildChannel_Clone(Discord_GuildChannel *self, Discord_GuildChannel const *arg0)
void DISCORD_API Discord_ActivitySecrets_Drop(Discord_ActivitySecrets *self)
void(*) Discord_Client_ActivityJoinWithApplicationCallback(uint64_t applicationId, Discord_String joinSecret, void *userData)
void DISCORD_API Discord_Client_SetOutputVolume(Discord_Client *self, float outputVolume)
void(*) Discord_Client_GetLobbyMessagesCallback(Discord_ClientResult *result, Discord_MessageHandleSpan messages, void *userData)
void(*) Discord_Client_EndCallsCallback(void *userData)
void DISCORD_API Discord_ClientCreateOptions_Drop(Discord_ClientCreateOptions *self)
int32_t DISCORD_API Discord_ActivityParty_CurrentSize(Discord_ActivityParty *self)
void DISCORD_API Discord_Call_SetLocalMute(Discord_Call *self, uint64_t userId, bool mute)
void(*) Discord_Call_OnSpeakingStatusChanged(uint64_t userId, bool isPlayingSound, void *userData)
void DISCORD_API Discord_Client_AcceptActivityInvite(Discord_Client *self, Discord_ActivityInvite *invite, Discord_Client_AcceptActivityInviteCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_Activity_SetState(Discord_Activity *self, Discord_String *value)
void DISCORD_API Discord_Client_ExchangeChildToken(Discord_Client *self, Discord_String parentApplicationToken, uint64_t childApplicationId, Discord_Client_ExchangeChildTokenCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void DISCORD_API Discord_Client_SetDeviceChangeCallback(Discord_Client *self, Discord_Client_DeviceChangeCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void DISCORD_API Discord_VoiceSettings_SetInputVolume(Discord_VoiceSettings *self, float value)
void DISCORD_API Discord_Call_SetOnVoiceStateChangedCallback(Discord_Call *self, Discord_Call_OnVoiceStateChanged cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
bool DISCORD_API Discord_Client_GetSelfDeafAll(Discord_Client *self)
bool DISCORD_API Discord_AuthorizationArgs_CodeChallenge(Discord_AuthorizationArgs *self, Discord_AuthorizationCodeChallenge *returnValue)
void DISCORD_API Discord_Call_SetPTTActive(Discord_Call *self, bool active)
void DISCORD_API Discord_Client_SetThreadPriority(Discord_Client *self, Discord_Client_Thread thread, int32_t priority)
void DISCORD_API Discord_Client_GetTokenFromDevice(Discord_Client *self, Discord_DeviceAuthorizationArgs *args, Discord_Client_TokenExchangeCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void DISCORD_API Discord_UserMessageSummary_Drop(Discord_UserMessageSummary *self)
struct Discord_Properties Discord_Properties
void DISCORD_API Discord_ActivityButton_Label(Discord_ActivityButton *self, Discord_String *returnValue)
void DISCORD_API Discord_DeviceAuthorizationArgs_SetScopes(Discord_DeviceAuthorizationArgs *self, Discord_String value)
bool DISCORD_API Discord_VoiceStateHandle_SelfDeaf(Discord_VoiceStateHandle *self)
Discord_ActivityActionTypes DISCORD_API Discord_ActivityInvite_Type(Discord_ActivityInvite *self)
bool DISCORD_API Discord_VoiceSettings_SelfMute(Discord_VoiceSettings *self)
uint64_t DISCORD_API Discord_RelationshipHandle_Id(Discord_RelationshipHandle *self)
void DISCORD_API Discord_Client_SendGameFriendRequestById(Discord_Client *self, uint64_t userId, Discord_Client_UpdateRelationshipCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
bool DISCORD_API Discord_Client_IsAuthenticated(Discord_Client *self)
void DISCORD_API Discord_Client_RejectDiscordFriendRequest(Discord_Client *self, uint64_t userId, Discord_Client_UpdateRelationshipCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
bool DISCORD_API Discord_VoiceSettings_NoiseSuppression(Discord_VoiceSettings *self)
void DISCORD_API Discord_ClientResult_SetType(Discord_ClientResult *self, Discord_ErrorType value)
uint64_t DISCORD_API Discord_ActivityInvite_ChannelId(Discord_ActivityInvite *self)
void(*) Discord_Client_DeleteUserMessageCallback(Discord_ClientResult *result, void *userData)
void DISCORD_API Discord_Activity_SetApplicationId(Discord_Activity *self, uint64_t *value)
void DISCORD_API Discord_AuthorizationArgs_SetClientId(Discord_AuthorizationArgs *self, uint64_t value)
void(*) Discord_Client_GetCurrentInputDeviceCallback(Discord_AudioDevice const *device, void *userData)
void DISCORD_API Discord_AuthorizationArgs_SetCodeChallenge(Discord_AuthorizationArgs *self, Discord_AuthorizationCodeChallenge *value)
void DISCORD_API Discord_VADThresholdSettings_SetVadThreshold(Discord_VADThresholdSettings *self, float value)
bool DISCORD_API Discord_MessageHandle_Channel(Discord_MessageHandle *self, Discord_ChannelHandle *returnValue)
bool DISCORD_API Discord_Activity_Details(Discord_Activity *self, Discord_String *returnValue)
uint64_t DISCORD_API Discord_MessageHandle_EditedTimestamp(Discord_MessageHandle *self)
void DISCORD_API Discord_Client_UnmergeIntoProvisionalAccount(Discord_Client *self, uint64_t applicationId, Discord_AuthenticationExternalAuthType externalAuthType, Discord_String externalAuthToken, Discord_Client_UnmergeIntoProvisionalAccountCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void DISCORD_API Discord_ActivityInvite_SetSessionId(Discord_ActivityInvite *self, Discord_String value)
void DISCORD_API Discord_Client_GetRelationshipsByGroup(Discord_Client *self, Discord_RelationshipGroupType groupType, Discord_RelationshipHandleSpan *returnValue)
uint64_t DISCORD_API Discord_LinkedLobby_ApplicationId(Discord_LinkedLobby *self)
void DISCORD_API Discord_AdditionalContent_Init(Discord_AdditionalContent *self)
bool DISCORD_API Discord_VoiceSettings_EchoCancellation(Discord_VoiceSettings *self)
void DISCORD_API Discord_GuildMinimal_Drop(Discord_GuildMinimal *self)
void(*) Discord_Client_ExchangeChildTokenCallback(Discord_ClientResult *result, Discord_String accessToken, Discord_AuthorizationTokenType tokenType, int32_t expiresIn, Discord_String scopes, void *userData)
void DISCORD_API Discord_ActivityParty_Clone(Discord_ActivityParty *self, Discord_ActivityParty const *arg0)
void DISCORD_API Discord_Client_SetGameWindowPid(Discord_Client *self, int32_t pid)
void DISCORD_API Discord_Activity_SetType(Discord_Activity *self, Discord_ActivityTypes value)
void DISCORD_API Discord_AdditionalContent_SetCount(Discord_AdditionalContent *self, uint8_t value)
bool DISCORD_API Discord_ActivityAssets_SmallText(Discord_ActivityAssets *self, Discord_String *returnValue)
void DISCORD_API Discord_ClientResult_ToString(Discord_ClientResult *self, Discord_String *returnValue)
void(*) Discord_Client_TokenExpirationCallback(void *userData)
void DISCORD_API Discord_UserHandle_AvatarTypeToString(Discord_UserHandle_AvatarType type, Discord_String *returnValue)
void DISCORD_API Discord_Client_RevokeToken(Discord_Client *self, uint64_t applicationId, Discord_String token, Discord_Client_RevokeTokenCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void DISCORD_API Discord_ClientCreateOptions_SetCpuAffinityMask(Discord_ClientCreateOptions *self, uint64_t *value)
void DISCORD_API Discord_Client_Authorize(Discord_Client *self, Discord_AuthorizationArgs *args, Discord_Client_AuthorizationCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void DISCORD_API Discord_Client_SetSelfMuteAll(Discord_Client *self, bool mute)
bool DISCORD_API Discord_Call_GetVoiceStateHandle(Discord_Call *self, uint64_t userId, Discord_VoiceStateHandle *returnValue)
void DISCORD_API Discord_AuthorizationCodeVerifier_SetVerifier(Discord_AuthorizationCodeVerifier *self, Discord_String value)
uint64_t DISCORD_API Discord_MessageHandle_RecipientId(Discord_MessageHandle *self)
Discord_AuthenticationCodeChallengeMethod DISCORD_API Discord_AuthorizationCodeChallenge_Method(Discord_AuthorizationCodeChallenge *self)
void DISCORD_API Discord_VoiceSettings_SetSelfMute(Discord_VoiceSettings *self, bool value)
void DISCORD_API Discord_GuildChannel_SetIsViewableAndWriteableByAllMembers(Discord_GuildChannel *self, bool value)
void DISCORD_API Discord_Client_SendUserMessageWithMetadata(Discord_Client *self, uint64_t recipientId, Discord_String content, Discord_Properties metadata, Discord_Client_SendUserMessageCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
bool DISCORD_API Discord_Activity_ApplicationId(Discord_Activity *self, uint64_t *returnValue)
void DISCORD_API Discord_ActivityTimestamps_Clone(Discord_ActivityTimestamps *self, Discord_ActivityTimestamps const *arg0)
bool DISCORD_API Discord_LobbyMemberHandle_User(Discord_LobbyMemberHandle *self, Discord_UserHandle *returnValue)
void DISCORD_API Discord_ClientCreateOptions_SetWebBase(Discord_ClientCreateOptions *self, Discord_String value)
void DISCORD_API Discord_ActivityButton_Drop(Discord_ActivityButton *self)
void(*) Discord_Call_OnParticipantChanged(uint64_t userId, bool added, void *userData)
uint64_t DISCORD_API Discord_CallInfoHandle_GuildId(Discord_CallInfoHandle *self)
void(*) Discord_Client_AuthorizeDeviceScreenClosedCallback(void *userData)
void DISCORD_API Discord_Client_SetNoAudioInputCallback(Discord_Client *self, Discord_Client_NoAudioInputCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void DISCORD_API Discord_Client_AddLogCallback(Discord_Client *self, Discord_Client_LogCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData, Discord_LoggingSeverity minSeverity)
bool DISCORD_API Discord_Call_GetSelfDeaf(Discord_Call *self)
void DISCORD_API Discord_Client_SetActivityInviteCreatedCallback(Discord_Client *self, Discord_Client_ActivityInviteCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_Call_ErrorToString(Discord_Call_Error type, Discord_String *returnValue)
void DISCORD_API Discord_UserHandle_Clone(Discord_UserHandle *self, Discord_UserHandle const *arg0)
void DISCORD_API Discord_UserHandle_Relationship(Discord_UserHandle *self, Discord_RelationshipHandle *returnValue)
void DISCORD_API Discord_Client_SendActivityInvite(Discord_Client *self, uint64_t userId, Discord_String content, Discord_Client_SendActivityInviteCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
float DISCORD_API Discord_VADThresholdSettings_VadThreshold(Discord_VADThresholdSettings *self)
Discord_AdditionalContentType DISCORD_API Discord_AdditionalContent_Type(Discord_AdditionalContent *self)
void DISCORD_API Discord_Client_GetDefaultCommunicationScopes(Discord_String *returnValue)
uint64_t DISCORD_API Discord_ActivityTimestamps_End(Discord_ActivityTimestamps *self)
void DISCORD_API Discord_MessageHandle_Drop(Discord_MessageHandle *self)
void DISCORD_API Discord_AudioDevice_SetId(Discord_AudioDevice *self, Discord_String value)
uint64_t DISCORD_API Discord_MessageHandle_Id(Discord_MessageHandle *self)
void DISCORD_API Discord_ActivityAssets_SetLargeText(Discord_ActivityAssets *self, Discord_String *value)
void DISCORD_API Discord_Client_AcceptDiscordFriendRequest(Discord_Client *self, uint64_t userId, Discord_Client_UpdateRelationshipCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_AdditionalContent_SetTitle(Discord_AdditionalContent *self, Discord_String *value)
void(*) Discord_Client_RevokeTokenCallback(Discord_ClientResult *result, void *userData)
void DISCORD_API Discord_Client_SetEngineManagedAudioSession(Discord_Client *self, bool isEngineManaged)
bool DISCORD_API Discord_GuildChannel_IsLinkable(Discord_GuildChannel *self)
bool DISCORD_API Discord_Activity_State(Discord_Activity *self, Discord_String *returnValue)
void DISCORD_API Discord_LobbyMemberHandle_Clone(Discord_LobbyMemberHandle *self, Discord_LobbyMemberHandle const *other)
void DISCORD_API Discord_AuthorizationArgs_SetScopes(Discord_AuthorizationArgs *self, Discord_String value)
void(*) Discord_Client_GetDiscordClientConnectedUserCallback(Discord_ClientResult *result, Discord_UserHandle *user, void *userData)
void(*) Discord_Client_JoinLinkedLobbyGuildCallback(Discord_ClientResult *result, Discord_String inviteUrl, void *userData)
uint64_t DISCORD_API Discord_UserMessageSummary_UserId(Discord_UserMessageSummary *self)
void DISCORD_API Discord_Client_RemoveGameFriend(Discord_Client *self, uint64_t userId, Discord_Client_UpdateRelationshipCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_Call_SetStatusChangedCallback(Discord_Call *self, Discord_Call_OnStatusChanged cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_ClientResult_SetErrorCode(Discord_ClientResult *self, int32_t value)
void DISCORD_API Discord_ActivityInvite_SessionId(Discord_ActivityInvite *self, Discord_String *returnValue)
void DISCORD_API Discord_ActivityParty_SetPrivacy(Discord_ActivityParty *self, Discord_ActivityPartyPrivacy value)
void(*) Discord_Client_UserAudioReceivedCallback(uint64_t userId, int16_t *data, uint64_t samplesPerChannel, int32_t sampleRate, uint64_t channels, bool *outShouldMute, void *userData)
void DISCORD_API Discord_Call_SetVADThreshold(Discord_Call *self, bool automatic, float threshold)
void DISCORD_API Discord_ActivityParty_Drop(Discord_ActivityParty *self)
void DISCORD_API Discord_VoiceSettings_PttKey(Discord_VoiceSettings *self, Discord_String *returnValue)
void DISCORD_API Discord_Client_SendDiscordFriendRequest(Discord_Client *self, Discord_String username, Discord_Client_SendFriendRequestCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_Client_SendLobbyMessage(Discord_Client *self, uint64_t lobbyId, Discord_String content, Discord_Client_SendUserMessageCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_ActivityParty_Id(Discord_ActivityParty *self, Discord_String *returnValue)
uint64_t DISCORD_API Discord_LobbyHandle_Id(Discord_LobbyHandle *self)
bool DISCORD_API Discord_ClientResult_Retryable(Discord_ClientResult *self)
void DISCORD_API Discord_Client_EndCall(Discord_Client *self, uint64_t channelId, Discord_Client_EndCallCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void(*) Discord_Client_ProvisionalUserMergeRequiredCallback(void *userData)
uint64_t DISCORD_API Discord_LinkedChannel_Id(Discord_LinkedChannel *self)
void DISCORD_API Discord_ChannelHandle_Clone(Discord_ChannelHandle *self, Discord_ChannelHandle const *other)
void DISCORD_API Discord_LobbyMemberHandle_Drop(Discord_LobbyMemberHandle *self)
void DISCORD_API Discord_VoiceSettings_SetSelfDeaf(Discord_VoiceSettings *self, bool value)
void DISCORD_API Discord_ActivityAssets_Init(Discord_ActivityAssets *self)
void DISCORD_API Discord_CallInfoHandle_GetParticipants(Discord_CallInfoHandle *self, Discord_UInt64Span *returnValue)
void DISCORD_API Discord_VoiceSettings_SetNoiseCancellation(Discord_VoiceSettings *self, bool value)
void DISCORD_API Discord_AuthorizationArgs_Drop(Discord_AuthorizationArgs *self)
void DISCORD_API Discord_Client_SetRelationshipDeletedCallback(Discord_Client *self, Discord_Client_RelationshipDeletedCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_Client_SetNoiseSuppression(Discord_Client *self, bool on)
void DISCORD_API Discord_Client_InitWithOptions(Discord_Client *self, Discord_ClientCreateOptions *options)
Discord_AdditionalContentType
bool DISCORD_API Discord_UserHandle_Avatar(Discord_UserHandle *self, Discord_String *returnValue)
void DISCORD_API Discord_GuildChannel_Drop(Discord_GuildChannel *self)
bool DISCORD_API Discord_Activity_DetailsUrl(Discord_Activity *self, Discord_String *returnValue)
void DISCORD_API Discord_UserHandle_DisplayName(Discord_UserHandle *self, Discord_String *returnValue)
bool DISCORD_API Discord_RelationshipHandle_IsSpamRequest(Discord_RelationshipHandle *self)
void DISCORD_API Discord_Call_SetSelfMute(Discord_Call *self, bool mute)
Discord_RelationshipGroupType
void DISCORD_API Discord_Client_GetCurrentOutputDevice(Discord_Client *self, Discord_Client_GetCurrentOutputDeviceCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_ActivityAssets_SetLargeImage(Discord_ActivityAssets *self, Discord_String *value)
void DISCORD_API Discord_Client_GetRelationshipHandle(Discord_Client *self, uint64_t userId, Discord_RelationshipHandle *returnValue)
void(*) Discord_Client_GetOutputDevicesCallback(Discord_AudioDeviceSpan devices, void *userData)
uint64_t DISCORD_API Discord_LobbyMemberHandle_Id(Discord_LobbyMemberHandle *self)
void(*) Discord_Client_UpdateStatusCallback(Discord_ClientResult *result, void *userData)
void DISCORD_API Discord_Client_SetHttpRequestTimeout(Discord_Client *self, int32_t httpTimeoutInMilliseconds)
Discord_VoiceInputModeType
void DISCORD_API Discord_LinkedChannel_Clone(Discord_LinkedChannel *self, Discord_LinkedChannel const *arg0)
void DISCORD_API Discord_ClientResult_ResponseBody(Discord_ClientResult *self, Discord_String *returnValue)
bool DISCORD_API Discord_AuthorizationArgs_IntegrationType(Discord_AuthorizationArgs *self, Discord_IntegrationType *returnValue)
bool DISCORD_API Discord_Activity_Timestamps(Discord_Activity *self, Discord_ActivityTimestamps *returnValue)
bool DISCORD_API Discord_Client_GetLobbyHandle(Discord_Client *self, uint64_t lobbyId, Discord_LobbyHandle *returnValue)
uint32_t DISCORD_API Discord_Call_GetPTTReleaseDelay(Discord_Call *self)
void DISCORD_API Discord_GuildMinimal_Clone(Discord_GuildMinimal *self, Discord_GuildMinimal const *arg0)
struct Discord_String Discord_String
void DISCORD_API Discord_LobbyHandle_Drop(Discord_LobbyHandle *self)
DISCORD_API void Discord_RunCallbacks()
bool DISCORD_API Discord_MessageHandle_ApplicationId(Discord_MessageHandle *self, uint64_t *returnValue)
void DISCORD_API Discord_VoiceStateHandle_Clone(Discord_VoiceStateHandle *self, Discord_VoiceStateHandle const *other)
void DISCORD_API Discord_Client_EndCalls(Discord_Client *self, Discord_Client_EndCallsCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void(*) Discord_Client_GetCurrentOutputDeviceCallback(Discord_AudioDevice const *device, void *userData)
void DISCORD_API Discord_Client_SetEchoCancellation(Discord_Client *self, bool on)
void DISCORD_API Discord_Activity_GetButtons(Discord_Activity *self, Discord_ActivityButtonSpan *returnValue)
void DISCORD_API Discord_AuthorizationCodeChallenge_Init(Discord_AuthorizationCodeChallenge *self)
bool DISCORD_API Discord_Client_GetUser(Discord_Client *self, uint64_t userId, Discord_UserHandle *returnValue)
void DISCORD_API Discord_CallInfoHandle_Drop(Discord_CallInfoHandle *self)
void DISCORD_API Discord_Activity_SetParty(Discord_Activity *self, Discord_ActivityParty *value)
void DISCORD_API Discord_Client_SetStatusChangedCallback(Discord_Client *self, Discord_Client_OnStatusChanged cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_MessageHandle_Metadata(Discord_MessageHandle *self, Discord_Properties *returnValue)
void DISCORD_API Discord_ActivityAssets_SetSmallUrl(Discord_ActivityAssets *self, Discord_String *value)
void DISCORD_API Discord_UserHandle_Drop(Discord_UserHandle *self)
uint8_t DISCORD_API Discord_AdditionalContent_Count(Discord_AdditionalContent *self)
bool DISCORD_API Discord_LobbyMemberHandle_CanLinkLobby(Discord_LobbyMemberHandle *self)
void DISCORD_API Discord_ActivityInvite_SetPartyId(Discord_ActivityInvite *self, Discord_String value)
void DISCORD_API Discord_Client_SendLobbyMessageWithMetadata(Discord_Client *self, uint64_t lobbyId, Discord_String content, Discord_Properties metadata, Discord_Client_SendUserMessageCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
int32_t DISCORD_API Discord_Client_GetVersionPatch()
void DISCORD_API Discord_GuildChannel_SetId(Discord_GuildChannel *self, uint64_t value)
void DISCORD_API Discord_Client_ErrorToString(Discord_Client_Error type, Discord_String *returnValue)
void DISCORD_API Discord_Client_GetUserMessageSummaries(Discord_Client *self, Discord_Client_UserMessageSummariesCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_ActivityInvite_SetApplicationId(Discord_ActivityInvite *self, uint64_t value)
bool DISCORD_API Discord_AuthorizationArgs_Nonce(Discord_AuthorizationArgs *self, Discord_String *returnValue)
bool DISCORD_API Discord_Activity_ParentApplicationId(Discord_Activity *self, uint64_t *returnValue)
void DISCORD_API Discord_RelationshipHandle_Clone(Discord_RelationshipHandle *self, Discord_RelationshipHandle const *other)
Discord_ExternalIdentityProviderType DISCORD_API Discord_UserApplicationProfileHandle_ProviderType(Discord_UserApplicationProfileHandle *self)
void DISCORD_API Discord_LinkedLobby_SetApplicationId(Discord_LinkedLobby *self, uint64_t value)
bool DISCORD_API Discord_GuildChannel_ParentId(Discord_GuildChannel *self, uint64_t *returnValue)
Discord_AudioSystem DISCORD_API Discord_ClientCreateOptions_ExperimentalAudioSystem(Discord_ClientCreateOptions *self)
void DISCORD_API Discord_Client_LeaveLobby(Discord_Client *self, uint64_t lobbyId, Discord_Client_LeaveLobbyCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
bool DISCORD_API Discord_ClientCreateOptions_ExperimentalAndroidPreventCommsForBluetooth(Discord_ClientCreateOptions *self)
bool DISCORD_API Discord_AdditionalContent_Title(Discord_AdditionalContent *self, Discord_String *returnValue)
Discord_UserHandle_AvatarType
void DISCORD_API Discord_Client_GetCalls(Discord_Client *self, Discord_CallSpan *returnValue)
uint64_t DISCORD_API Discord_GuildMinimal_Id(Discord_GuildMinimal *self)
void DISCORD_API Discord_Client_RefreshToken(Discord_Client *self, uint64_t applicationId, Discord_String refreshToken, Discord_Client_TokenExchangeCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void DISCORD_API Discord_Client_FetchCurrentUser(Discord_Client *self, Discord_AuthorizationTokenType tokenType, Discord_String token, Discord_Client_FetchCurrentUserCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void DISCORD_API Discord_ActivityParty_Init(Discord_ActivityParty *self)
void DISCORD_API Discord_Client_SetMessageUpdatedCallback(Discord_Client *self, Discord_Client_MessageUpdatedCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_Client_SetVoiceSettingsUpdatedCallback(Discord_Client *self, Discord_Client_VoiceSettingsUpdatedCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void DISCORD_API Discord_Activity_SetSecrets(Discord_Activity *self, Discord_ActivitySecrets *value)
void DISCORD_API Discord_Client_SetNoiseCancellation(Discord_Client *self, bool on)
void(*) Discord_Client_GetInputDevicesCallback(Discord_AudioDeviceSpan devices, void *userData)
void DISCORD_API Discord_GuildChannel_SetType(Discord_GuildChannel *self, Discord_ChannelType value)
void DISCORD_API Discord_Client_SetOnlineStatus(Discord_Client *self, Discord_StatusType status, Discord_Client_UpdateStatusCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void DISCORD_API Discord_UserHandle_Username(Discord_UserHandle *self, Discord_String *returnValue)
Discord_ActivityGamePlatforms
void DISCORD_API Discord_ActivityParty_SetId(Discord_ActivityParty *self, Discord_String value)
bool DISCORD_API Discord_Call_GetLocalMute(Discord_Call *self, uint64_t userId)
void DISCORD_API Discord_Activity_SetStateUrl(Discord_Activity *self, Discord_String *value)
void DISCORD_API Discord_Client_SetAuthorizeDeviceScreenClosedCallback(Discord_Client *self, Discord_Client_AuthorizeDeviceScreenClosedCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
int32_t DISCORD_API Discord_Client_GetVersionMajor()
void DISCORD_API Discord_AuthorizationCodeChallenge_Clone(Discord_AuthorizationCodeChallenge *self, Discord_AuthorizationCodeChallenge const *arg0)
void DISCORD_API Discord_VoiceSettings_SetNoiseSuppression(Discord_VoiceSettings *self, bool value)
void DISCORD_API Discord_Client_SetAutomaticGainControl(Discord_Client *self, bool on)
Discord_RelationshipType DISCORD_API Discord_RelationshipHandle_DiscordRelationshipType(Discord_RelationshipHandle *self)
void DISCORD_API Discord_Client_SetShowingChat(Discord_Client *self, bool showingChat)
void DISCORD_API Discord_VADThresholdSettings_Drop(Discord_VADThresholdSettings *self)
Discord_ActivityTypes DISCORD_API Discord_Activity_Type(Discord_Activity *self)
void(*) Discord_Client_UpdateProvisionalAccountDisplayNameCallback(Discord_ClientResult *result, void *userData)
void DISCORD_API Discord_GuildChannel_SetPosition(Discord_GuildChannel *self, int32_t value)
void DISCORD_API Discord_ClientResult_SetError(Discord_ClientResult *self, Discord_String value)
void DISCORD_API Discord_Client_BlockUser(Discord_Client *self, uint64_t userId, Discord_Client_UpdateRelationshipCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void(*) Discord_Client_RelationshipCreatedCallback(uint64_t userId, bool isDiscordRelationshipUpdate, void *userData)
void DISCORD_API Discord_Client_OpenAuthorizeDeviceScreen(Discord_Client *self, uint64_t clientId, Discord_String userCode)
void DISCORD_API Discord_Client_GetCurrentInputDevice(Discord_Client *self, Discord_Client_GetCurrentInputDeviceCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_ActivityButton_Url(Discord_ActivityButton *self, Discord_String *returnValue)
void DISCORD_API Discord_Client_UnlinkChannelFromLobby(Discord_Client *self, uint64_t lobbyId, Discord_Client_LinkOrUnlinkChannelCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void DISCORD_API Discord_ActivityInvite_SetIsValid(Discord_ActivityInvite *self, bool value)
void DISCORD_API Discord_LinkedChannel_Drop(Discord_LinkedChannel *self)
Discord_ActivityActionTypes
void DISCORD_API Discord_Client_GetRelationships(Discord_Client *self, Discord_RelationshipHandleSpan *returnValue)
void DISCORD_API Discord_UserApplicationProfileHandle_Drop(Discord_UserApplicationProfileHandle *self)
void DISCORD_API Discord_ActivitySecrets_Clone(Discord_ActivitySecrets *self, Discord_ActivitySecrets const *arg0)
void DISCORD_API Discord_LinkedLobby_SetLobbyId(Discord_LinkedLobby *self, uint64_t value)
void DISCORD_API Discord_MessageHandle_Clone(Discord_MessageHandle *self, Discord_MessageHandle const *other)
void(*) Discord_Client_FetchCurrentUserCallback(Discord_ClientResult *result, uint64_t id, Discord_String name, void *userData)
bool DISCORD_API Discord_VADThresholdSettings_Automatic(Discord_VADThresholdSettings *self)
void DISCORD_API Discord_GuildChannel_SetParentId(Discord_GuildChannel *self, uint64_t *value)
void DISCORD_API Discord_Client_InitWithBases(Discord_Client *self, Discord_String apiBase, Discord_String webBase)
void(*) Discord_Client_UserMessageSummariesCallback(Discord_ClientResult *result, Discord_UserMessageSummarySpan summaries, void *userData)
bool DISCORD_API Discord_Activity_Equals(Discord_Activity *self, Discord_Activity const *other)
bool DISCORD_API Discord_Client_StartCallWithAudioCallbacks(Discord_Client *self, uint64_t lobbyId, Discord_Client_UserAudioReceivedCallback receivedCb, Discord_FreeFn receivedCb__userDataFree, void *receivedCb__userData, Discord_Client_UserAudioCapturedCallback capturedCb, Discord_FreeFn capturedCb__userDataFree, void *capturedCb__userData, Discord_Call *returnValue)
void DISCORD_API Discord_Call_SetSpeakingStatusChangedCallback(Discord_Call *self, Discord_Call_OnSpeakingStatusChanged cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_GuildChannel_SetName(Discord_GuildChannel *self, Discord_String value)
void DISCORD_API Discord_ActivityAssets_SetInviteCoverImage(Discord_ActivityAssets *self, Discord_String *value)
void DISCORD_API Discord_ActivityButton_Init(Discord_ActivityButton *self)
bool DISCORD_API Discord_AuthorizationArgs_State(Discord_AuthorizationArgs *self, Discord_String *returnValue)
void DISCORD_API Discord_Client_GetTokenFromProvisionalMerge(Discord_Client *self, uint64_t applicationId, Discord_String code, Discord_String codeVerifier, Discord_String redirectUri, Discord_AuthenticationExternalAuthType externalAuthType, Discord_String externalAuthToken, Discord_Client_TokenExchangeCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void DISCORD_API Discord_UserApplicationProfileHandle_ProviderIssuedUserId(Discord_UserApplicationProfileHandle *self, Discord_String *returnValue)
uint64_t DISCORD_API Discord_AuthorizationArgs_ClientId(Discord_AuthorizationArgs *self)
void DISCORD_API Discord_Client_StatusToString(Discord_Client_Status type, Discord_String *returnValue)
void DISCORD_API Discord_ActivityAssets_SetSmallImage(Discord_ActivityAssets *self, Discord_String *value)
bool DISCORD_API Discord_Client_GetMessageHandle(Discord_Client *self, uint64_t messageId, Discord_MessageHandle *returnValue)
void DISCORD_API Discord_Client_ClearRichPresence(Discord_Client *self)
void DISCORD_API Discord_AuthorizationCodeVerifier_Verifier(Discord_AuthorizationCodeVerifier *self, Discord_String *returnValue)
void DISCORD_API Discord_Client_SetApplicationId(Discord_Client *self, uint64_t applicationId)
bool DISCORD_API Discord_LobbyHandle_GetLobbyMemberHandle(Discord_LobbyHandle *self, uint64_t memberId, Discord_LobbyMemberHandle *returnValue)
void DISCORD_API Discord_AdditionalContent_TypeToString(Discord_AdditionalContentType type, Discord_String *returnValue)
void(*) Discord_Client_LobbyMemberRemovedCallback(uint64_t lobbyId, uint64_t memberId, void *userData)
bool DISCORD_API Discord_Client_SetLogDir(Discord_Client *self, Discord_String path, Discord_LoggingSeverity minSeverity)
void DISCORD_API Discord_GuildChannel_SetLinkedLobby(Discord_GuildChannel *self, Discord_LinkedLobby *value)
void DISCORD_API Discord_UserApplicationProfileHandle_Metadata(Discord_UserApplicationProfileHandle *self, Discord_String *returnValue)
void(*) Discord_Client_MessageUpdatedCallback(uint64_t messageId, void *userData)
Discord_ChannelType DISCORD_API Discord_ChannelHandle_Type(Discord_ChannelHandle *self)
void DISCORD_API Discord_Client_SetRelationshipGroupsUpdatedCallback(Discord_Client *self, Discord_Client_RelationshipGroupsUpdatedCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
uint64_t DISCORD_API Discord_ActivityInvite_MessageId(Discord_ActivityInvite *self)
void DISCORD_API Discord_Client_SetLobbyMemberRemovedCallback(Discord_Client *self, Discord_Client_LobbyMemberRemovedCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_ClientCreateOptions_SetApiBase(Discord_ClientCreateOptions *self, Discord_String value)
void(*) Discord_Client_DeviceChangeCallback(Discord_AudioDeviceSpan inputDevices, Discord_AudioDeviceSpan outputDevices, void *userData)
bool DISCORD_API Discord_VoiceStateHandle_SelfMute(Discord_VoiceStateHandle *self)
void DISCORD_API Discord_Activity_SetStatusDisplayType(Discord_Activity *self, Discord_StatusDisplayTypes *value)
int32_t DISCORD_API Discord_Client_GetVersionMinor()
bool DISCORD_API Discord_VoiceSettings_SelfDeaf(Discord_VoiceSettings *self)
void(*) Discord_Client_LinkOrUnlinkChannelCallback(Discord_ClientResult *result, void *userData)
bool DISCORD_API Discord_Client_GetCall(Discord_Client *self, uint64_t channelId, Discord_Call *returnValue)
DISCORD_API void * Discord_Alloc(size_t size)
void DISCORD_API Discord_Client_SendDiscordFriendRequestById(Discord_Client *self, uint64_t userId, Discord_Client_UpdateRelationshipCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_LinkedLobby_Init(Discord_LinkedLobby *self)
bool DISCORD_API Discord_GuildChannel_IsViewableAndWriteableByAllMembers(Discord_GuildChannel *self)
void DISCORD_API Discord_LobbyMemberHandle_Metadata(Discord_LobbyMemberHandle *self, Discord_Properties *returnValue)
void DISCORD_API Discord_Client_SetLobbyMemberUpdatedCallback(Discord_Client *self, Discord_Client_LobbyMemberUpdatedCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void(*) Discord_Client_SendUserMessageCallback(Discord_ClientResult *result, uint64_t messageId, void *userData)
void(*) Discord_Client_MessageCreatedCallback(uint64_t messageId, void *userData)
void DISCORD_API Discord_ClientResult_Clone(Discord_ClientResult *self, Discord_ClientResult const *arg0)
void DISCORD_API Discord_ActivityParty_SetCurrentSize(Discord_ActivityParty *self, int32_t value)
void DISCORD_API Discord_UserApplicationProfileHandle_Clone(Discord_UserApplicationProfileHandle *self, Discord_UserApplicationProfileHandle const *other)
void DISCORD_API Discord_Client_GetLobbyMessagesWithLimit(Discord_Client *self, uint64_t lobbyId, int32_t limit, Discord_Client_GetLobbyMessagesCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void(*) Discord_Client_SetInputDeviceCallback(Discord_ClientResult *result, void *userData)
void DISCORD_API Discord_Client_SetOpusHardwareCoding(Discord_Client *self, bool encode, bool decode)
void DISCORD_API Discord_ActivityInvite_SetType(Discord_ActivityInvite *self, Discord_ActivityActionTypes value)
void DISCORD_API Discord_ClientResult_SetRetryAfter(Discord_ClientResult *self, float value)
Discord_ActivityPartyPrivacy DISCORD_API Discord_ActivityParty_Privacy(Discord_ActivityParty *self)
void DISCORD_API Discord_Client_GetDefaultAudioDeviceId(Discord_String *returnValue)
void DISCORD_API Discord_Client_CreateOrJoinLobbyWithMetadata(Discord_Client *self, Discord_String secret, Discord_Properties lobbyMetadata, Discord_Properties memberMetadata, Discord_Client_CreateOrJoinLobbyCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void DISCORD_API Discord_MessageHandle_RawContent(Discord_MessageHandle *self, Discord_String *returnValue)
void DISCORD_API Discord_Activity_SetDetailsUrl(Discord_Activity *self, Discord_String *value)
void(*) Discord_Client_AuthorizeRequestCallback(void *userData)
void DISCORD_API Discord_VoiceSettings_SetAutomaticGainControl(Discord_VoiceSettings *self, bool value)
void DISCORD_API Discord_ClientCreateOptions_SetExperimentalAudioSystem(Discord_ClientCreateOptions *self, Discord_AudioSystem value)
void DISCORD_API Discord_LobbyHandle_LobbyMemberIds(Discord_LobbyHandle *self, Discord_UInt64Span *returnValue)
void DISCORD_API Discord_Call_Drop(Discord_Call *self)
void DISCORD_API Discord_Activity_SetName(Discord_Activity *self, Discord_String value)
void DISCORD_API Discord_ActivityTimestamps_Drop(Discord_ActivityTimestamps *self)
void DISCORD_API Discord_Client_CancelDiscordFriendRequest(Discord_Client *self, uint64_t userId, Discord_Client_UpdateRelationshipCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void(*) Discord_Client_GetGuildChannelsCallback(Discord_ClientResult *result, Discord_GuildChannelSpan guildChannels, void *userData)
void DISCORD_API Discord_UserHandle_AvatarUrl(Discord_UserHandle *self, Discord_UserHandle_AvatarType animatedType, Discord_UserHandle_AvatarType staticType, Discord_String *returnValue)
uint64_t DISCORD_API Discord_ActivityInvite_ParentApplicationId(Discord_ActivityInvite *self)
void DISCORD_API Discord_ChannelHandle_Recipients(Discord_ChannelHandle *self, Discord_UInt64Span *returnValue)
void DISCORD_API Discord_Client_SetAecDump(Discord_Client *self, bool on)
Discord_RelationshipType DISCORD_API Discord_RelationshipHandle_GameRelationshipType(Discord_RelationshipHandle *self)
void DISCORD_API Discord_AdditionalContent_Drop(Discord_AdditionalContent *self)
void DISCORD_API Discord_Client_CloseAuthorizeDeviceScreen(Discord_Client *self)
void DISCORD_API Discord_Client_UpdateRichPresence(Discord_Client *self, Discord_Activity *activity, Discord_Client_UpdateRichPresenceCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_AuthorizationArgs_SetState(Discord_AuthorizationArgs *self, Discord_String *value)
void DISCORD_API Discord_ActivityAssets_Clone(Discord_ActivityAssets *self, Discord_ActivityAssets const *arg0)
void(*) Discord_Client_UserAudioCapturedCallback(int16_t *data, uint64_t samplesPerChannel, int32_t sampleRate, uint64_t channels, void *userData)
void DISCORD_API Discord_MessageHandle_ModerationMetadata(Discord_MessageHandle *self, Discord_Properties *returnValue)
void DISCORD_API Discord_Client_AcceptGameFriendRequest(Discord_Client *self, uint64_t userId, Discord_Client_UpdateRelationshipCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
uint64_t DISCORD_API Discord_ActivityTimestamps_Start(Discord_ActivityTimestamps *self)
void(*) Discord_Client_AcceptActivityInviteCallback(Discord_ClientResult *result, Discord_String joinSecret, void *userData)
void DISCORD_API Discord_GuildChannel_Name(Discord_GuildChannel *self, Discord_String *returnValue)
void DISCORD_API Discord_Client_DeleteUserMessage(Discord_Client *self, uint64_t recipientId, uint64_t messageId, Discord_Client_DeleteUserMessageCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_Client_GetVersionHash(Discord_String *returnValue)
void DISCORD_API Discord_AuthorizationCodeChallenge_Challenge(Discord_AuthorizationCodeChallenge *self, Discord_String *returnValue)
bool DISCORD_API Discord_UserHandle_GlobalName(Discord_UserHandle *self, Discord_String *returnValue)
void DISCORD_API Discord_VoiceStateHandle_Drop(Discord_VoiceStateHandle *self)
void DISCORD_API Discord_Client_GetDiscordClientConnectedUser(Discord_Client *self, uint64_t applicationId, Discord_Client_GetDiscordClientConnectedUserCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
void DISCORD_API Discord_Client_SetVoiceLogDir(Discord_Client *self, Discord_String path, Discord_LoggingSeverity minSeverity)
uint64_t DISCORD_API Discord_UserHandle_Id(Discord_UserHandle *self)
void DISCORD_API Discord_ClientCreateOptions_WebBase(Discord_ClientCreateOptions *self, Discord_String *returnValue)
void DISCORD_API Discord_DeviceAuthorizationArgs_Scopes(Discord_DeviceAuthorizationArgs *self, Discord_String *returnValue)
bool DISCORD_API Discord_LobbyHandle_LinkedChannel(Discord_LobbyHandle *self, Discord_LinkedChannel *returnValue)
bool DISCORD_API Discord_Activity_StatusDisplayType(Discord_Activity *self, Discord_StatusDisplayTypes *returnValue)
void(*) Discord_Client_LobbyCreatedCallback(uint64_t lobbyId, void *userData)
void DISCORD_API Discord_LobbyHandle_Metadata(Discord_LobbyHandle *self, Discord_Properties *returnValue)
void DISCORD_API Discord_Client_SetInputDevice(Discord_Client *self, Discord_String deviceId, Discord_Client_SetInputDeviceCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void(*) Discord_Client_CreateOrJoinLobbyCallback(Discord_ClientResult *result, uint64_t lobbyId, void *userData)
void DISCORD_API Discord_AuthorizationCodeVerifier_Challenge(Discord_AuthorizationCodeVerifier *self, Discord_AuthorizationCodeChallenge *returnValue)
void DISCORD_API Discord_LinkedChannel_SetGuildId(Discord_LinkedChannel *self, uint64_t value)
Discord_Client_Status DISCORD_API Discord_Client_GetStatus(Discord_Client *self)
void(*) Discord_Client_UserMessagesWithLimitCallback(Discord_ClientResult *result, Discord_MessageHandleSpan messages, void *userData)
void DISCORD_API Discord_AdditionalContent_Clone(Discord_AdditionalContent *self, Discord_AdditionalContent const *arg0)
void DISCORD_API Discord_AuthorizationCodeVerifier_Clone(Discord_AuthorizationCodeVerifier *self, Discord_AuthorizationCodeVerifier const *arg0)
void DISCORD_API Discord_Client_RegisterAuthorizeRequestCallback(Discord_Client *self, Discord_Client_AuthorizeRequestCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
bool DISCORD_API Discord_AuthorizationArgs_CustomSchemeParam(Discord_AuthorizationArgs *self, Discord_String *returnValue)
void DISCORD_API Discord_Client_CreateAuthorizationCodeVerifier(Discord_Client *self, Discord_AuthorizationCodeVerifier *returnValue)
bool DISCORD_API Discord_ActivityAssets_InviteCoverImage(Discord_ActivityAssets *self, Discord_String *returnValue)
void(*) Discord_Call_OnVoiceStateChanged(uint64_t userId, void *userData)
void DISCORD_API Discord_ClientCreateOptions_Init(Discord_ClientCreateOptions *self)
void DISCORD_API Discord_ActivityInvite_SetSenderId(Discord_ActivityInvite *self, uint64_t value)
bool DISCORD_API Discord_Call_GetPTTActive(Discord_Call *self)
void DISCORD_API Discord_Client_Init(Discord_Client *self)
void DISCORD_API Discord_Client_UpdateProvisionalAccountDisplayName(Discord_Client *self, Discord_String name, Discord_Client_UpdateProvisionalAccountDisplayNameCallback callback, Discord_FreeFn callback__userDataFree, void *callback__userData)
Discord_AuthenticationExternalAuthType
bool DISCORD_API Discord_MessageHandle_AdditionalName(Discord_MessageHandle *self, Discord_String *returnValue)
void DISCORD_API Discord_VoiceSettings_Drop(Discord_VoiceSettings *self)
Discord_AuthorizationTokenType
bool DISCORD_API Discord_Client_GetCurrentUserV2(Discord_Client *self, Discord_UserHandle *returnValue)
void DISCORD_API Discord_Activity_AddButton(Discord_Activity *self, Discord_ActivityButton const *button)
void DISCORD_API Discord_Client_GetDefaultPresenceScopes(Discord_String *returnValue)
bool DISCORD_API Discord_ActivityAssets_LargeText(Discord_ActivityAssets *self, Discord_String *returnValue)
void DISCORD_API Discord_Client_GetUserGuilds(Discord_Client *self, Discord_Client_GetUserGuildsCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_ActivityInvite_Clone(Discord_ActivityInvite *self, Discord_ActivityInvite const *rhs)
uint64_t DISCORD_API Discord_Call_GetChannelId(Discord_Call *self)
bool DISCORD_API Discord_Client_ShowAudioRoutePicker(Discord_Client *self)
void DISCORD_API Discord_UserApplicationProfileHandle_Username(Discord_UserApplicationProfileHandle *self, Discord_String *returnValue)
void DISCORD_API Discord_ClientCreateOptions_Clone(Discord_ClientCreateOptions *self, Discord_ClientCreateOptions const *arg0)
void DISCORD_API Discord_ChannelHandle_Name(Discord_ChannelHandle *self, Discord_String *returnValue)
void DISCORD_API Discord_Call_SetParticipantChangedCallback(Discord_Call *self, Discord_Call_OnParticipantChanged cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_UserMessageSummary_Clone(Discord_UserMessageSummary *self, Discord_UserMessageSummary const *arg0)
void DISCORD_API Discord_Client_SetLobbyCreatedCallback(Discord_Client *self, Discord_Client_LobbyCreatedCallback cb, Discord_FreeFn cb__userDataFree, void *cb__userData)
void DISCORD_API Discord_Call_SetPTTReleaseDelay(Discord_Call *self, uint32_t releaseDelayMs)
void DISCORD_API Discord_ActivityAssets_SetSmallText(Discord_ActivityAssets *self, Discord_String *value)
void DISCORD_API Discord_Client_GetCurrentUser(Discord_Client *self, Discord_UserHandle *returnValue)
Discord_ActivityPartyPrivacy
Discord_StatusType DISCORD_API Discord_UserHandle_Status(Discord_UserHandle *self)
void DISCORD_API Discord_ActivityAssets_SetLargeUrl(Discord_ActivityAssets *self, Discord_String *value)
bool DISCORD_API Discord_Client_CanOpenMessageInDiscord(Discord_Client *self, uint64_t messageId)
Struct which controls what your rich presence looks like in the Discord client. If you don't specify ...
std::optional< std::string > InviteCoverImage() const
The invite cover image identifier or URL, rendered as a banner image on activity invites.
void SetLargeImage(std::optional< std::string > LargeImage)
Setter for ActivityAssets::LargeImage.
std::optional< std::string > SmallText() const
A tooltip string that is shown when the user hovers over the small image.
void SetLargeText(std::optional< std::string > LargeText)
Setter for ActivityAssets::LargeText.
ActivityAssets(ActivityAssets &&other) noexcept
Move constructor for ActivityAssets.
std::optional< std::string > SmallImage() const
The secondary image, rendered as a small circle over the largeImage.
ActivityAssets(const ActivityAssets &arg0)
Copy constructor for ActivityAssets.
void SetLargeUrl(std::optional< std::string > LargeUrl)
Setter for ActivityAssets::LargeUrl.
std::optional< std::string > LargeText() const
A tooltip string that is shown when the user hovers over the large image.
void SetSmallImage(std::optional< std::string > SmallImage)
Setter for ActivityAssets::SmallImage.
std::optional< std::string > SmallUrl() const
A URL that opens when the user clicks/taps the small image.
ActivityAssets & operator=(const ActivityAssets &arg0)
Copy assignment operator for ActivityAssets.
static const ActivityAssets nullobj
Uninitialized instance of ActivityAssets.
std::optional< std::string > LargeImage() const
The primary image identifier or URL, rendered as a large square icon on a user's rich presence.
std::optional< std::string > LargeUrl() const
A URL that opens when the user clicks/taps the large image.
void SetSmallText(std::optional< std::string > SmallText)
Setter for ActivityAssets::SmallText.
void SetInviteCoverImage(std::optional< std::string > InviteCoverImage)
Setter for ActivityAssets::InviteCoverImage.
ActivityAssets & operator=(ActivityAssets &&other) noexcept
Move assignment operator for ActivityAssets.
void SetSmallUrl(std::optional< std::string > SmallUrl)
Setter for ActivityAssets::SmallUrl.
An Activity represents one "thing" a user is doing on Discord and is part of their rich presence.
std::vector< discordpp::ActivityButton > GetButtons() const
Returns the custom buttons for the rich presence.
void SetDetailsUrl(std::optional< std::string > DetailsUrl)
Setter for Activity::DetailsUrl.
std::optional< uint64_t > ParentApplicationId() const
The application ID of the parent application that the activity is associated with if it exists....
static const Activity nullobj
Uninitialized instance of Activity.
std::optional< uint64_t > ApplicationId() const
The application ID of the game that the activity is associated with.
std::string Name() const
The name of the game or application that the activity is associated with.
void SetStateUrl(std::optional< std::string > StateUrl)
Setter for Activity::StateUrl.
void SetDetails(std::optional< std::string > Details)
Setter for Activity::Details.
Activity & operator=(Activity &&other) noexcept
Move assignment operator for Activity.
void SetParentApplicationId(std::optional< uint64_t > ParentApplicationId)
Setter for Activity::ParentApplicationId.
void SetType(discordpp::ActivityTypes Type)
Setter for Activity::Type.
std::optional< discordpp::ActivityAssets > Assets() const
Images used to customize how the Activity is displayed in the Discord client.
void SetTimestamps(std::optional< discordpp::ActivityTimestamps > Timestamps)
Setter for Activity::Timestamps.
bool Equals(discordpp::Activity other) const
Compares each field of the Activity struct for equality.
void SetApplicationId(std::optional< uint64_t > ApplicationId)
Setter for Activity::ApplicationId.
void SetName(std::string Name)
Setter for Activity::Name.
void SetSecrets(std::optional< discordpp::ActivitySecrets > Secrets)
Setter for Activity::Secrets.
Activity(const Activity &arg0)
Copy constructor for Activity.
void SetAssets(std::optional< discordpp::ActivityAssets > Assets)
Setter for Activity::Assets.
std::optional< discordpp::StatusDisplayTypes > StatusDisplayType() const
Controls which field is used for the user's status message.
std::optional< discordpp::ActivityTimestamps > Timestamps() const
The timestamps struct can be used to render either:
void SetParty(std::optional< discordpp::ActivityParty > Party)
Setter for Activity::Party.
void SetStatusDisplayType(std::optional< discordpp::StatusDisplayTypes > StatusDisplayType)
Setter for Activity::StatusDisplayType.
Activity & operator=(const Activity &arg0)
Copy assignment operator for Activity.
std::optional< discordpp::ActivityParty > Party() const
The party struct is used to indicate the size and members of the people the current user is playing w...
void AddButton(discordpp::ActivityButton button)
Adds a custom button to the rich presence.
std::optional< std::string > DetailsUrl() const
A URL that opens when the user clicks/taps the details text.
void SetSupportedPlatforms(discordpp::ActivityGamePlatforms SupportedPlatforms)
Setter for Activity::SupportedPlatforms.
std::optional< std::string > Details() const
The state of the what the user is doing for this activity.
void SetState(std::optional< std::string > State)
Setter for Activity::State.
Activity(Activity &&other) noexcept
Move constructor for Activity.
discordpp::ActivityGamePlatforms SupportedPlatforms() const
If an activity is joinable, but only on certain platforms, this field can be used to indicate which p...
std::optional< std::string > StateUrl() const
A URL that opens when the user clicks/taps the state text.
std::optional< discordpp::ActivitySecrets > Secrets() const
The secrets struct is used in combination with the party struct to make an Activity joinable.
std::optional< std::string > State() const
The state of the party for this activity.
discordpp::ActivityTypes Type() const
The type of activity this is.
When one user invites another to join their game on Discord, it will send a message to that user....
static const ActivityInvite nullobj
Uninitialized instance of ActivityInvite.
std::string SessionId() const
The session id of the user who sent the invite.
void SetIsValid(bool IsValid)
Setter for ActivityInvite::IsValid.
void SetSessionId(std::string SessionId)
Setter for ActivityInvite::SessionId.
uint64_t ApplicationId() const
The target application of the invite.
uint64_t MessageId() const
The id of the Discord message that contains the invite.
uint64_t SenderId() const
The user id of the user who sent the invite.
void SetApplicationId(uint64_t ApplicationId)
Setter for ActivityInvite::ApplicationId.
void SetSenderId(uint64_t SenderId)
Setter for ActivityInvite::SenderId.
void SetParentApplicationId(uint64_t ParentApplicationId)
Setter for ActivityInvite::ParentApplicationId.
bool IsValid() const
Whether or not this invite is currently joinable. An invite becomes invalid if it was sent more than ...
void SetChannelId(uint64_t ChannelId)
Setter for ActivityInvite::ChannelId.
uint64_t ChannelId() const
The id of the Discord channel in which the invite was sent.
void SetMessageId(uint64_t MessageId)
Setter for ActivityInvite::MessageId.
std::string PartyId() const
The id of the party the invite was sent for.
ActivityInvite & operator=(ActivityInvite &&other) noexcept
Move assignment operator for ActivityInvite.
ActivityInvite(const ActivityInvite &rhs)
Copy constructor for ActivityInvite.
void SetType(discordpp::ActivityActionTypes Type)
Setter for ActivityInvite::Type.
uint64_t ParentApplicationId() const
The application id of the parent - this is only applicable if there is a parent for a publisher's sui...
void SetPartyId(std::string PartyId)
Setter for ActivityInvite::PartyId.
ActivityInvite & operator=(const ActivityInvite &rhs)
Copy assignment operator for ActivityInvite.
discordpp::ActivityActionTypes Type() const
The type of invite that was sent.
ActivityInvite(ActivityInvite &&other) noexcept
Move constructor for ActivityInvite.
void SetMaxSize(int32_t MaxSize)
Setter for ActivityParty::MaxSize.
ActivityParty(ActivityParty &&other) noexcept
Move constructor for ActivityParty.
void SetCurrentSize(int32_t CurrentSize)
Setter for ActivityParty::CurrentSize.
void SetId(std::string Id)
Setter for ActivityParty::Id.
int32_t CurrentSize() const
The number of people currently in the party, must be at least 1.
int32_t MaxSize() const
The maximum number of people that can be in the party, must be at least 0. When 0,...
ActivityParty(const ActivityParty &arg0)
Copy constructor for ActivityParty.
ActivityParty & operator=(ActivityParty &&other) noexcept
Move assignment operator for ActivityParty.
void SetPrivacy(discordpp::ActivityPartyPrivacy Privacy)
Setter for ActivityParty::Privacy.
discordpp::ActivityPartyPrivacy Privacy() const
The privacy of the party.
std::string Id() const
Specifies the id of the party. "Party" is used colloquially to refer to a group of players in a share...
static const ActivityParty nullobj
Uninitialized instance of ActivityParty.
ActivityParty & operator=(const ActivityParty &arg0)
Copy assignment operator for ActivityParty.
ActivitySecrets & operator=(ActivitySecrets &&other) noexcept
Move assignment operator for ActivitySecrets.
std::string Join() const
A secret string that is shared with users who are accepted into the party so the game knows how to jo...
ActivitySecrets & operator=(const ActivitySecrets &arg0)
Copy assignment operator for ActivitySecrets.
ActivitySecrets(ActivitySecrets &&other) noexcept
Move constructor for ActivitySecrets.
ActivitySecrets(const ActivitySecrets &arg0)
Copy constructor for ActivitySecrets.
void SetJoin(std::string Join)
Setter for ActivitySecrets::Join.
static const ActivitySecrets nullobj
Uninitialized instance of ActivitySecrets.
ActivityTimestamps(ActivityTimestamps &&other) noexcept
Move constructor for ActivityTimestamps.
ActivityTimestamps(const ActivityTimestamps &arg0)
Copy constructor for ActivityTimestamps.
uint64_t Start() const
The time the activity started, in milliseconds since Unix epoch.
void SetStart(uint64_t Start)
Setter for ActivityTimestamps::Start.
static const ActivityTimestamps nullobj
Uninitialized instance of ActivityTimestamps.
ActivityTimestamps & operator=(ActivityTimestamps &&other) noexcept
Move assignment operator for ActivityTimestamps.
void SetEnd(uint64_t End)
Setter for ActivityTimestamps::End.
uint64_t End() const
The time the activity will end at, in milliseconds since Unix epoch.
ActivityTimestamps & operator=(const ActivityTimestamps &arg0)
Copy assignment operator for ActivityTimestamps.
Contains information about non-text content in a message that likely cannot be rendered in game such ...
static std::string TypeToString(discordpp::AdditionalContentType type)
Converts the AdditionalContentType enum to a string.
AdditionalContent & operator=(AdditionalContent &&other) noexcept
Move assignment operator for AdditionalContent.
void SetCount(uint8_t Count)
Setter for AdditionalContent::Count.
void SetType(discordpp::AdditionalContentType Type)
Setter for AdditionalContent::Type.
std::optional< std::string > Title() const
When the additional content is a poll or thread, this field will contain the name of the poll or thre...
discordpp::AdditionalContentType Type() const
Represents the type of additional content in the message.
uint8_t Count() const
Represents the number of pieces of additional content so you could for example renders "2 additional ...
bool Equals(discordpp::AdditionalContent rhs) const
Compares each field of the AdditionalContent struct for equality.
AdditionalContent(AdditionalContent &&other) noexcept
Move constructor for AdditionalContent.
AdditionalContent & operator=(const AdditionalContent &arg0)
Copy assignment operator for AdditionalContent.
AdditionalContent(const AdditionalContent &arg0)
Copy constructor for AdditionalContent.
void SetTitle(std::optional< std::string > Title)
Setter for AdditionalContent::Title.
static const AdditionalContent nullobj
Uninitialized instance of AdditionalContent.
Represents a single input or output audio device available to the user.
AudioDevice & operator=(const AudioDevice &arg0)
Copy assignment operator for AudioDevice.
bool Equals(discordpp::AudioDevice rhs)
Compares the ID of two AudioDevice objects for equality.
std::string Name() const
The display name of the audio device.
bool IsDefault() const
Whether the audio device is the system default device.
std::string Id() const
The ID of the audio device.
AudioDevice(AudioDevice &&other) noexcept
Move constructor for AudioDevice.
AudioDevice & operator=(AudioDevice &&other) noexcept
Move assignment operator for AudioDevice.
static const AudioDevice nullobj
Uninitialized instance of AudioDevice.
void SetId(std::string Id)
Setter for AudioDevice::Id.
void SetIsDefault(bool IsDefault)
Setter for AudioDevice::IsDefault.
void SetName(std::string Name)
Setter for AudioDevice::Name.
AudioDevice(const AudioDevice &arg0)
Copy constructor for AudioDevice.
Arguments to the Client::Authorize function.
void SetIntegrationType(std::optional< discordpp::IntegrationType > IntegrationType)
Setter for AuthorizationArgs::IntegrationType.
std::optional< std::string > State() const
See https://discord.com/developers/docs/topics/oauth2#state-and-security for details on this field.
AuthorizationArgs & operator=(AuthorizationArgs &&other) noexcept
Move assignment operator for AuthorizationArgs.
void SetCustomSchemeParam(std::optional< std::string > CustomSchemeParam)
Setter for AuthorizationArgs::CustomSchemeParam.
std::optional< std::string > Nonce() const
The nonce field is generally only useful for backend integrations using ID tokens.
std::optional< discordpp::AuthorizationCodeChallenge > CodeChallenge() const
If using the Client::GetToken flow, you will need to generate a code challenge and verifier.
uint64_t ClientId() const
Optional. The Discord application ID for your game. Defaults to the value set by Client::SetApplicati...
AuthorizationArgs(const AuthorizationArgs &arg0)
Copy constructor for AuthorizationArgs.
void SetScopes(std::string Scopes)
Setter for AuthorizationArgs::Scopes.
static const AuthorizationArgs nullobj
Uninitialized instance of AuthorizationArgs.
void SetClientId(uint64_t ClientId)
Setter for AuthorizationArgs::ClientId.
std::optional< std::string > CustomSchemeParam() const
Custom URI scheme for mobile redirects.
std::optional< discordpp::IntegrationType > IntegrationType() const
The type of integration the app will be installed as.
void SetCodeChallenge(std::optional< discordpp::AuthorizationCodeChallenge > CodeChallenge)
Setter for AuthorizationArgs::CodeChallenge.
AuthorizationArgs(AuthorizationArgs &&other) noexcept
Move constructor for AuthorizationArgs.
AuthorizationArgs & operator=(const AuthorizationArgs &arg0)
Copy assignment operator for AuthorizationArgs.
std::string Scopes() const
Scopes is a space separated string of the oauth scopes your game is requesting.
void SetNonce(std::optional< std::string > Nonce)
Setter for AuthorizationArgs::Nonce.
void SetState(std::optional< std::string > State)
Setter for AuthorizationArgs::State.
Struct that encapsulates the challenge part of the code verification flow.
discordpp::AuthenticationCodeChallengeMethod Method() const
The method used to generate the challenge. The only method used by the SDK is sha256.
AuthorizationCodeChallenge(const AuthorizationCodeChallenge &arg0)
Copy constructor for AuthorizationCodeChallenge.
std::string Challenge() const
The challenge value.
AuthorizationCodeChallenge & operator=(AuthorizationCodeChallenge &&other) noexcept
Move assignment operator for AuthorizationCodeChallenge.
void SetMethod(discordpp::AuthenticationCodeChallengeMethod Method)
Setter for AuthorizationCodeChallenge::Method.
static const AuthorizationCodeChallenge nullobj
Uninitialized instance of AuthorizationCodeChallenge.
AuthorizationCodeChallenge & operator=(const AuthorizationCodeChallenge &arg0)
Copy assignment operator for AuthorizationCodeChallenge.
AuthorizationCodeChallenge(AuthorizationCodeChallenge &&other) noexcept
Move constructor for AuthorizationCodeChallenge.
void SetChallenge(std::string Challenge)
Setter for AuthorizationCodeChallenge::Challenge.
AuthorizationCodeChallenge()
Struct that encapsulates both parts of the code verification flow.
AuthorizationCodeVerifier(const AuthorizationCodeVerifier &arg0)
Copy constructor for AuthorizationCodeVerifier.
AuthorizationCodeVerifier & operator=(const AuthorizationCodeVerifier &arg0)
Copy assignment operator for AuthorizationCodeVerifier.
void SetVerifier(std::string Verifier)
Setter for AuthorizationCodeVerifier::Verifier.
AuthorizationCodeVerifier(AuthorizationCodeVerifier &&other) noexcept
Move constructor for AuthorizationCodeVerifier.
std::string Verifier() const
The verifier part of the code verification flow.
void SetChallenge(discordpp::AuthorizationCodeChallenge Challenge)
Setter for AuthorizationCodeVerifier::Challenge.
static const AuthorizationCodeVerifier nullobj
Uninitialized instance of AuthorizationCodeVerifier.
discordpp::AuthorizationCodeChallenge Challenge() const
The challenge part of the code verification flow.
AuthorizationCodeVerifier & operator=(AuthorizationCodeVerifier &&other) noexcept
Move assignment operator for AuthorizationCodeVerifier.
Class that manages an active voice session in a Lobby.
static std::string ErrorToString(discordpp::Call::Error type)
Converts the Error enum to a string.
Call & operator=(const Call &other)
Copy assignment operator for Call.
void SetSelfDeaf(bool deaf)
Mutes all audio from the currently active call for the current user. They will not be able to hear an...
std::function< void(uint64_t userId, bool isPlayingSound)> OnSpeakingStatusChanged
Callback function for Call::SetSpeakingStatusChangedCallback.
static const Call nullobj
Uninitialized instance of Call.
Call(Call &&other) noexcept
Move constructor for Call.
void SetOnVoiceStateChangedCallback(discordpp::Call::OnVoiceStateChanged cb)
Sets a callback function to generally be invoked whenever a field on a VoiceStateHandle object for a ...
std::function< void(discordpp::Call::Status status, discordpp::Call::Error error, int32_t errorDetail)> OnStatusChanged
Callback function for Call::SetStatusChangedCallback.
Call & operator=(Call &&other) noexcept
Move assignment operator for Call.
discordpp::AudioModeType GetAudioMode()
Returns whether the call is configured to use voice auto detection or push to talk for the current us...
bool GetPTTActive()
Returns whether push to talk is currently active, meaning the user is currently pressing their config...
discordpp::VADThresholdSettings GetVADThreshold() const
Returns the current configuration for void auto detection thresholds. See the description of the VADT...
std::optional< discordpp::VoiceStateHandle > GetVoiceStateHandle(uint64_t userId) const
Returns a reference to the VoiceStateHandle for the user ID of the given call participant.
static std::string StatusToString(discordpp::Call::Status type)
Converts the Status enum to a string.
void SetVADThreshold(bool automatic, float threshold)
Customizes the void auto detection thresholds for picking up activity from a user's mic.
bool GetSelfDeaf()
Returns whether the current user is deafened.
Error
Enum that represents any network errors with the Call.
@ SignalingConnectionFailed
SignalingConnectionFailed.
@ SignalingUnexpectedClose
SignalingUnexpectedClose.
@ JoinTimeout
JoinTimeout.
@ VoiceConnectionFailed
VoiceConnectionFailed.
Status
Enum that respresents the state of the Call's network connection.
@ Disconnecting
Disconnecting.
@ Reconnecting
Reconnecting.
@ SignalingConnected
SignalingConnected.
@ Disconnected
Disconnected.
void SetLocalMute(uint64_t userId, bool mute)
Locally mutes the given userId, so that the current user cannot hear them anymore.
void SetSpeakingStatusChangedCallback(discordpp::Call::OnSpeakingStatusChanged cb)
Sets a callback function to be invoked whenever a user starts or stops speaking and is passed in the ...
uint32_t GetPTTReleaseDelay()
Returns the time that PTT is active after the user releases the PTT key and SetPTTActive(false) is ca...
uint64_t GetGuildId() const
Returns the ID of the lobby with which this call is associated.
Call(const Call &other)
Copy constructor for Call.
void SetPTTActive(bool active)
When push to talk is enabled, this should be called whenever the user pushes or releases their config...
void SetParticipantChangedCallback(discordpp::Call::OnParticipantChanged cb)
Sets a callback function to be invoked whenever some joins or leaves a voice call.
std::vector< uint64_t > GetParticipants() const
Returns a list of all of the user IDs of the participants in the call.
bool GetSelfMute()
Returns whether the current user's microphone is muted.
void SetPTTReleaseDelay(uint32_t releaseDelayMs)
If set, extends the time that PTT is active after the user releases the PTT key and SetPTTActive(fals...
discordpp::Call::Status GetStatus() const
Returns the current call status.
std::function< void(uint64_t userId, bool added)> OnParticipantChanged
Callback function for Call::SetParticipantChangedCallback.
void SetParticipantVolume(uint64_t userId, float volume)
Locally changes the playout volume of the given userId.
void SetStatusChangedCallback(discordpp::Call::OnStatusChanged cb)
Sets a callback function to be invoked when the call status changes, such as when it fully connects o...
void SetAudioMode(discordpp::AudioModeType audioMode)
Sets whether to use voice auto detection or push to talk for the current user on this call.
bool GetLocalMute(uint64_t userId)
Returns whether the current user has locally muted the given userId for themselves.
float GetParticipantVolume(uint64_t userId)
Returns the locally set playout volume of the given userId.
void SetSelfMute(bool mute)
Mutes the current user's microphone so that no other participant in their active calls can hear them.
std::function< void(uint64_t userId)> OnVoiceStateChanged
Callback function for Call::SetOnVoiceStateChangedCallback.
uint64_t GetChannelId() const
Returns the ID of the lobby with which this call is associated.
Convenience class that represents the state of a single Discord call in a lobby.
std::optional< discordpp::VoiceStateHandle > GetVoiceStateHandle(uint64_t userId) const
Accesses the voice state for a single user so you can know if they have muted or deafened themselves.
std::vector< uint64_t > GetParticipants() const
Returns a list of the user IDs of the participants in the call.
CallInfoHandle & operator=(const CallInfoHandle &other)
Copy assignment operator for CallInfoHandle.
CallInfoHandle(const CallInfoHandle &other)
Copy constructor for CallInfoHandle.
CallInfoHandle & operator=(CallInfoHandle &&other) noexcept
Move assignment operator for CallInfoHandle.
uint64_t GuildId() const
Returns the lobby ID of the call.
static const CallInfoHandle nullobj
Uninitialized instance of CallInfoHandle.
CallInfoHandle(CallInfoHandle &&other) noexcept
Move constructor for CallInfoHandle.
uint64_t ChannelId() const
Returns the lobby ID of the call.
All messages sent on Discord are done so in a Channel. MessageHandle::ChannelId will contain the ID o...
ChannelHandle(const ChannelHandle &other)
Copy constructor for ChannelHandle.
ChannelHandle & operator=(const ChannelHandle &other)
Copy assignment operator for ChannelHandle.
static const ChannelHandle nullobj
Uninitialized instance of ChannelHandle.
uint64_t Id() const
Returns the ID of the channel.
ChannelHandle & operator=(ChannelHandle &&other) noexcept
Move assignment operator for ChannelHandle.
ChannelHandle(ChannelHandle &&other) noexcept
Move constructor for ChannelHandle.
std::vector< uint64_t > Recipients() const
For DMs and GroupDMs, returns the user IDs of the members of the channel. For all other channels retu...
std::string Name() const
Returns the name of the channel.
discordpp::ChannelType Type() const
Returns the type of the channel.
Options for creating a new Client instance.
void SetCpuAffinityMask(std::optional< uint64_t > CpuAffinityMask)
Setter for ClientCreateOptions::CpuAffinityMask.
discordpp::AudioSystem ExperimentalAudioSystem() const
The audio system to use. Defaults to AudioSystem::Standard.
static const ClientCreateOptions nullobj
Uninitialized instance of ClientCreateOptions.
ClientCreateOptions & operator=(const ClientCreateOptions &arg0)
Copy assignment operator for ClientCreateOptions.
bool ExperimentalAndroidPreventCommsForBluetooth() const
Whether to prevent communications mode on Android when Bluetooth is connected.
std::string WebBase() const
The base URL for the Discord web application.
std::string ApiBase() const
The base URL for the Discord API.
void SetApiBase(std::string ApiBase)
Setter for ClientCreateOptions::ApiBase.
ClientCreateOptions(const ClientCreateOptions &arg0)
Copy constructor for ClientCreateOptions.
void SetExperimentalAudioSystem(discordpp::AudioSystem ExperimentalAudioSystem)
Setter for ClientCreateOptions::ExperimentalAudioSystem.
ClientCreateOptions(ClientCreateOptions &&other) noexcept
Move constructor for ClientCreateOptions.
std::optional< uint64_t > CpuAffinityMask() const
CPU affinity mask hint for certain platforms. Depending on platform support, may or may not be ignore...
void SetWebBase(std::string WebBase)
Setter for ClientCreateOptions::WebBase.
void SetExperimentalAndroidPreventCommsForBluetooth(bool ExperimentalAndroidPreventCommsForBluetooth)
Setter for ClientCreateOptions::ExperimentalAndroidPreventCommsForBluetooth.
ClientCreateOptions & operator=(ClientCreateOptions &&other) noexcept
Move assignment operator for ClientCreateOptions.
The Client class is the main entry point for the Discord SDK. All functionality is exposed through th...
bool RegisterLaunchCommand(uint64_t applicationId, std::string command)
When a user accepts an activity invite for your game within the Discord client, Discord needs to know...
void SetRelationshipCreatedCallback(discordpp::Client::RelationshipCreatedCallback cb)
Sets a callback to be invoked whenever a relationship for this user is established or changes type.
void GetUserMessagesWithLimit(uint64_t recipientId, int32_t limit, discordpp::Client::UserMessagesWithLimitCallback cb)
Retrieves messages from the DM conversation with the specified user.
void GetLobbyMessagesWithLimit(uint64_t lobbyId, int32_t limit, discordpp::Client::GetLobbyMessagesCallback cb)
Retrieves recent messages from the specified lobby.
std::function< void(uint64_t messageId)> MessageCreatedCallback
Callback function for Client::SetMessageCreatedCallback.
discordpp::Call GetCall(uint64_t channelId)
Returns a reference to the currently active call, if any.
std::function< void(uint64_t userId)> RelationshipGroupsUpdatedCallback
Callback function for Client::SetRelationshipGroupsUpdatedCallback.
std::function< void(discordpp::ClientResult result)> UpdateRelationshipCallback
Callback function for most other Relationship functions such as Client::SendDiscordFriendRequestById.
void EndCalls(discordpp::Client::EndCallsCallback callback)
Ends any active call, if any. Any references you have to Call objects are invalid after they are ende...
static std::string StatusToString(discordpp::Client::Status type)
Converts the Status enum to a string.
void Disconnect()
Asynchronously disconnects the client.
void SendDiscordFriendRequest(std::string const &username, discordpp::Client::SendFriendRequestCallback cb)
Sends a Discord friend request to the target user.
void RefreshToken(uint64_t applicationId, std::string const &refreshToken, discordpp::Client::TokenExchangeCallback callback)
Generates a new access token for the current user from a refresh token.
void SendLobbyMessageWithMetadata(uint64_t lobbyId, std::string const &content, std::unordered_map< std::string, std::string > const &metadata, discordpp::Client::SendUserMessageCallback cb)
Variant of Client::SendLobbyMessage that also accepts metadata to be sent with the message.
void SetEchoCancellation(bool on)
Enables or disables the basic echo cancellation provided by the WebRTC library.
void GetInputDevices(discordpp::Client::GetInputDevicesCallback cb)
Asynchronously fetches the list of audio input devices available to the user.
std::function< void(discordpp::Client::Status status, discordpp::Client::Error error, int32_t errorDetail)> OnStatusChanged
Callback function for Client::SetStatusChangedCallback.
void SetVoiceSettingsUpdatedCallback(discordpp::Client::VoiceSettingsUpdatedCallback callback)
Sets a callback to be invoked whenever the user's voice settings change in the connected Discord clie...
void CancelGameFriendRequest(uint64_t userId, discordpp::Client::UpdateRelationshipCallback cb)
Cancels an outgoing game friend request to the target user.
void AbortGetTokenFromDevice()
This function is used to abort/cleanup the device authorization flow.
bool SetLogDir(std::string const &path, discordpp::LoggingSeverity minSeverity)
Causes logs generated by the SDK to be written to disk in the specified directory.
void OpenConnectedGamesSettingsInDiscord(discordpp::Client::OpenConnectedGamesSettingsInDiscordCallback callback)
Opens the Connected Games settings in the Discord client, which is where users can manage their setti...
void SetAuthorizeDeviceScreenClosedCallback(discordpp::Client::AuthorizeDeviceScreenClosedCallback cb)
Sets a callback function to be invoked when the device authorization screen is closed.
void SetMessageCreatedCallback(discordpp::Client::MessageCreatedCallback cb)
Sets a callback to be invoked whenever a new message is received in either a lobby or a DM.
std::function< void(bool inputDetected)> NoAudioInputCallback
Callback function for Client::SetNoAudioInputCallback.
void UnlinkChannelFromLobby(uint64_t lobbyId, discordpp::Client::LinkOrUnlinkChannelCallback callback)
Removes any existing channel link from the specified lobby.
std::function< void(discordpp::ClientResult result, std::string joinSecret)> AcceptActivityInviteCallback
Callback function for Client::AcceptActivityInvite.
std::function< void()> ProvisionalUserMergeRequiredCallback
Callback function for when Client::ProvisionalUserMergeCompleted completes.
void SetMessageDeletedCallback(discordpp::Client::MessageDeletedCallback cb)
Sets a callback to be invoked whenever a message is deleted.
std::function< void(discordpp::ClientResult result)> UnmergeIntoProvisionalAccountCallback
Callback function for the Client::UnmergeIntoProvisionalAccount method.
void DeleteUserMessage(uint64_t recipientId, uint64_t messageId, discordpp::Client::DeleteUserMessageCallback cb)
Deletes the specified message sent by the current user to the specified recipient.
void SetVoiceParticipantChangedCallback(discordpp::Client::VoiceParticipantChangedCallback cb)
Callback invoked whenever a user in a lobby joins or leaves a voice call.
void UnmergeIntoProvisionalAccount(uint64_t applicationId, discordpp::AuthenticationExternalAuthType externalAuthType, std::string const &externalAuthToken, discordpp::Client::UnmergeIntoProvisionalAccountCallback callback)
This function is used to unlink/unmerge a external identity from a Discord account....
Client(std::string apiBase, std::string webBase)
Creates a new instance of the Client but allows customizing the Discord URL to use.
void RevokeToken(uint64_t applicationId, std::string const &token, discordpp::Client::RevokeTokenCallback callback)
Revoke all application access/refresh tokens associated with a user with any valid access/refresh tok...
void LinkChannelToLobby(uint64_t lobbyId, uint64_t channelId, discordpp::Client::LinkOrUnlinkChannelCallback callback)
Links the specified channel on Discord to the specified in-game lobby.
std::function< void(uint64_t lobbyId)> LobbyDeletedCallback
Callback function for Client::SetLobbyDeletedCallback.
void SetDeviceChangeCallback(discordpp::Client::DeviceChangeCallback callback)
Sets a callback function to be invoked when Discord detects a change in the available audio devices.
void GetUserMessageSummaries(discordpp::Client::UserMessageSummariesCallback cb)
Retrieves message conversation summaries for all users the current user has DM conversations with.
std::function< void(discordpp::ClientResult result)> LinkOrUnlinkChannelCallback
Callback function for Client::LinkChannelToLobby.
std::function< void(discordpp::AudioDevice device)> GetCurrentOutputDeviceCallback
Callback function for Client::GetCurrentOutputDevice.
std::vector< uint64_t > GetLobbyIds() const
Returns a list of all the lobbies that the user is a member of and the SDK has loaded.
std::function< void(discordpp::ClientResult result, std::string accessToken, discordpp::AuthorizationTokenType tokenType, int32_t expiresIn, std::string scopes)> ExchangeChildTokenCallback
Callback function for Client::ExchangeChildToken.
void SetUserUpdatedCallback(discordpp::Client::UserUpdatedCallback cb)
The UserUpdatedCallback is invoked whenever any user the current session knows about changes,...
std::function< void()> TokenExpirationCallback
Callback function for Client::SetTokenExpirationCallback.
std::function< void(discordpp::ClientResult result)> SetOutputDeviceCallback
Callback function for Client::SetOutputDevice.
void SetAecDump(bool on)
Enables or disables AEC diagnostic recording.
void SetActivityInviteCreatedCallback(discordpp::Client::ActivityInviteCallback cb)
Sets a callback function that is invoked when the current user receives an activity invite from anoth...
std::function< void(uint64_t lobbyId, uint64_t memberId)> LobbyMemberUpdatedCallback
Callback function for Client::SetLobbyMemberUpdatedCallback.
void GetVoiceSettings(discordpp::Client::GetVoiceSettingsCallback cb)
Asynchronously fetches the user's current voice settings from the connected Discord client.
void SendUserMessage(uint64_t recipientId, std::string const &content, discordpp::Client::SendUserMessageCallback cb)
Sends a direct message to the specified user.
Client & operator=(Client &&other) noexcept
Move assignment operator for Client.
void GetTokenFromProvisionalMerge(uint64_t applicationId, std::string const &code, std::string const &codeVerifier, std::string const &redirectUri, discordpp::AuthenticationExternalAuthType externalAuthType, std::string const &externalAuthToken, discordpp::Client::TokenExchangeCallback callback)
This function should be used with the Client::Authorize function whenever a user with a provisional a...
static std::string GetVersionHash()
Returns the git commit hash this version was built from.
bool RegisterLaunchSteamApplication(uint64_t applicationId, uint32_t steamAppId)
When a user accepts an activity invite for your game within the Discord client, Discord needs to know...
void FetchCurrentUser(discordpp::AuthorizationTokenType tokenType, std::string const &token, discordpp::Client::FetchCurrentUserCallback callback)
Fetches basic information about the user associated with the given auth token.
void SetNoAudioInputCallback(discordpp::Client::NoAudioInputCallback callback)
Callback function invoked when the above threshold is set and there is a change in whether audio is b...
std::vector< discordpp::UserHandle > SearchFriendsByUsername(std::string searchStr) const
Searches all of your friends by both username and display name, returning a list of all friends that ...
void SetVoiceLogDir(std::string const &path, discordpp::LoggingSeverity minSeverity)
Causes logs generated by the voice subsystem of the SDK to be written to disk in the specified direct...
std::function< void(discordpp::ClientResult result)> LeaveLobbyCallback
Callback function for Client::LeaveLobby.
std::function< void(uint64_t lobbyId)> LobbyUpdatedCallback
Callback function for Client::SetLobbyUpdatedCallback.
void GetTokenFromDevice(discordpp::DeviceAuthorizationArgs args, discordpp::Client::TokenExchangeCallback callback)
This function is a combination of Client::Authorize and Client::GetToken, but is used for the case wh...
std::function< void(discordpp::ClientResult result, uint64_t id, std::string name)> FetchCurrentUserCallback
Callback function for Client::FetchCurrentUser.
std::function< void(discordpp::ClientResult result, uint64_t messageId)> SendUserMessageCallback
This is used for all kinds of 'send message' calls despite the name, to make sure engine bindings use...
void CloseAuthorizeDeviceScreen()
This function is used to hide the device authorization screen and is used for the case where the user...
void SetOpusHardwareCoding(bool encode, bool decode)
Enables or disables hardware encoding and decoding for audio, if it is available.
void SetNoiseCancellation(bool on)
Enables or disables Krisp noise cancellation.
void JoinLinkedLobbyGuild(uint64_t lobbyId, discordpp::Client::ProvisionalUserMergeRequiredCallback provisionalUserMergeRequiredCallback, discordpp::Client::JoinLinkedLobbyGuildCallback callback)
Invites the current user to the Discord guild of the channel that is linked to the specified lobby....
bool ShowAudioRoutePicker()
On iOS devices, show the system audio route picker.
void SetActivityJoinCallback(discordpp::Client::ActivityJoinCallback cb)
Sets a callback function that is invoked when the current user also has Discord running on their comp...
void GetOutputDevices(discordpp::Client::GetOutputDevicesCallback cb)
Asynchronously fetches the list of audio output devices available to the user.
std::function< void()> AuthorizeDeviceScreenClosedCallback
Callback function for Client::SetAuthorizeDeviceScreenClosedCallback.
void SetSelfDeafAll(bool deaf)
Mutes all audio from the currently active call for the current user in all calls. They will not be ab...
void ExchangeChildToken(std::string const &parentApplicationToken, uint64_t childApplicationId, discordpp::Client::ExchangeChildTokenCallback callback)
Exchanges a parent application token for a child application token.
std::function< void(bool installed)> IsDiscordAppInstalledCallback
Callback invoked when the IsDiscordAppInstalled function completes.
std::function< void(discordpp::ClientResult result)> UpdateRichPresenceCallback
Callback function for when Client::UpdateRichPresence completes.
void CreateOrJoinLobbyWithMetadata(std::string const &secret, std::unordered_map< std::string, std::string > const &lobbyMetadata, std::unordered_map< std::string, std::string > const &memberMetadata, discordpp::Client::CreateOrJoinLobbyCallback callback)
Variant of Client::CreateOrJoinLobby that also accepts developer-supplied metadata.
Client()
Creates a new instance of the Client.
std::function< void(discordpp::ClientResult result)> SendFriendRequestCallback
Callback function for Client::SendDiscordFriendRequest and Client::SendGameFriendRequest.
void RegisterAuthorizeRequestCallback(discordpp::Client::AuthorizeRequestCallback callback)
Registers a callback to be invoked when a user requests to initiate the authorization flow.
void UpdateToken(discordpp::AuthorizationTokenType tokenType, std::string token, discordpp::Client::UpdateTokenCallback callback)
Asynchronously sets a new auth token for this client to use.
void SetOutputVolume(float outputVolume)
Sets the speaker volume for the current user.
std::function< void()> EndCallsCallback
Callback invoked when Client::EndCalls completes.
void SendGameFriendRequestById(uint64_t userId, discordpp::Client::UpdateRelationshipCallback cb)
Sends (or accepts) a game friend request to the target user.
std::function< void(int16_t *data, uint64_t samplesPerChannel, int32_t sampleRate, uint64_t channels)> UserAudioCapturedCallback
Callback function for Client::StartCallWithAudioCallbacks.
void OpenMessageInDiscord(uint64_t messageId, discordpp::Client::ProvisionalUserMergeRequiredCallback provisionalUserMergeRequiredCallback, discordpp::Client::OpenMessageInDiscordCallback callback)
Opens the given message in the Discord client.
void RemoveGameFriend(uint64_t userId, discordpp::Client::UpdateRelationshipCallback cb)
Removes any game friendship between the current user and the target user.
std::vector< discordpp::Call > GetCalls()
Returns a reference to all currently active calls, if any.
std::optional< discordpp::ChannelHandle > GetChannelHandle(uint64_t channelId) const
Returns a reference to the Discord channel object for the given ID.
std::function< void(uint64_t userId, int16_t *data, uint64_t samplesPerChannel, int32_t sampleRate, uint64_t channels, bool &outShouldMute)> UserAudioReceivedCallback
Callback function for Client::StartCallWithAudioCallbacks.
std::function< void(discordpp::ClientResult result)> RevokeTokenCallback
Callback function for the Client::RevokeToken method.
void SendActivityJoinRequest(uint64_t userId, discordpp::Client::SendActivityInviteCallback cb)
Requests to join the activity of the specified user.
void RejectDiscordFriendRequest(uint64_t userId, discordpp::Client::UpdateRelationshipCallback cb)
Declines an incoming Discord friend request from the target user.
std::function< void(discordpp::ClientResult result, std::vector< discordpp::MessageHandle > messages)> UserMessagesWithLimitCallback
Callback function for Client::GetUserMessagesWithLimit.
Status
This enum refers to the status of the internal websocket the SDK uses to communicate with Discord The...
@ Disconnecting
Disconnecting.
@ Reconnecting
Reconnecting.
@ Disconnected
Disconnected.
static std::string GetDefaultCommunicationScopes()
Returns the default set of OAuth2 scopes that should be used with the Discord SDK when making use of ...
std::function< void(discordpp::ClientResult result, std::vector< discordpp::GuildMinimal > guilds)> GetUserGuildsCallback
Callback function for Client::GetUserGuilds.
void SetRelationshipDeletedCallback(discordpp::Client::RelationshipDeletedCallback cb)
Sets a callback to be invoked whenever a relationship for this user is removed, such as when the user...
void UpdateProvisionalAccountDisplayName(std::string const &name, discordpp::Client::UpdateProvisionalAccountDisplayNameCallback callback)
Updates the display name of a provisional account to the specified name.
static std::string GetDefaultPresenceScopes()
Returns the default set of OAuth2 scopes that should be used with the Discord SDK when leveraging bas...
void SendLobbyMessage(uint64_t lobbyId, std::string const &content, discordpp::Client::SendUserMessageCallback cb)
Sends a message in a lobby chat to all members of the lobby.
std::optional< discordpp::MessageHandle > GetMessageHandle(uint64_t messageId) const
Returns a reference to the Discord message object for the given ID.
float GetOutputVolume()
Returns the output volume for the current user.
void SetThreadPriority(discordpp::Client::Thread thread, int32_t priority)
Allows setting the priority of various SDK threads.
discordpp::UserHandle GetCurrentUser() const
(deprecated)
std::function< void(discordpp::ClientResult result)> OpenMessageInDiscordCallback
Callback function for when Client::OpenMessageInDiscord completes.
void GetProvisionalToken(uint64_t applicationId, discordpp::AuthenticationExternalAuthType externalAuthType, std::string const &externalAuthToken, discordpp::Client::TokenExchangeCallback callback)
Provisional accounts are a way for users that have not signed up for Discord to still access SDK func...
void GetCurrentInputDevice(discordpp::Client::GetCurrentInputDeviceCallback cb)
Asynchronously fetches the current audio input device in use by the client.
void SetAutomaticGainControl(bool on)
When enabled, automatically adjusts the microphone volume to keep it clear and consistent.
void EditUserMessage(uint64_t recipientId, uint64_t messageId, std::string const &content, discordpp::Client::EditUserMessageCallback cb)
Edits the specified message sent by the current user to the specified recipient.
std::function< void()> EndCallCallback
Callback invoked when Client::EndCall completes.
std::function< void()> AuthorizeRequestCallback
Callback invoked when a user requests to initiate the authorization flow from the discord app.
std::function< void(discordpp::ClientResult result)> EditUserMessageCallback
Callback function for Client::EditUserMessage.
void Connect()
Asynchronously connects the client to Discord.
std::function< void(uint64_t userId, bool isDiscordRelationshipUpdate)> RelationshipDeletedCallback
Callback function for Client::SetRelationshipDeletedCallback.
void SetLobbyDeletedCallback(discordpp::Client::LobbyDeletedCallback cb)
Sets a callback to be invoked when a lobby is no longer available.
void GetDiscordClientConnectedUser(uint64_t applicationId, discordpp::Client::GetDiscordClientConnectedUserCallback callback) const
If the Discord app is running on the user's computer and the SDK establishes a connection to it,...
static int32_t GetVersionPatch()
Returns the patch version of the Discord Social SDK.
void CreateOrJoinLobby(std::string const &secret, discordpp::Client::CreateOrJoinLobbyCallback callback)
Joins the user to the specified lobby, creating one if it does not exist.
std::function< void(uint64_t lobbyId, uint64_t memberId, bool added)> VoiceParticipantChangedCallback
Callback function for Client::SetVoiceParticipantChangedCallback.
Client & operator=(const Client &)=delete
void LeaveLobby(uint64_t lobbyId, discordpp::Client::LeaveLobbyCallback callback)
Removes the current user from the specified lobby.
float GetInputVolume()
Returns the input volume for the current user's microphone.
std::function< void(discordpp::ClientResult result, std::vector< discordpp::GuildChannel > guildChannels)> GetGuildChannelsCallback
Callback function for Client::GetGuildChannels.
std::function< void(discordpp::ClientResult result)> SetInputDeviceCallback
Callback function for Client::SetInputDevice.
void SetLobbyMemberRemovedCallback(discordpp::Client::LobbyMemberRemovedCallback cb)
Sets a callback function to be invoked whenever a member of a lobby is removed and can no longer conn...
Client(Client &&other) noexcept
Move constructor for Client.
std::function< void(discordpp::ClientResult result)> UpdateProvisionalAccountDisplayNameCallback
Callback function for Client::UpdateProvisionalAccountDisplayName.
static std::string GetDefaultAudioDeviceId()
Returns the ID of the system default audio device if the user has not explicitly chosen one.
std::function< void(uint64_t userId, bool isDiscordRelationshipUpdate)> RelationshipCreatedCallback
Callback function for Client::SetRelationshipCreatedCallback.
void CancelDiscordFriendRequest(uint64_t userId, discordpp::Client::UpdateRelationshipCallback cb)
Cancels an outgoing Discord friend request to the target user.
void IsDiscordAppInstalled(discordpp::Client::IsDiscordAppInstalledCallback callback)
Checks whether the Discord mobile app is installed on this device. On desktop platforms,...
std::function< void(uint64_t lobbyId, uint64_t memberId)> LobbyMemberAddedCallback
Callback function for Client::SetLobbyMemberAddedCallback.
void SetOnlineStatus(discordpp::StatusType status, discordpp::Client::UpdateStatusCallback callback)
Sets whether a user is online/invisible/idle/dnd on Discord.
void ClearRichPresence()
Clears the right presence for the current user.
void SetSelfMuteAll(bool mute)
Mutes the current user's microphone so that no other participant in their active calls can hear them ...
std::function< void(discordpp::ClientResult result, std::string inviteUrl)> JoinLinkedLobbyGuildCallback
Callback function for Client::JoinLinkedLobbyGuild.
void SetStatusChangedCallback(discordpp::Client::OnStatusChanged cb)
Sets a callback function to be invoked whenever the SDKs status changes.
std::function< void(discordpp::ActivityInvite invite)> ActivityInviteCallback
Callback function for Client::SetActivityInviteCreatedCallback and Client::SetActivityInviteUpdatedCa...
std::vector< discordpp::RelationshipHandle > GetRelationshipsByGroup(discordpp::RelationshipGroupType groupType) const
Returns a list of relationships that belong to the specified relationship group type....
std::function< void(discordpp::ClientResult result)> UpdateTokenCallback
Callback invoked when Client::UpdateToken completes. Once this is done it is safe to call Client::Con...
void SetMessageUpdatedCallback(discordpp::Client::MessageUpdatedCallback cb)
Sets a callback to be invoked whenever a message is edited.
void SetOutputDevice(std::string deviceId, discordpp::Client::SetOutputDeviceCallback cb)
Asynchronously changes the audio output device in use by the client to the specified device....
std::function< void(std::vector< discordpp::AudioDevice > devices)> GetInputDevicesCallback
Callback function for Client::GetInputDevices.
void SendUserMessageWithMetadata(uint64_t recipientId, std::string const &content, std::unordered_map< std::string, std::string > const &metadata, discordpp::Client::SendUserMessageCallback cb)
Variant of Client::SendUserMessage that also accepts metadata to be sent with the message.
std::function< void(uint64_t lobbyId)> LobbyCreatedCallback
Callback function for Client::SetLobbyCreatedCallback.
void RemoveDiscordAndGameFriend(uint64_t userId, discordpp::Client::UpdateRelationshipCallback cb)
Removes any friendship between the current user and the target user. This function will remove BOTH a...
std::function< void(discordpp::ClientResult result, std::optional< discordpp::UserHandle > user)> GetDiscordClientConnectedUserCallback
Callback function for when Client::GetDiscordClientConnectedUser completes.
std::function< void(uint64_t lobbyId, uint64_t memberId)> LobbyMemberRemovedCallback
Callback function for Client::SetLobbyMemberRemovedCallback.
void SetTokenExpirationCallback(discordpp::Client::TokenExpirationCallback callback)
Get a notification when the current token is about to expire or expired.
std::function< void(discordpp::ClientResult result, std::vector< discordpp::MessageHandle > messages)> GetLobbyMessagesCallback
Callback function for Client::GetLobbyMessagesWithLimit.
void GetUserGuilds(discordpp::Client::GetUserGuildsCallback cb)
Fetches all of the guilds (also known as Discord servers) that the current user is a member of.
std::function< void(discordpp::ClientResult result, std::string code, std::string redirectUri)> AuthorizationCallback
Callback invoked when the Authorize function completes.
std::function< void(discordpp::ClientResult result, std::vector< discordpp::UserMessageSummary > summaries)> UserMessageSummariesCallback
Callback function for Client::GetUserMessageSummaries.
void SetGameWindowPid(int32_t pid)
When users are linking their account with Discord, which involves an OAuth2 flow, the SDK can streaml...
void GetToken(uint64_t applicationId, std::string const &code, std::string const &codeVerifier, std::string const &redirectUri, discordpp::Client::TokenExchangeCallback callback)
Exchanges an authorization code that was returned from the Client::Authorize function for an access t...
void SetActivityInviteUpdatedCallback(discordpp::Client::ActivityInviteCallback cb)
Sets a callback function that is invoked when an existing activity invite changes....
void SetNoAudioInputThreshold(float dBFSThreshold)
Threshold that can be set to indicate when no audio is being received by the user's mic.
std::function< void(discordpp::VoiceSettings settings)> VoiceSettingsUpdatedCallback
Callback function for Client::SetVoiceSettingsUpdatedCallback.
std::function< void(std::string joinSecret)> ActivityJoinCallback
Callback function for Client::SetActivityJoinCallback.
static std::string ErrorToString(discordpp::Client::Error type)
Converts the Error enum to a string.
std::function< void(discordpp::ClientResult result, std::string accessToken, std::string refreshToken, discordpp::AuthorizationTokenType tokenType, int32_t expiresIn, std::string scopes)> TokenExchangeCallback
Callback function for the token exchange APIs such as Client::GetToken.
std::optional< discordpp::UserHandle > GetUser(uint64_t userId) const
Returns the UserHandle associated with the given user ID.
void RemoveAuthorizeRequestCallback()
Stops listening for the AUTHORIZE_REQUEST event and removes the registered callback.
discordpp::RelationshipHandle GetRelationshipHandle(uint64_t userId) const
Returns the RelationshipHandle that corresponds to the relationship between the current user and the ...
std::function< void(discordpp::ClientResult result)> SendActivityInviteCallback
Callback function for Client::SendActivityInvite, Client::SendActivityJoinRequest,...
discordpp::AuthorizationCodeVerifier CreateAuthorizationCodeVerifier()
Helper function that can create a code challenge and verifier for use in the Client::Authorize + Clie...
discordpp::Call StartCallWithAudioCallbacks(uint64_t lobbyId, discordpp::Client::UserAudioReceivedCallback receivedCb, discordpp::Client::UserAudioCapturedCallback capturedCb)
Starts or joins a call in the specified lobby.
std::function< void(discordpp::ClientResult result, uint64_t lobbyId)> CreateOrJoinLobbyCallback
Callback function for Client::CreateOrJoinLobby.
uint64_t GetApplicationId()
This function is used to get the application ID for the client. This is used to identify the applicat...
bool GetSelfDeafAll() const
Returns whether the current user is deafened in all calls.
bool SetSpeakerMode(bool speakerMode)
(deprecated) On mobile devices, enable speakerphone mode.
static int32_t GetVersionMinor()
Returns the minor version of the Discord Social SDK.
void AddVoiceLogCallback(discordpp::Client::LogCallback callback, discordpp::LoggingSeverity minSeverity)
Adds a callback function to be invoked for each new log message generated by the voice subsystem of t...
std::function< void(discordpp::ClientResult result, discordpp::VoiceSettings settings)> GetVoiceSettingsCallback
Callback function for Client::GetVoiceSettings.
void AbortAuthorize()
This will abort the authorize flow if it is in progress and tear down any associated state.
Error
Represents an error state for the socket connection that the Discord SDK maintains with the Discord b...
@ ConnectionCanceled
ConnectionCanceled.
@ ConnectionFailed
ConnectionFailed.
@ UnexpectedClose
UnexpectedClose.
void UnblockUser(uint64_t userId, discordpp::Client::UpdateRelationshipCallback cb)
Unblocks the target user. Does not restore any old relationship between the users though.
void SetShowingChat(bool showingChat)
Sets whether chat messages are currently being shown in the game.
static int32_t GetVersionMajor()
Returns the major version of the Discord Social SDK.
std::function< void(discordpp::AudioDevice device)> GetCurrentInputDeviceCallback
Callback function for Client::GetCurrentInputDevice.
void SetLobbyCreatedCallback(discordpp::Client::LobbyCreatedCallback cb)
Sets a callback to be invoked when a lobby "becomes available" to the client.
void Authorize(discordpp::AuthorizationArgs args, discordpp::Client::AuthorizationCallback callback)
Initiates an OAuth2 flow for a user to "sign in with Discord". This flow is intended for desktop and ...
std::function< void(uint64_t userId)> UserUpdatedCallback
Callback function for Client::SetUserUpdatedCallback.
void AcceptActivityInvite(discordpp::ActivityInvite invite, discordpp::Client::AcceptActivityInviteCallback cb)
Accepts an activity invite that the current user has received.
void SetInputDevice(std::string deviceId, discordpp::Client::SetInputDeviceCallback cb)
Asynchronously changes the audio input device in use by the client to the specified device....
std::function< void(uint64_t applicationId, std::string joinSecret)> ActivityJoinWithApplicationCallback
Callback function for Client::SetActivityJoinWithApplicationCallback.
void RejectGameFriendRequest(uint64_t userId, discordpp::Client::UpdateRelationshipCallback cb)
Declines an incoming game friend request from the target user.
void SetInputVolume(float inputVolume)
Sets the microphone volume for the current user.
void SetApplicationId(uint64_t applicationId)
This function is used to set the application ID for the client. This is used to identify the applicat...
std::vector< discordpp::RelationshipHandle > GetRelationships() const
Returns a list of all of the relationships the current user has with others, including all Discord re...
std::function< void(uint64_t messageId, uint64_t channelId)> MessageDeletedCallback
Callback function for Client::SetMessageDeletedCallback.
Client(const Client &)=delete
void SetLobbyUpdatedCallback(discordpp::Client::LobbyUpdatedCallback cb)
Sets a callback to be invoked when a lobby is edited, for example if the lobby's metadata is changed.
Thread
Represents the type of thread to control thread priority on.
void SendActivityJoinRequestReply(discordpp::ActivityInvite invite, discordpp::Client::SendActivityInviteCallback cb)
When another user requests to join the current user's party, this function is called to to allow that...
void GetGuildChannels(uint64_t guildId, discordpp::Client::GetGuildChannelsCallback cb)
Fetches all of the channels that the current user can access in the given guild. Channels are sorted ...
static std::string ThreadToString(discordpp::Client::Thread type)
Converts the Thread enum to a string.
void BlockUser(uint64_t userId, discordpp::Client::UpdateRelationshipCallback cb)
Blocks the target user so that they cannot send the user friend or activity invites and cannot messag...
std::function< void(uint64_t messageId)> MessageUpdatedCallback
Callback function for Client::SetMessageUpdatedCallback.
void SetEngineManagedAudioSession(bool isEngineManaged)
On mobile devices, set whether the audio environment is managed by the engine or the SDK....
void SetLobbyMemberUpdatedCallback(discordpp::Client::LobbyMemberUpdatedCallback cb)
Sets a callback function to be invoked whenever a member of a lobby is changed.
void SetActivityJoinWithApplicationCallback(discordpp::Client::ActivityJoinWithApplicationCallback cb)
Sets a callback function that is invoked when the current user also has Discord running on their comp...
bool GetSelfMuteAll() const
Returns whether the current user's microphone is muted in all calls.
std::function< void(discordpp::ClientResult result)> OpenConnectedGamesSettingsInDiscordCallback
Callback function for when Client::OpenConnectedGamesSettingsInDiscord completes.
std::function< void(discordpp::ClientResult result)> DeleteUserMessageCallback
Callback function for Client::DeleteUserMessage.
bool CanOpenMessageInDiscord(uint64_t messageId)
Returns true if the given message is able to be viewed in a Discord client.
void SetNoiseSuppression(bool on)
Enables basic background noise suppression.
std::optional< discordpp::UserHandle > GetCurrentUserV2() const
Unlike GetCurrentUser(), this method returns std::nullopt instead of a dummy object when no user is a...
void SetLobbyMemberAddedCallback(discordpp::Client::LobbyMemberAddedCallback cb)
Sets a callback function to be invoked whenever a user is added to a lobby.
void GetCurrentOutputDevice(discordpp::Client::GetCurrentOutputDeviceCallback cb)
Asynchronously fetches the current audio output device in use by the client.
void SetHttpRequestTimeout(int32_t httpTimeoutInMilliseconds)
This function is used to override the default HTTP timeout for the websocket client.
void EndCall(uint64_t channelId, discordpp::Client::EndCallCallback callback)
Ends any active call, if any. Any references you have to Call objects are invalid after they are ende...
void AcceptGameFriendRequest(uint64_t userId, discordpp::Client::UpdateRelationshipCallback cb)
Accepts an incoming game friend request from the target user.
std::function< void(discordpp::ClientResult result)> UpdateStatusCallback
Callback function for when Client::SetOnlineStatus completes.
std::optional< discordpp::LobbyHandle > GetLobbyHandle(uint64_t lobbyId) const
Returns a reference to the Discord lobby object for the given ID.
discordpp::Call StartCall(uint64_t channelId)
Starts or joins a call in the lobby specified by channelId (For a lobby, simply pass in the lobbyId).
void UpdateRichPresence(discordpp::Activity activity, discordpp::Client::UpdateRichPresenceCallback cb)
Updates the rich presence for the current user.
void SetRelationshipGroupsUpdatedCallback(discordpp::Client::RelationshipGroupsUpdatedCallback cb)
The RelationshipGroupsUpdatedCallback is invoked whenever any user in the friends list changes....
Client(discordpp::ClientCreateOptions options)
Creates a new instance of the Client with custom options.
void OpenAuthorizeDeviceScreen(uint64_t clientId, std::string const &userCode)
This function is used to show the device authorization screen and is used for the case where the user...
std::function< void(std::vector< discordpp::AudioDevice > inputDevices, std::vector< discordpp::AudioDevice > outputDevices)> DeviceChangeCallback
Callback function for Client::SetDeviceChangeCallback.
void AddLogCallback(discordpp::Client::LogCallback callback, discordpp::LoggingSeverity minSeverity)
Adds a callback function to be invoked for each new log message generated by the SDK.
void ProvisionalUserMergeCompleted(bool success)
Some functions don't work for provisional accounts, and require the user merge their account into a f...
std::function< void(std::string message, discordpp::LoggingSeverity severity)> LogCallback
Callback function invoked when a new log message is generated.
std::function< void(std::vector< discordpp::AudioDevice > devices)> GetOutputDevicesCallback
Callback function for Client::GetOutputDevices.
void AcceptDiscordFriendRequest(uint64_t userId, discordpp::Client::UpdateRelationshipCallback cb)
Accepts an incoming Discord friend request from the target user.
void SendDiscordFriendRequestById(uint64_t userId, discordpp::Client::UpdateRelationshipCallback cb)
Sends a Discord friend request to the target user.
void SendGameFriendRequest(std::string const &username, discordpp::Client::SendFriendRequestCallback cb)
Sends (or accepts) a game friend request to the target user.
void SendActivityInvite(uint64_t userId, std::string const &content, discordpp::Client::SendActivityInviteCallback cb)
Sends a Discord activity invite to the specified user.
void GetTokenFromDeviceProvisionalMerge(discordpp::DeviceAuthorizationArgs args, discordpp::AuthenticationExternalAuthType externalAuthType, std::string const &externalAuthToken, discordpp::Client::TokenExchangeCallback callback)
This function is a combination of Client::Authorize and Client::GetTokenFromProvisionalMerge,...
bool IsAuthenticated()
Returns true if the SDK has a non-empty OAuth2 token set, regardless of whether that token is valid o...
static const Client nullobj
Uninitialized instance of Client.
discordpp::Client::Status GetStatus() const
Returns the current status of the client, see the Status enum for an explanation of the possible valu...
Struct that stores information about the result of an SDK function call.
void SetRetryable(bool Retryable)
Setter for ClientResult::Retryable.
bool Retryable() const
Indicates if, although an API request failed, it is safe and recommended to retry it.
void SetErrorCode(int32_t ErrorCode)
Setter for ClientResult::ErrorCode.
ClientResult & operator=(const ClientResult &arg0)
Copy assignment operator for ClientResult.
void SetStatus(discordpp::HttpStatusCode Status)
Setter for ClientResult::Status.
std::string Error() const
A description of the error that occurred.
discordpp::ErrorType Type() const
The type of error that occurred. See ErrorType for more information.
void SetResponseBody(std::string ResponseBody)
Setter for ClientResult::ResponseBody.
ClientResult(ClientResult &&other) noexcept
Move constructor for ClientResult.
void SetSuccessful(bool Successful)
Setter for ClientResult::Successful.
std::string ToString() const
Returns the error message if any of the ClientResult.
static const ClientResult nullobj
Uninitialized instance of ClientResult.
ClientResult & operator=(ClientResult &&other) noexcept
Move assignment operator for ClientResult.
int32_t ErrorCode() const
A more detailed error code for this failure. Currently the only use of this is when an API request is...
void SetRetryAfter(float RetryAfter)
Setter for ClientResult::RetryAfter.
float RetryAfter() const
When a user is being rate limited by Discord (and so status == 429), this field should be set and is ...
std::string ResponseBody() const
The full HTTP response body, which will usually be a JSON string.
discordpp::HttpStatusCode Status() const
The HTTP status code of the API call.
void SetError(std::string Error)
Setter for ClientResult::Error.
ClientResult(const ClientResult &arg0)
Copy constructor for ClientResult.
bool Successful() const
Equivalent to type == ErrorType::None.
void SetType(discordpp::ErrorType Type)
Setter for ClientResult::Type.
Arguments to the Client::GetTokenFromDevice function.
DeviceAuthorizationArgs(DeviceAuthorizationArgs &&other) noexcept
Move constructor for DeviceAuthorizationArgs.
DeviceAuthorizationArgs(const DeviceAuthorizationArgs &arg0)
Copy constructor for DeviceAuthorizationArgs.
uint64_t ClientId() const
Optional. The Discord application ID for your game. Defaults to the value set by Client::SetApplicati...
static const DeviceAuthorizationArgs nullobj
Uninitialized instance of DeviceAuthorizationArgs.
void SetClientId(uint64_t ClientId)
Setter for DeviceAuthorizationArgs::ClientId.
void SetScopes(std::string Scopes)
Setter for DeviceAuthorizationArgs::Scopes.
DeviceAuthorizationArgs & operator=(const DeviceAuthorizationArgs &arg0)
Copy assignment operator for DeviceAuthorizationArgs.
std::string Scopes() const
Scopes is a space separated string of the oauth scopes your game is requesting.
DeviceAuthorizationArgs & operator=(DeviceAuthorizationArgs &&other) noexcept
Move assignment operator for DeviceAuthorizationArgs.
DeviceAuthorizationArgs()
void SetIsLinkable(bool IsLinkable)
Setter for GuildChannel::IsLinkable.
bool IsViewableAndWriteableByAllMembers() const
Whether the channel is "fully public" which means every member of the guild is able to view and send ...
std::optional< discordpp::LinkedLobby > LinkedLobby() const
Information about the currently linked lobby, if any. Currently Discord enforces that a channel can o...
uint64_t Id() const
The id of the channel.
void SetName(std::string Name)
Setter for GuildChannel::Name.
GuildChannel(const GuildChannel &arg0)
Copy constructor for GuildChannel.
void SetId(uint64_t Id)
Setter for GuildChannel::Id.
std::optional< uint64_t > ParentId() const
The id of the parent category channel, if any.
std::string Name() const
The name of the channel.
void SetType(discordpp::ChannelType Type)
Setter for GuildChannel::Type.
void SetPosition(int32_t Position)
Setter for GuildChannel::Position.
discordpp::ChannelType Type() const
The type of the channel.
GuildChannel & operator=(const GuildChannel &arg0)
Copy assignment operator for GuildChannel.
GuildChannel & operator=(GuildChannel &&other) noexcept
Move assignment operator for GuildChannel.
GuildChannel(GuildChannel &&other) noexcept
Move constructor for GuildChannel.
bool IsLinkable() const
Whether the current user is able to link this channel to a lobby.
int32_t Position() const
The position of the channel in the guild's channel list.
void SetLinkedLobby(std::optional< discordpp::LinkedLobby > LinkedLobby)
Setter for GuildChannel::LinkedLobby.
void SetIsViewableAndWriteableByAllMembers(bool IsViewableAndWriteableByAllMembers)
Setter for GuildChannel::IsViewableAndWriteableByAllMembers.
static const GuildChannel nullobj
Uninitialized instance of GuildChannel.
void SetParentId(std::optional< uint64_t > ParentId)
Setter for GuildChannel::ParentId.
void SetName(std::string Name)
Setter for GuildMinimal::Name.
std::string Name() const
The name of the guild.
void SetId(uint64_t Id)
Setter for GuildMinimal::Id.
static const GuildMinimal nullobj
Uninitialized instance of GuildMinimal.
GuildMinimal & operator=(GuildMinimal &&other) noexcept
Move assignment operator for GuildMinimal.
GuildMinimal & operator=(const GuildMinimal &arg0)
Copy assignment operator for GuildMinimal.
GuildMinimal(const GuildMinimal &arg0)
Copy constructor for GuildMinimal.
GuildMinimal(GuildMinimal &&other) noexcept
Move constructor for GuildMinimal.
uint64_t Id() const
The id of the guild.
Struct that stores information about the channel that a lobby is linked to.
uint64_t GuildId() const
The id of the guild (aka server) that owns the linked channel.
void SetName(std::string Name)
Setter for LinkedChannel::Name.
LinkedChannel & operator=(LinkedChannel &&other) noexcept
Move assignment operator for LinkedChannel.
LinkedChannel & operator=(const LinkedChannel &arg0)
Copy assignment operator for LinkedChannel.
std::string Name() const
The name of the linked channel.
void SetGuildId(uint64_t GuildId)
Setter for LinkedChannel::GuildId.
static const LinkedChannel nullobj
Uninitialized instance of LinkedChannel.
LinkedChannel(const LinkedChannel &arg0)
Copy constructor for LinkedChannel.
void SetId(uint64_t Id)
Setter for LinkedChannel::Id.
uint64_t Id() const
The id of the linked channel.
LinkedChannel(LinkedChannel &&other) noexcept
Move constructor for LinkedChannel.
Struct that stores information about the lobby linked to a channel.
LinkedLobby & operator=(const LinkedLobby &arg0)
Copy assignment operator for LinkedLobby.
LinkedLobby(const LinkedLobby &arg0)
Copy constructor for LinkedLobby.
uint64_t ApplicationId() const
The ID of the application that owns the lobby.
void SetLobbyId(uint64_t LobbyId)
Setter for LinkedLobby::LobbyId.
static const LinkedLobby nullobj
Uninitialized instance of LinkedLobby.
void SetApplicationId(uint64_t ApplicationId)
Setter for LinkedLobby::ApplicationId.
LinkedLobby & operator=(LinkedLobby &&other) noexcept
Move assignment operator for LinkedLobby.
uint64_t LobbyId() const
The ID of the lobby.
LinkedLobby(LinkedLobby &&other) noexcept
Move constructor for LinkedLobby.
A LobbyHandle represents a single lobby in the SDK. A lobby can be thought of as just an arbitrary,...
LobbyHandle(LobbyHandle &&other) noexcept
Move constructor for LobbyHandle.
std::optional< discordpp::LinkedChannel > LinkedChannel() const
Returns information about the channel linked to this lobby, if any.
static const LobbyHandle nullobj
Uninitialized instance of LobbyHandle.
LobbyHandle & operator=(const LobbyHandle &other)
Copy assignment operator for LobbyHandle.
std::optional< discordpp::CallInfoHandle > GetCallInfoHandle() const
Returns a reference to the CallInfoHandle if there is an active voice call in this lobby.
std::unordered_map< std::string, std::string > Metadata() const
Returns any developer supplied metadata for this lobby.
std::optional< discordpp::LobbyMemberHandle > GetLobbyMemberHandle(uint64_t memberId) const
Returns a reference to the LobbyMemberHandle for the given user ID, if they are a member of this lobb...
LobbyHandle(const LobbyHandle &other)
Copy constructor for LobbyHandle.
std::vector< discordpp::LobbyMemberHandle > LobbyMembers() const
Returns a list of the LobbyMemberHandle objects for each member of this lobby.
uint64_t Id() const
Returns the id of the lobby.
std::vector< uint64_t > LobbyMemberIds() const
Returns a list of the user IDs that are members of this lobby.
LobbyHandle & operator=(LobbyHandle &&other) noexcept
Move assignment operator for LobbyHandle.
A LobbyMemberHandle represents the state of a single user in a Lobby.
LobbyMemberHandle & operator=(const LobbyMemberHandle &other)
Copy assignment operator for LobbyMemberHandle.
static const LobbyMemberHandle nullobj
Uninitialized instance of LobbyMemberHandle.
uint64_t Id() const
The user id of the lobby member.
LobbyMemberHandle(const LobbyMemberHandle &other)
Copy constructor for LobbyMemberHandle.
bool Connected() const
Returns true if the user is currently connected to the lobby.
LobbyMemberHandle & operator=(LobbyMemberHandle &&other) noexcept
Move assignment operator for LobbyMemberHandle.
std::optional< discordpp::UserHandle > User() const
The UserHandle of the lobby member.
bool CanLinkLobby() const
Returns true if the user is allowed to link a channel to this lobby.
LobbyMemberHandle(LobbyMemberHandle &&other) noexcept
Move constructor for LobbyMemberHandle.
std::unordered_map< std::string, std::string > Metadata() const
Metadata is a set of string key/value pairs that the game developer can use.
A MessageHandle represents a single message received by the SDK.
uint64_t AuthorId() const
Returns the user ID of the user who sent this message.
std::optional< discordpp::ChannelHandle > Channel() const
Returns the ChannelHandle for the channel this message was sent in.
static const MessageHandle nullobj
Uninitialized instance of MessageHandle.
std::optional< discordpp::UserHandle > Recipient() const
Returns the UserHandle for the other participant in a DM, if this message was sent in a DM.
std::optional< uint64_t > ApplicationId() const
Returns the application ID associated with this message, if any. You can use this to identify if the ...
MessageHandle & operator=(const MessageHandle &other)
Copy assignment operator for MessageHandle.
uint64_t Id() const
Returns the ID of this message.
std::optional< discordpp::UserHandle > Author() const
Returns the UserHandle for the author of this message.
MessageHandle & operator=(MessageHandle &&other) noexcept
Move assignment operator for MessageHandle.
uint64_t EditedTimestamp() const
The timestamp in millis since the epoch when the message was most recently edited.
MessageHandle(const MessageHandle &other)
Copy constructor for MessageHandle.
std::string Content() const
Returns the content of this message, if any.
std::unordered_map< std::string, std::string > Metadata() const
Returns any metadata the developer included with this message.
std::string RawContent() const
Returns the content of this message, if any, but without replacing any markup from emojis and mention...
std::optional< discordpp::LobbyHandle > Lobby() const
Returns the LobbyHandle this message was sent in, if it was sent in a lobby.
uint64_t RecipientId() const
When this message was sent in a DM or Ephemeral DM, this method will return the ID of the other user ...
uint64_t SentTimestamp() const
The timestamp in millis since the epoch when the message was sent.
std::optional< discordpp::DisclosureTypes > DisclosureType() const
If this is an auto-generated message that is explaining some integration behavior to users,...
uint64_t ChannelId() const
Returns the channel ID this message was sent in.
MessageHandle(MessageHandle &&other) noexcept
Move constructor for MessageHandle.
bool SentFromGame() const
Returns true if this message was sent in-game, otherwise false (i.e. from Discord itself)....
std::optional< std::string > AdditionalName() const
Returns an additional display name for this message, if one was set.
std::optional< discordpp::AdditionalContent > AdditionalContent() const
If the message contains non-text content, such as images, videos, embeds, polls, etc,...
std::unordered_map< std::string, std::string > ModerationMetadata() const
Returns any moderation metadata the developer set on this message.
A RelationshipHandle represents the relationship between the current user and a target user on Discor...
RelationshipHandle & operator=(const RelationshipHandle &other)
Copy assignment operator for RelationshipHandle.
RelationshipHandle(const RelationshipHandle &other)
Copy constructor for RelationshipHandle.
uint64_t Id() const
Returns the ID of the target user in this relationship.
discordpp::RelationshipType DiscordRelationshipType() const
Returns the type of the Discord relationship.
RelationshipHandle(RelationshipHandle &&other) noexcept
Move constructor for RelationshipHandle.
discordpp::RelationshipType GameRelationshipType() const
Returns the type of the Game relationship.
static const RelationshipHandle nullobj
Uninitialized instance of RelationshipHandle.
bool IsSpamRequest() const
Returns whether this relationship is a spam request.
std::optional< discordpp::UserHandle > User() const
Returns a handle to the target user in this relationship, if one is available. This would be the user...
RelationshipHandle & operator=(RelationshipHandle &&other) noexcept
Move assignment operator for RelationshipHandle.
static const UserApplicationProfileHandle nullobj
Uninitialized instance of UserApplicationProfileHandle.
std::string Username() const
Returns the user's in-game username.
std::string Metadata() const
Returns any metadata set by the developer.
UserApplicationProfileHandle(UserApplicationProfileHandle &&other) noexcept
Move constructor for UserApplicationProfileHandle.
UserApplicationProfileHandle & operator=(const UserApplicationProfileHandle &other)
Copy assignment operator for UserApplicationProfileHandle.
std::string ProviderIssuedUserId() const
Returns the user's external identity provider issued user ID.
UserApplicationProfileHandle & operator=(UserApplicationProfileHandle &&other) noexcept
Move assignment operator for UserApplicationProfileHandle.
UserApplicationProfileHandle(const UserApplicationProfileHandle &other)
Copy constructor for UserApplicationProfileHandle.
std::string AvatarHash() const
Returns the user's in-game avatar hash.
std::optional< std::string > ProviderId() const
Returns the user's external identity provider ID if it exists.
discordpp::ExternalIdentityProviderType ProviderType() const
Returns the type of the external identity provider.
A UserHandle represents a single user on Discord that the SDK knows about and contains basic account ...
uint64_t Id() const
Returns the ID of this user.
UserHandle & operator=(UserHandle &&other) noexcept
Move assignment operator for UserHandle.
std::string Username() const
Returns the globally unique username of this user.
static const UserHandle nullobj
Uninitialized instance of UserHandle.
std::optional< std::string > Avatar() const
Returns the hash of the user's Discord profile avatar, if one is set.
UserHandle(const UserHandle &arg0)
Copy constructor for UserHandle.
discordpp::StatusType Status() const
Returns the user's online/offline/idle status.
UserHandle(UserHandle &&other) noexcept
Move constructor for UserHandle.
std::vector< discordpp::UserApplicationProfileHandle > UserApplicationProfiles() const
Returns a list of UserApplicationProfileHandles for this user. Currently, a user can only have a sing...
std::string AvatarUrl(discordpp::UserHandle::AvatarType animatedType, discordpp::UserHandle::AvatarType staticType) const
Returns a CDN url to the user's Discord profile avatar.
AvatarType
The desired type of avatar url to generate for a User.
bool IsProvisional() const
Returns true if this user is a provisional account.
std::optional< std::string > GlobalName() const
Returns the preferred display name of this user, if one is set.
std::optional< discordpp::Activity > GameActivity() const
Returns the user's rich presence activity that is associated with the current game,...
UserHandle & operator=(const UserHandle &arg0)
Copy assignment operator for UserHandle.
static std::string AvatarTypeToString(discordpp::UserHandle::AvatarType type)
Converts the AvatarType enum to a string.
std::string DisplayName() const
Returns the user's preferred name, if one is set, otherwise returns their unique username.
discordpp::RelationshipHandle Relationship() const
Returns a reference to the RelationshipHandle between the currently authenticated user and this user,...
UserMessageSummary & operator=(const UserMessageSummary &arg0)
Copy assignment operator for UserMessageSummary.
static const UserMessageSummary nullobj
Uninitialized instance of UserMessageSummary.
UserMessageSummary(UserMessageSummary &&other) noexcept
Move constructor for UserMessageSummary.
uint64_t LastMessageId() const
Returns the ID of the last message sent in the DM conversation.
uint64_t UserId() const
Returns the ID of the other user in the DM conversation.
UserMessageSummary(const UserMessageSummary &arg0)
Copy constructor for UserMessageSummary.
UserMessageSummary & operator=(UserMessageSummary &&other) noexcept
Move assignment operator for UserMessageSummary.
Settings for the void auto detection threshold for picking up activity from a user's mic.
VADThresholdSettings & operator=(VADThresholdSettings &&other) noexcept
Move assignment operator for VADThresholdSettings.
VADThresholdSettings(VADThresholdSettings &&other) noexcept
Move constructor for VADThresholdSettings.
VADThresholdSettings & operator=(const VADThresholdSettings &)=delete
static const VADThresholdSettings nullobj
Uninitialized instance of VADThresholdSettings.
bool Automatic() const
Whether or not Discord is currently automatically setting and detecting the appropriate threshold to ...
VADThresholdSettings(const VADThresholdSettings &)=delete
float VadThreshold() const
The current void auto detection threshold value, has a range of -100, 0 and defaults to -60.
void SetAutomatic(bool Automatic)
Setter for VADThresholdSettings::Automatic.
void SetVadThreshold(float VadThreshold)
Setter for VADThresholdSettings::VadThreshold.
A read-only snapshot of the user's voice settings in the connected Discord desktop client.
VoiceSettings & operator=(const VoiceSettings &arg0)
Copy assignment operator for VoiceSettings.
float InputVolume() const
Microphone volume, ranging from 0 to 100.
void SetSelfMute(bool SelfMute)
Setter for VoiceSettings::SelfMute.
void SetPttKey(std::string PttKey)
Setter for VoiceSettings::PttKey.
float OutputVolume() const
Speaker volume, ranging from 0 to 200.
bool NoiseSuppression() const
Noise suppression state.
discordpp::VoiceInputModeType InputMode() const
When the client transmits microphone audio.
void SetNoiseSuppression(bool NoiseSuppression)
Setter for VoiceSettings::NoiseSuppression.
bool EchoCancellation() const
Echo cancellation state.
void SetOutputVolume(float OutputVolume)
Setter for VoiceSettings::OutputVolume.
VoiceSettings & operator=(VoiceSettings &&other) noexcept
Move assignment operator for VoiceSettings.
std::string PttKey() const
Display string for the push-to-talk key, such as "SHIFT + F". Empty when nothing is bound.
void SetInputMode(discordpp::VoiceInputModeType InputMode)
Setter for VoiceSettings::InputMode.
VoiceSettings(VoiceSettings &&other) noexcept
Move constructor for VoiceSettings.
static const VoiceSettings nullobj
Uninitialized instance of VoiceSettings.
VoiceSettings(const VoiceSettings &arg0)
Copy constructor for VoiceSettings.
bool SelfMute() const
Self-mute state.
bool AutomaticGainControl() const
Automatic gain control state.
void SetEchoCancellation(bool EchoCancellation)
Setter for VoiceSettings::EchoCancellation.
bool SelfDeaf() const
Self-deafen state.
void SetInputVolume(float InputVolume)
Setter for VoiceSettings::InputVolume.
void SetSelfDeaf(bool SelfDeaf)
Setter for VoiceSettings::SelfDeaf.
void SetNoiseCancellation(bool NoiseCancellation)
Setter for VoiceSettings::NoiseCancellation.
bool NoiseCancellation() const
Noise cancellation state.
void SetAutomaticGainControl(bool AutomaticGainControl)
Setter for VoiceSettings::AutomaticGainControl.
A VoiceStateHandle represents the state of a single participant in a Discord voice call.
VoiceStateHandle & operator=(VoiceStateHandle &&other) noexcept
Move assignment operator for VoiceStateHandle.
bool SelfMute() const
Returns true if the given user has muted themselves so that no one else in the call can hear them.
static const VoiceStateHandle nullobj
Uninitialized instance of VoiceStateHandle.
bool SelfDeaf() const
Returns true if the given user has deafened themselves so that no one else in the call can hear them ...
VoiceStateHandle(VoiceStateHandle &&other) noexcept
Move constructor for VoiceStateHandle.
VoiceStateHandle & operator=(const VoiceStateHandle &other)
Copy assignment operator for VoiceStateHandle.
VoiceStateHandle(const VoiceStateHandle &other)
Copy constructor for VoiceStateHandle.
const char * Name(Reason reason)
constexpr std::uint64_t ApplicationId
The namespace for the generated Discord SDK bindings.
ActivityPartyPrivacy
Allows your game to control the privacy of the party the user is in.
@ Public
The party is public, which means that the user is in a party which could be joinable by either friend...
@ Private
The party is private (or unknown), which means that the user is in a party but it is not joinable wit...
DisclosureTypes
Enum that represents various informational disclosures that Discord may make to users,...
@ MessageDataVisibleOnDiscord
This disclosure type happens the first time a user sends a message in game, and that message will be ...
const char * EnumToString(discordpp::ActivityActionTypes value)
Converts a discordpp::ActivityActionTypes to a string.
HttpStatusCode
Enum that represents the various HTTP status codes that can be returned.
@ RequestHeaderFieldsTooLarge
RequestHeaderFieldsTooLarge.
@ PayloadTooLarge
PayloadTooLarge.
@ MultiStatus
MultiStatus.
@ VariantAlsoNegotiates
VariantAlsoNegotiates.
@ TemporaryRedirect
TemporaryRedirect.
@ ServiceUnavailable
ServiceUnavailable.
@ MovedPermanently
MovedPermanently.
@ PreconditionFailed
PreconditionFailed.
@ RequestTimeout
RequestTimeout.
@ NonAuthoritativeInfo
NonAuthoritativeInfo.
@ FailedDependency
FailedDependency.
@ PaymentRequired
PaymentRequired.
@ PreconditionRequired
PreconditionRequired.
@ ResetContent
ResetContent.
@ SwitchingProtocols
SwitchingProtocols.
@ HttpVersionNotSupported
HttpVersionNotSupported.
@ ExpectationFailed
ExpectationFailed.
@ PartialContent
PartialContent.
@ LengthRequired
LengthRequired.
@ MethodNotAllowed
MethodNotAllowed.
@ NotExtended
NotExtended.
@ RangeNotSatisfiable
RangeNotSatisfiable.
@ NotImplemented
NotImplemented.
@ LoopDetected
LoopDetected.
@ UnsupportedMediaType
UnsupportedMediaType.
@ NetworkAuthorizationRequired
NetworkAuthorizationRequired.
@ MultipleChoices
MultipleChoices.
@ TooManyRequests
TooManyRequests.
@ ProxyAuthRequired
ProxyAuthRequired.
@ UnprocessableEntity
UnprocessableEntity.
@ MisdirectedRequest
MisdirectedRequest.
@ PermanentRedirect
PermanentRedirect.
@ NotModified
NotModified.
@ AlreadyReported
AlreadyReported.
@ GatewayTimeout
GatewayTimeout.
@ Unauthorized
Unauthorized.
@ UpgradeRequired
UpgradeRequired.
@ InsufficientStorage
InsufficientStorage.
@ InternalServerError
InternalServerError.
@ NotAcceptable
NotAcceptable.
AuthorizationTokenType
Represents the type of auth token used by the SDK, either the normal tokens produced by the Discord d...
ChannelType
Enum that represents the various channel types on Discord.
@ GuildPublicThread
GuildPublicThread.
@ GuildNewsThread
GuildNewsThread.
@ GuildDirectory
GuildDirectory.
@ GuildCategory
GuildCategory.
@ GuildStageVoice
GuildStageVoice.
@ EphemeralDm
EphemeralDm.
@ GuildPrivateThread
GuildPrivateThread.
AuthenticationCodeChallengeMethod
Represents the crypto method used to generate a code challenge.
RelationshipType
Enum that represents the possible types of relationships that can exist between two users.
@ PendingIncoming
The current user has received a friend request from the target user, but it is not yet accepted.
@ Implicit
The Implicit type is documented for visibility, but should be unused in the SDK.
@ Suggestion
The Suggestion type is documented for visibility, but should be unused in the SDK.
@ PendingOutgoing
The current user has sent a friend request to the target user, but it is not yet accepted.
@ Blocked
The current user has blocked the target user, and so certain actions such as sending messages between...
@ None
The user has no relationship with the other user.
@ Friend
The user is friends with the other user.
AuthenticationExternalAuthType
Represents the various identity providers that can be used to authenticate a provisional account user...
@ EpicOnlineServicesIdToken
EpicOnlineServicesIdToken.
@ DiscordBotIssuedAccessToken
DiscordBotIssuedAccessToken.
@ EpicOnlineServicesAccessToken
EpicOnlineServicesAccessToken.
@ SteamSessionTicket
SteamSessionTicket.
@ UnityServicesIdToken
UnityServicesIdToken.
@ PlayStationNetworkIdToken
PlayStationNetworkIdToken.
@ AppleIdToken
AppleIdToken.
LoggingSeverity
Enum that represents the various log levels supported by the SDK.
RelationshipGroupType
Enum that represents the logical groups of relationships based on online status and game activity.
@ OnlinePlayingGame
Users who are online and currently playing the game.
@ Offline
Users who are offline.
@ OnlineElsewhere
Users who are online but not playing the game.
IntegrationType
Represents the type of integration the app will be installed as.
@ GuildInstall
GuildInstall.
@ UserInstall
UserInstall.
AudioSystem
The Discord Voice audio system to use.
@ Game
Use the game audio system.
@ Standard
Use the standard audio system.
ActivityGamePlatforms
Represents the type of platforms that an activity invite can be accepted on.
VoiceInputModeType
Describes how the Discord client decides when to transmit the user's microphone audio.
@ PushToTalk
Transmit while the push-to-talk shortcut is held.
@ VoiceActivity
Transmit when voice activity is detected.
ActivityTypes
Discord RichPresence supports multiple types of activities that a user can be doing.
@ CustomStatus
CustomStatus.
StatusType
Enum that specifies the various online statuses for a user.
@ Online
The user is online and recently active.
@ Dnd
The user is online, but wishes to suppress notifications for the time being.
@ Invisible
The user is online, but wishes to appear as if they are offline to other users.
@ Offline
The user is offline and not connected to Discord.
@ Streaming
The user is online and is actively streaming content.
@ Idle
The user is online, but has not been active for a while and may be away from their computer.
StatusDisplayTypes
Controls which Discord RichPresence field is displayed in the user's status.
ExternalIdentityProviderType
The type of external identity provider.
@ EpicOnlineServices
EpicOnlineServices.
AudioModeType
Represents whether a voice call is using push to talk or auto voice detection.
@ MODE_UNINIT
MODE_UNINIT.
ErrorType
Enum representing various types of errors the SDK returns.
@ HTTPError
An HTTP call was made to Discord's servers but a non success HTTP status code was returned....
@ NetworkError
The user is offline or there was some network issue that prevented an underlying HTTP call from succe...
@ AuthorizationFailed
An authorization function failed, but not necessarily as the result of an HTTP call that returned an ...
@ ClientNotReady
An operation such as sending a friend request or joining a lobby was attempted but the Client is not ...
@ None
No error, the operation was successful.
@ Aborted
The user or developer aborted an operation, such as an authorization flow.
@ RPCError
An RPC call was made to Discord's desktop application, but it returned a non-success result....
@ ValidationError
Used when an SDK method is called but the inputs don't pass local validation. For example if one atte...
@ ClientDestroyed
The Client has been destroyed and so this operation cannot complete.
@ Disabled
An operation was temporarily disabled for stability reasons.
DiscordObjectState
Represents the memory state of a Discord object.
@ Invalid
The object has been freed.
@ Owned
The object is owned by the C++ wrapper and methods can be called on it.
AdditionalContentType
Represents the type of additional content contained in a message.
@ VoiceMessage
VoiceMessage.
ActivityActionTypes
ActivityActionTypes represents the type of invite being sent to a user.
@ JoinRequest
JoinRequest.
typedef void(S_CALLTYPE *SteamAPIWarningMessageHook_t)(int
Discord_LobbyMemberHandle * ptr
struct Discord_String * keys
struct Discord_String * values
Discord_RelationshipHandle * ptr
Discord_UserApplicationProfileHandle * ptr