Discord Social SDK
|
Represents a channel in a guild that the current user is a member of and may be able to be linked to a lobby.
Public Member Functions | |
GuildChannel (GuildChannel &&other) noexcept | |
Move constructor for GuildChannel. | |
GuildChannel & | operator= (GuildChannel &&other) noexcept |
Move assignment operator for GuildChannel. | |
operator bool () const | |
Returns true if the instance contains a valid object. | |
GuildChannel (const GuildChannel &arg0) | |
Copy constructor for GuildChannel. | |
GuildChannel & | operator= (const GuildChannel &arg0) |
Copy assignment operator for GuildChannel. | |
uint64_t | Id () const |
The id of the channel. | |
void | SetId (uint64_t Id) |
Setter for GuildChannel::Id. | |
std::string | Name () const |
The name of the channel. | |
void | SetName (std::string Name) |
Setter for GuildChannel::Name. | |
bool | IsLinkable () const |
Whether the current user is able to link this channel to a lobby. | |
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 messages in that channel. | |
void | SetIsViewableAndWriteableByAllMembers (bool IsViewableAndWriteableByAllMembers) |
Setter for GuildChannel::IsViewableAndWriteableByAllMembers. | |
std::optional< discordpp::LinkedLobby > | LinkedLobby () const |
Information about the currently linked lobby, if any. Currently Discord enforces that a channel can only be linked to a single lobby. | |
void | SetLinkedLobby (std::optional< discordpp::LinkedLobby > LinkedLobby) |
Setter for GuildChannel::LinkedLobby. | |
Static Public Attributes | |
static const GuildChannel | nullobj |
Uninitialized instance of GuildChannel. | |
|
noexcept |
Move constructor for GuildChannel.
discordpp::GuildChannel::GuildChannel | ( | const GuildChannel & | arg0 | ) |
Copy constructor for GuildChannel.
uint64_t discordpp::GuildChannel::Id | ( | ) | const |
The id of the channel.
bool discordpp::GuildChannel::IsLinkable | ( | ) | const |
Whether the current user is able to link this channel to a lobby.
For this to be true:
bool discordpp::GuildChannel::IsViewableAndWriteableByAllMembers | ( | ) | const |
Whether the channel is "fully public" which means every member of the guild is able to view and send messages in that channel.
Discord allows lobbies to be linked to private channels in a server, which enables things like a private admin chat.
However there is no permission synchronization between the game and Discord, so it is the responsibility of the game to restrict access to the lobby. Every member of the lobby will be able to view and send messages in the lobby/channel, regardless of whether that user would have permission to do so in Discord.
This may be more complexity than a game wants to take on, so instead you can only allow linking of channels that are fully public in the server so there is no confusion.
std::optional< discordpp::LinkedLobby > discordpp::GuildChannel::LinkedLobby | ( | ) | const |
Information about the currently linked lobby, if any. Currently Discord enforces that a channel can only be linked to a single lobby.
std::string discordpp::GuildChannel::Name | ( | ) | const |
The name of the channel.
|
inline |
Returns true if the instance contains a valid object.
GuildChannel & discordpp::GuildChannel::operator= | ( | const GuildChannel & | arg0 | ) |
Copy assignment operator for GuildChannel.
|
noexcept |
Move assignment operator for GuildChannel.
void discordpp::GuildChannel::SetId | ( | uint64_t | Id | ) |
Setter for GuildChannel::Id.
void discordpp::GuildChannel::SetIsLinkable | ( | bool | IsLinkable | ) |
Setter for GuildChannel::IsLinkable.
void discordpp::GuildChannel::SetIsViewableAndWriteableByAllMembers | ( | bool | IsViewableAndWriteableByAllMembers | ) |
Setter for GuildChannel::IsViewableAndWriteableByAllMembers.
void discordpp::GuildChannel::SetLinkedLobby | ( | std::optional< discordpp::LinkedLobby > | LinkedLobby | ) |
Setter for GuildChannel::LinkedLobby.
void discordpp::GuildChannel::SetName | ( | std::string | Name | ) |
Setter for GuildChannel::Name.
|
static |
Uninitialized instance of GuildChannel.