Rise
The Vieneo Province
Loading...
Searching...
No Matches
discordpp::GuildChannel Class Reference

Represents a channel in a guild that the current user is a member of and may be able to be linked to a lobby. More...

#include <discordpp.h>

Collaboration diagram for discordpp::GuildChannel:
[legend]

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.
discordpp::ChannelType Type () const
 The type of the channel.
void SetType (discordpp::ChannelType Type)
 Setter for GuildChannel::Type.
int32_t Position () const
 The position of the channel in the guild's channel list.
void SetPosition (int32_t Position)
 Setter for GuildChannel::Position.
std::optional< uint64_t > ParentId () const
 The id of the parent category channel, if any.
void SetParentId (std::optional< uint64_t > ParentId)
 Setter for GuildChannel::ParentId.
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.

Detailed Description

Represents a channel in a guild that the current user is a member of and may be able to be linked to a lobby.

Definition at line 2223 of file discordpp.h.

Constructor & Destructor Documentation

◆ GuildChannel() [1/2]

discordpp::GuildChannel::GuildChannel ( GuildChannel && other)
noexcept

Move constructor for GuildChannel.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GuildChannel() [2/2]

discordpp::GuildChannel::GuildChannel ( const GuildChannel & arg0)

Copy constructor for GuildChannel.

Here is the call graph for this function:

Member Function Documentation

◆ Id()

uint64_t discordpp::GuildChannel::Id ( ) const

The id of the channel.

Here is the caller graph for this function:

◆ IsLinkable()

bool discordpp::GuildChannel::IsLinkable ( ) const

Whether the current user is able to link this channel to a lobby.

For this to be true:

  • The channel must be a guild text channel
  • The channel may not be marked as NSFW
  • The channel must not be currently linked to a different lobby
  • The user must have the following permissions in the channel in order to link it:
    • Manage Channels
    • View Channel
    • Send Messages
Here is the caller graph for this function:

◆ IsViewableAndWriteableByAllMembers()

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.

Here is the caller graph for this function:

◆ LinkedLobby()

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.

Here is the caller graph for this function:

◆ Name()

std::string discordpp::GuildChannel::Name ( ) const

The name of the channel.

Here is the caller graph for this function:

◆ operator bool()

discordpp::GuildChannel::operator bool ( ) const
inline

Returns true if the instance contains a valid object.

Definition at line 2244 of file discordpp.h.

◆ operator=() [1/2]

GuildChannel & discordpp::GuildChannel::operator= ( const GuildChannel & arg0)

Copy assignment operator for GuildChannel.

Here is the call graph for this function:

◆ operator=() [2/2]

GuildChannel & discordpp::GuildChannel::operator= ( GuildChannel && other)
noexcept

Move assignment operator for GuildChannel.

Here is the call graph for this function:

◆ ParentId()

std::optional< uint64_t > discordpp::GuildChannel::ParentId ( ) const

The id of the parent category channel, if any.

Here is the caller graph for this function:

◆ Position()

int32_t discordpp::GuildChannel::Position ( ) const

The position of the channel in the guild's channel list.

Here is the caller graph for this function:

◆ SetId()

void discordpp::GuildChannel::SetId ( uint64_t Id)

Setter for GuildChannel::Id.

Here is the call graph for this function:

◆ SetIsLinkable()

void discordpp::GuildChannel::SetIsLinkable ( bool IsLinkable)

Setter for GuildChannel::IsLinkable.

Here is the call graph for this function:

◆ SetIsViewableAndWriteableByAllMembers()

void discordpp::GuildChannel::SetIsViewableAndWriteableByAllMembers ( bool IsViewableAndWriteableByAllMembers)

Setter for GuildChannel::IsViewableAndWriteableByAllMembers.

Here is the call graph for this function:

◆ SetLinkedLobby()

void discordpp::GuildChannel::SetLinkedLobby ( std::optional< discordpp::LinkedLobby > LinkedLobby)

Setter for GuildChannel::LinkedLobby.

Here is the call graph for this function:

◆ SetName()

void discordpp::GuildChannel::SetName ( std::string Name)

Setter for GuildChannel::Name.

Here is the call graph for this function:

◆ SetParentId()

void discordpp::GuildChannel::SetParentId ( std::optional< uint64_t > ParentId)

Setter for GuildChannel::ParentId.

Here is the call graph for this function:

◆ SetPosition()

void discordpp::GuildChannel::SetPosition ( int32_t Position)

Setter for GuildChannel::Position.

Here is the call graph for this function:

◆ SetType()

void discordpp::GuildChannel::SetType ( discordpp::ChannelType Type)

Setter for GuildChannel::Type.

Here is the call graph for this function:

◆ Type()

discordpp::ChannelType discordpp::GuildChannel::Type ( ) const

The type of the channel.

Here is the caller graph for this function:

Member Data Documentation

◆ nullobj

const GuildChannel discordpp::GuildChannel::nullobj
static

Uninitialized instance of GuildChannel.

Definition at line 2242 of file discordpp.h.


The documentation for this class was generated from the following file: