Discord Social SDK
Loading...
Searching...
No Matches
discordpp::UserGuild Class Reference

Detailed Description

Represents a guild (also known as a Discord server) that the current user is a member of, along with the current user's permissions in it.

Public Member Functions

 UserGuild (UserGuild &&other) noexcept
 Move constructor for UserGuild.
 
UserGuild & operator= (UserGuild &&other) noexcept
 Move assignment operator for UserGuild.
 
 operator bool () const
 Returns true if the instance contains a valid object.
 
 UserGuild (const UserGuild &arg0)
 Copy constructor for UserGuild.
 
UserGuild & operator= (const UserGuild &arg0)
 Copy assignment operator for UserGuild.
 
uint64_t Id () const
 The id of the guild.
 
void SetId (uint64_t Id)
 Setter for UserGuild::Id.
 
discordpp::String Name () const
 The name of the guild.
 
void SetName (std::string_view Name)
 Setter for UserGuild::Name.
 
std::optional< discordpp::String > Icon () const
 The hash of the guild's icon, if it has one.
 
void SetIcon (std::optional< std::string_view > Icon)
 Setter for UserGuild::Icon.
 
std::optional< discordpp::String > Banner () const
 The hash of the guild's banner, if it has one.
 
void SetBanner (std::optional< std::string_view > Banner)
 Setter for UserGuild::Banner.
 
bool Owner () const
 Whether the current user is the owner of the guild.
 
void SetOwner (bool Owner)
 Setter for UserGuild::Owner.
 
uint64_t Permissions () const
 The current user's permissions in the guild, as a bitfield of Discord permission flags.
 
void SetPermissions (uint64_t Permissions)
 Setter for UserGuild::Permissions.
 
std::optional< discordpp::LinkedGameOrganization > LinkedGameOrganization () const
 Information about the game organization linked to this guild, if any.
 
void SetLinkedGameOrganization (std::optional< discordpp::LinkedGameOrganization > LinkedGameOrganization)
 Setter for UserGuild::LinkedGameOrganization.
 

Static Public Attributes

static const UserGuild nullobj
 Uninitialized instance of UserGuild.
 

Constructor & Destructor Documentation

◆ UserGuild() [1/2]

discordpp::UserGuild::UserGuild ( UserGuild && other)
noexcept

Move constructor for UserGuild.

◆ UserGuild() [2/2]

discordpp::UserGuild::UserGuild ( const UserGuild & arg0)

Copy constructor for UserGuild.

Member Function Documentation

◆ Banner()

std::optional< discordpp::String > discordpp::UserGuild::Banner ( ) const

The hash of the guild's banner, if it has one.

◆ Icon()

std::optional< discordpp::String > discordpp::UserGuild::Icon ( ) const

The hash of the guild's icon, if it has one.

◆ Id()

uint64_t discordpp::UserGuild::Id ( ) const

The id of the guild.

◆ LinkedGameOrganization()

std::optional< discordpp::LinkedGameOrganization > discordpp::UserGuild::LinkedGameOrganization ( ) const

Information about the game organization linked to this guild, if any.

◆ Name()

discordpp::String discordpp::UserGuild::Name ( ) const

The name of the guild.

◆ operator bool()

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

Returns true if the instance contains a valid object.

◆ operator=() [1/2]

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

Copy assignment operator for UserGuild.

◆ operator=() [2/2]

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

Move assignment operator for UserGuild.

◆ Owner()

bool discordpp::UserGuild::Owner ( ) const

Whether the current user is the owner of the guild.

◆ Permissions()

uint64_t discordpp::UserGuild::Permissions ( ) const

The current user's permissions in the guild, as a bitfield of Discord permission flags.

Guild owners have all permissions.

◆ SetBanner()

void discordpp::UserGuild::SetBanner ( std::optional< std::string_view > Banner)

Setter for UserGuild::Banner.

◆ SetIcon()

void discordpp::UserGuild::SetIcon ( std::optional< std::string_view > Icon)

Setter for UserGuild::Icon.

◆ SetId()

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

Setter for UserGuild::Id.

◆ SetLinkedGameOrganization()

void discordpp::UserGuild::SetLinkedGameOrganization ( std::optional< discordpp::LinkedGameOrganization > LinkedGameOrganization)

◆ SetName()

void discordpp::UserGuild::SetName ( std::string_view Name)

Setter for UserGuild::Name.

◆ SetOwner()

void discordpp::UserGuild::SetOwner ( bool Owner)

Setter for UserGuild::Owner.

◆ SetPermissions()

void discordpp::UserGuild::SetPermissions ( uint64_t Permissions)

Member Data Documentation

◆ nullobj

const UserGuild discordpp::UserGuild::nullobj
static

Uninitialized instance of UserGuild.