DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
Loading...
Searching...
No Matches
DiscordCoreAPI::Roles Class Reference

An interface class for the Role related Discord endpoints. More...

#include <RoleEntities.hpp>

Static Public Member Functions

static CoRoutine< void > addGuildMemberRoleAsync (AddGuildMemberRoleData dataPackage)
 Adds a Role to a chosen Guild member. More...
 
static CoRoutine< RolecreateGuildRoleAsync (CreateGuildRoleData dataPackage)
 Creates a new Role within the given Guild. More...
 
static CoRoutine< RoleDatagetCachedRoleAsync (GetRoleData dataPackage)
 Collects a given Role from the library's cache. More...
 
static CoRoutine< std::vector< Role > > getGuildMemberRolesAsync (GetGuildMemberRolesData dataPackage)
 Collects the Roles that a GuildMember has. More...
 
static CoRoutine< std::vector< Role > > getGuildRolesAsync (GetGuildRolesData dataPackage)
 Collects the Roles that a Guild has. More...
 
static CoRoutine< RolegetRoleAsync (GetRoleData dataPackage)
 Collects a Role from the Discord servers. More...
 
static CoRoutine< RolemodifyGuildRoleAsync (ModifyGuildRoleData dataPackage)
 Updates a given Role's properties. More...
 
static CoRoutine< std::vector< Role > > modifyGuildRolePositionsAsync (ModifyGuildRolePositionsData dataPackage)
 Updates a Role's positions. More...
 
static CoRoutine< void > removeGuildMemberRoleAsync (RemoveGuildMemberRoleData dataPackage)
 Removes a given Role from a chosen GuildMember. More...
 
static CoRoutine< void > removeGuildRoleAsync (RemoveGuildRoleData dataPackage)
 Removes a given Role from a Guild. More...
 

Member Function Documentation

◆ addGuildMemberRoleAsync()

CoRoutine< void > DiscordCoreAPI::Roles::addGuildMemberRoleAsync ( AddGuildMemberRoleData  dataPackage)
static

Adds a Role to a chosen Guild member.

Parameters
dataPackageAn AddGuildMemberRoleData structure.
Returns
A CoRoutine containing void.

Definition at line 176 of file RoleEntities.cpp.

◆ createGuildRoleAsync()

CoRoutine< Role > DiscordCoreAPI::Roles::createGuildRoleAsync ( CreateGuildRoleData  dataPackage)
static

Creates a new Role within the given Guild.

Parameters
dataPackageA CreateGuildRoleData structure.
Returns
A CoRoutine containing a Role.

Definition at line 214 of file RoleEntities.cpp.

Here is the call graph for this function:

◆ getCachedRoleAsync()

CoRoutine< RoleData > DiscordCoreAPI::Roles::getCachedRoleAsync ( GetRoleData  dataPackage)
static

Collects a given Role from the library's cache.

Parameters
dataPackageA GetRoleData structure.
Returns
A CoRoutine containing a Role.

Definition at line 339 of file RoleEntities.cpp.

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

◆ getGuildMemberRolesAsync()

CoRoutine< std::vector< Role > > DiscordCoreAPI::Roles::getGuildMemberRolesAsync ( GetGuildMemberRolesData  dataPackage)
static

Collects the Roles that a GuildMember has.

Parameters
dataPackageA GetGuildMemberRolesData structure.
Returns
A CoRoutine containing a RoleVector.

Definition at line 310 of file RoleEntities.cpp.

Here is the call graph for this function:

◆ getGuildRolesAsync()

CoRoutine< std::vector< Role > > DiscordCoreAPI::Roles::getGuildRolesAsync ( GetGuildRolesData  dataPackage)
static

Collects the Roles that a Guild has.

Parameters
dataPackageA GetGuildRolesData structure.
Returns
A CoRoutine containing a RoleVector.

Definition at line 202 of file RoleEntities.cpp.

Here is the caller graph for this function:

◆ getRoleAsync()

CoRoutine< Role > DiscordCoreAPI::Roles::getRoleAsync ( GetRoleData  dataPackage)
static

Collects a Role from the Discord servers.

Parameters
dataPackageA GetRoleData structure.
Returns
A CoRoutine containing a Role.

Definition at line 324 of file RoleEntities.cpp.

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

◆ modifyGuildRoleAsync()

CoRoutine< Role > DiscordCoreAPI::Roles::modifyGuildRoleAsync ( ModifyGuildRoleData  dataPackage)
static

Updates a given Role's properties.

Parameters
dataPackageA ModifyGuildRoleData structure.
Returns
A CoRoutine containing a Role.

Definition at line 276 of file RoleEntities.cpp.

◆ modifyGuildRolePositionsAsync()

CoRoutine< std::vector< Role > > DiscordCoreAPI::Roles::modifyGuildRolePositionsAsync ( ModifyGuildRolePositionsData  dataPackage)
static

Updates a Role's positions.

Parameters
dataPackageA ModifyGuildRolePositionsData structure.
Returns
A CoRoutine containing a RoleVector.

Definition at line 238 of file RoleEntities.cpp.

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

◆ removeGuildMemberRoleAsync()

CoRoutine< void > DiscordCoreAPI::Roles::removeGuildMemberRoleAsync ( RemoveGuildMemberRoleData  dataPackage)
static

Removes a given Role from a chosen GuildMember.

Parameters
dataPackageA RemoveGuildMemberRoleData structure.
Returns
A CoRoutine containing void.

Definition at line 189 of file RoleEntities.cpp.

◆ removeGuildRoleAsync()

CoRoutine< void > DiscordCoreAPI::Roles::removeGuildRoleAsync ( RemoveGuildRoleData  dataPackage)
static

Removes a given Role from a Guild.

Parameters
dataPackageA RemoveGuildRoleData structure.
Returns
A CoRoutine containing void.

Definition at line 298 of file RoleEntities.cpp.


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