aegis.cpp
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Public Attributes | Friends | List of all members
aegis::guild Class Reference

Class for performing actions pertaining to a specified guild. More...

#include <guild.hpp>

Public Member Functions

 guild (const int32_t _shard_id, const snowflake _id, core *_bot, asio::io_context &_io)
 Create a new guild. More...
 
 guild (const guild &)=delete
 
 guild (guild &&)=delete
 
guildoperator= (const guild &)=delete
 
permission perms ()
 Get bot's current permissions for this guild. More...
 
userself () const
 Get pointer to own member object. More...
 
std::string get_name () const noexcept
 Get name of guild. More...
 
std::string get_icon () const noexcept
 Get icon of guild. More...
 
std::string get_splash () const noexcept
 Get splash of guild. More...
 
std::string get_region () const noexcept
 Get region of guild. More...
 
bool member_has_role (snowflake member_id, snowflake role_id) const noexcept
 Check if member has role. More...
 
int32_t get_member_count () const noexcept
 Get count of members in guild (potentially inaccurate) More...
 
permission get_permissions (snowflake member_id, snowflake channel_id) const
 Get guild permissions for member in channel. More...
 
permission get_permissions (const user *_member, const channel *_channel) const
 Get guild permissions for member in channel. More...
 
int64_t base_permissions () const
 Get base guild permissions for member. More...
 
int64_t base_permissions (const user *_member) const noexcept
 Get base guild permissions for self. More...
 
int64_t base_permissions (const user &_member) const noexcept
 Get base guild permissions for member. More...
 
int64_t compute_overwrites (const int64_t _base_permissions, const user &_member, const channel &_channel) const noexcept
 Calculate permission overrides for member in channel. More...
 
const gateway::objects::role get_role (const int64_t r) const
 Get role. More...
 
const snowflake get_owner () const noexcept
 Get owner of guild. More...
 
snowflake get_id () const noexcept
 Get the snowflake of this guild. More...
 
channelget_channel (snowflake id) const noexcept
 Get channel internally. More...
 
aegis::future
< gateway::objects::guild
get_guild ()
 Get guild information. More...
 
aegis::future
< gateway::objects::guild
modify_guild (lib::optional< std::string > name={}, lib::optional< std::string > voice_region={}, lib::optional< int > verification_level={}, lib::optional< int > default_message_notifications={}, lib::optional< int > explicit_content_filter={}, lib::optional< snowflake > afk_channel_id={}, lib::optional< int > afk_timeout={}, lib::optional< std::string > icon={}, lib::optional< snowflake > owner_id={}, lib::optional< std::string > splash={})
 Modify guild information. More...
 
aegis::future
< gateway::objects::guild
modify_guild (modify_guild_t obj)
 Modify guild information. More...
 
aegis::future< rest::rest_replydelete_guild ()
 Delete a guild. More...
 
aegis::future
< gateway::objects::channel
create_text_channel (const std::string &name, int64_t parent_id=0, bool nsfw=false, const std::vector< gateway::objects::permission_overwrite > &permission_overwrites={})
 Create a text channel. More...
 
aegis::future
< gateway::objects::channel
create_text_channel (create_text_channel_t obj)
 Create a text channel. More...
 
aegis::future
< gateway::objects::channel
create_voice_channel (const std::string &name, int32_t bitrate=0, int32_t user_limit=0, int64_t parent_id=0, const std::vector< gateway::objects::permission_overwrite > &permission_overwrites={})
 Create a voice channel. More...
 
aegis::future
< gateway::objects::channel
create_voice_channel (create_voice_channel_t obj)
 Create a voice channel. More...
 
aegis::future
< gateway::objects::channel
create_category_channel (const std::string &name, int64_t parent_id, const std::vector< gateway::objects::permission_overwrite > &permission_overwrites)
 Create a category. More...
 
aegis::future
< gateway::objects::channel
create_category_channel (create_category_channel_t obj)
 Create a category. More...
 
aegis::future< rest::rest_replymodify_channel_positions ()
 Modify positions of channels. More...
 
aegis::future
< gateway::objects::member
modify_guild_member (snowflake user_id, lib::optional< std::string > nick, lib::optional< bool > mute, lib::optional< bool > deaf, lib::optional< std::vector< snowflake >> roles, lib::optional< snowflake > channel_id)
 
aegis::future
< gateway::objects::member
modify_guild_member (modify_guild_member_t obj)
 
aegis::future< rest::rest_replymodify_my_nick (const std::string &newname)
 Modify own nickname. More...
 
aegis::future
< gateway::objects::role
add_guild_member_role (snowflake user_id, snowflake role_id)
 Add a role to guild member. More...
 
aegis::future< rest::rest_replyremove_guild_member_role (snowflake user_id, snowflake role_id)
 Remove a role from guild member. More...
 
aegis::future< rest::rest_replyremove_guild_member (snowflake user_id)
 Remove guild member (kick) More...
 
aegis::future< rest::rest_replycreate_guild_ban (snowflake user_id, int8_t delete_message_days=0, const std::string &reason="")
 Create a new guild ban. More...
 
aegis::future< rest::rest_replycreate_guild_ban (create_guild_ban_t obj)
 Create a new guild ban. More...
 
aegis::future< rest::rest_replyremove_guild_ban (snowflake user_id)
 Remove a guild ban. More...
 
aegis::future
< gateway::objects::role
create_guild_role (const std::string &name, permission _perms, int32_t color, bool hoist, bool mentionable)
 Create a guild role. More...
 
aegis::future
< gateway::objects::role
create_guild_role (create_guild_role_t obj)
 Create a guild role. More...
 
aegis::future< rest::rest_replymodify_guild_role_positions (snowflake role_id, int16_t position)
 Modify the guild role positions. More...
 
aegis::future
< gateway::objects::role
modify_guild_role (snowflake role_id, const std::string &name, permission _perms, int32_t color, bool hoist, bool mentionable)
 Modify a guild role. More...
 
aegis::future
< gateway::objects::role
modify_guild_role (modify_guild_role_t obj)
 Modify a guild role. More...
 
aegis::future< rest::rest_replydelete_guild_role (snowflake role_id)
 Delete a guild role. More...
 
aegis::future< rest::rest_replyget_guild_prune_count (int16_t days)
 Get a count of members that would be pruned. More...
 
aegis::future< rest::rest_replybegin_guild_prune (int16_t days)
 Perform a guild prune. More...
 
aegis::future< rest::rest_replyget_guild_invites ()
 Get active guild invites. More...
 
aegis::future< rest::rest_replyget_guild_integrations ()
 Get guild integrations. More...
 
aegis::future< rest::rest_replycreate_guild_integration ()
 Create a new guild integration. More...
 
aegis::future< rest::rest_replymodify_guild_integration ()
 Modify a guild integration. More...
 
aegis::future< rest::rest_replydelete_guild_integration ()
 Delete a guild integration. More...
 
aegis::future< rest::rest_replysync_guild_integration ()
 Get the guild integrations. More...
 
aegis::future< rest::rest_replyget_guild_embed ()
 Get the guild embed settings. More...
 
aegis::future< rest::rest_replymodify_guild_embed ()
 Modify the guild embed settings. More...
 
aegis::future< rest::rest_replyleave ()
 Leave the guild this object is associated with. More...
 
coreget_bot () const noexcept
 Gets the Bot object. More...
 
userfind_member (snowflake member_id) const noexcept
 Obtain a pointer to a member by snowflake. More...
 
channelfind_channel (snowflake channel_id) const noexcept
 Obtain a pointer to a channel by snowflake. More...
 
channelfind_channel (std::string channel_name) const noexcept
 Obtain a pointer to a channel by name. More...
 
lib::optional
< gateway::objects::role
find_role (snowflake role_id) const noexcept
 Obtain a role by snowflake. More...
 
lib::optional
< gateway::objects::role
find_role (std::string role_name) const noexcept
 Obtain a role by name. More...
 
std::unordered_map< snowflake,
channel * > 
get_channels () const noexcept
 Obtain map of channels. More...
 
std::unordered_map< snowflake,
user * > 
get_members () const noexcept
 Obtain map of members. More...
 
std::unordered_map< snowflake,
gateway::objects::role
get_roles () const noexcept
 Obtain map of roles. More...
 
std::unordered_map< snowflake,
gateway::objects::voice_state
get_voicestates () const noexcept
 Obtain map of voice states. More...
 
const std::unordered_map
< snowflake, user * > & 
get_members_nocopy () const noexcept
 Obtain map of members - caller must lock guild._m to ensure no race conditions. More...
 
const std::unordered_map
< snowflake,
gateway::objects::role > & 
get_roles_nocopy () const noexcept
 Obtain map of roles - caller must lock guild._m to ensure no race conditions. More...
 
const std::unordered_map
< snowflake, channel * > & 
get_channels_nocopy () const noexcept
 Obtain map of channels - caller must lock guild._m to ensure no race conditions. More...
 
shared_mutex & mtx ()
 

Public Attributes

int32_t shard_id
 
snowflake guild_id
 

Friends

class core
 
class user
 

Detailed Description

Class for performing actions pertaining to a specified guild.

Constructor & Destructor Documentation

aegis::guild::guild ( const int32_t  _shard_id,
const snowflake  _id,
core _bot,
asio::io_context &  _io 
)
explicit

Create a new guild.

Parameters
shard_idShard id this guild belongs to
statePointer to state struct holding bot data
idSnowflake of this guild
_ratelimitReference to the bucket factory that handles the ratelimits for this guild

Member Function Documentation

aegis::future< gateway::objects::role > aegis::guild::add_guild_member_role ( snowflake  user_id,
snowflake  role_id 
)

Add a role to guild member.

Parameters
user_idThe snowflake of the user to add new role
role_idThe snowflake of the role to add to member
Returns
aegis::future<gateway::objects::role>
int64_t aegis::guild::base_permissions ( ) const

Get base guild permissions for member.

Parameters
_memberPointer to member object
int64_t aegis::guild::base_permissions ( const user _member) const
noexcept

Get base guild permissions for self.

Parameters
_memberPointer to member object
int64_t aegis::guild::base_permissions ( const user _member) const
noexcept

Get base guild permissions for member.

Parameters
_memberReference to member object
aegis::future< rest::rest_reply > aegis::guild::begin_guild_prune ( int16_t  days)

Perform a guild prune.

Parameters
daysThe days of inactivity to prune the member
Returns
aegis::future<rest::rest_reply>
Todo:
Incomplete. Signature may change
int64_t aegis::guild::compute_overwrites ( const int64_t  _base_permissions,
const user _member,
const channel _channel 
) const
noexcept

Calculate permission overrides for member in channel.

Parameters
_base_permissionsBase guild permissions for member in guild
_memberReference to member object
_channelReference to channel object
Returns
true on successful request, false for no permissions
aegis::future< gateway::objects::channel > aegis::guild::create_category_channel ( const std::string &  name,
int64_t  parent_id,
const std::vector< gateway::objects::permission_overwrite > &  permission_overwrites 
)

Create a category.

Parameters
nameString of the name for the channel
parent_idThe channel or category to place this channel below
permission_overwritesArray of permission overwrites to apply to the channel
Returns
aegis::future<gateway::objects::channel>
aegis::future<gateway::objects::channel> aegis::guild::create_category_channel ( create_category_channel_t  obj)

Create a category.

See also
aegis::create_category_channel_t
Parameters
objStruct of the contents of the request
Returns
aegis::future<gateway::objects::channel>
aegis::future< rest::rest_reply > aegis::guild::create_guild_ban ( snowflake  user_id,
int8_t  delete_message_days = 0,
const std::string &  reason = "" 
)

Create a new guild ban.

Parameters
user_idThe snowflake of the member to ban
delete_message_daysHow many days to delete member message history (0-7)
Returns
aegis::future<rest::rest_reply>
aegis::future<rest::rest_reply> aegis::guild::create_guild_ban ( create_guild_ban_t  obj)

Create a new guild ban.

See also
aegis::create_guild_ban_t
Parameters
objStruct of the contents of the request
Returns
aegis::future<rest::rest_reply>
aegis::future< rest::rest_reply > aegis::guild::create_guild_integration ( )

Create a new guild integration.

Returns
aegis::future<rest::rest_reply>
Todo:
Incomplete. Signature may change
aegis::future< gateway::objects::role > aegis::guild::create_guild_role ( const std::string &  name,
permission  _perms,
int32_t  color,
bool  hoist,
bool  mentionable 
)

Create a guild role.

See also
aegis::permission
Parameters
nameThe name of the role to create
_permsThe permissions to set
color32bit integer of the color
hoistWhether the role should be separated from other roles
mentionableWhether the role can be specifically mentioned
Returns
aegis::future<gateway::objects::role>
aegis::future<gateway::objects::role> aegis::guild::create_guild_role ( create_guild_role_t  obj)

Create a guild role.

See also
aegis::permission
aegis::create_guild_role_t
Parameters
objStruct of the contents of the request
Returns
aegis::future<gateway::objects::role>
aegis::future< gateway::objects::channel > aegis::guild::create_text_channel ( const std::string &  name,
int64_t  parent_id = 0,
bool  nsfw = false,
const std::vector< gateway::objects::permission_overwrite > &  permission_overwrites = {} 
)

Create a text channel.

Parameters
nameString of the name for the channel
parent_idThe channel or category to place this channel below
nsfwWhether the channel will be labeled as not safe for work
permission_overwritesArray of permission overwrites to apply to the channel
Returns
aegis::future<gateway::objects::channel>
aegis::future<gateway::objects::channel> aegis::guild::create_text_channel ( create_text_channel_t  obj)

Create a text channel.

See also
aegis::create_text_channel_t
Parameters
objStruct of the contents of the request
Returns
aegis::future<gateway::objects::channel>
aegis::future< gateway::objects::channel > aegis::guild::create_voice_channel ( const std::string &  name,
int32_t  bitrate = 0,
int32_t  user_limit = 0,
int64_t  parent_id = 0,
const std::vector< gateway::objects::permission_overwrite > &  permission_overwrites = {} 
)

Create a voice channel.

Parameters
nameString of the name for the channel
bitrateThe bitrate count of the channel
user_limitThe max amount of members that may join the channel
parent_idThe channel or category to place this channel below
nsfwWhether the channel will be labeled as not safe for work
permission_overwritesArray of permission overwrites to apply to the channel
Returns
aegis::future<gateway::objects::channel>
aegis::future<gateway::objects::channel> aegis::guild::create_voice_channel ( create_voice_channel_t  obj)

Create a voice channel.

See also
aegis::create_voice_channel_t
Parameters
objStruct of the contents of the request
Returns
aegis::future<gateway::objects::channel>
aegis::future< rest::rest_reply > aegis::guild::delete_guild ( )

Delete a guild.

Returns
aegis::future<rest::rest_reply>
aegis::future< rest::rest_reply > aegis::guild::delete_guild_integration ( )

Delete a guild integration.

Returns
aegis::future<rest::rest_reply>
Todo:
Incomplete. Signature may change
aegis::future< rest::rest_reply > aegis::guild::delete_guild_role ( snowflake  role_id)

Delete a guild role.

Parameters
role_idThe snowflake of the role to delete
Returns
aegis::future<rest::rest_reply>
channel * aegis::guild::find_channel ( snowflake  channel_id) const
noexcept

Obtain a pointer to a channel by snowflake.

Parameters
channel_idSnowflake of channel to search for
Returns
Pointer to channel or nullptr
channel * aegis::guild::find_channel ( std::string  channel_name) const
noexcept

Obtain a pointer to a channel by name.

Parameters
channel_nameString of channel to search for
Returns
Pointer to channel or nullptr
user * aegis::guild::find_member ( snowflake  member_id) const
noexcept

Obtain a pointer to a member by snowflake.

Parameters
member_idSnowflake of member to search for
Returns
Pointer to member or nullptr
lib::optional< gateway::objects::role > aegis::guild::find_role ( snowflake  role_id) const
noexcept

Obtain a role by snowflake.

Parameters
role_nameString of role to search for
Returns
Pointer to gateway::objects::role or nullptr
lib::optional< gateway::objects::role > aegis::guild::find_role ( std::string  role_name) const
noexcept

Obtain a role by name.

Parameters
role_nameString of role to search for
Returns
Pointer to gateway::objects::role or nullptr
core & aegis::guild::get_bot ( ) const
noexcept

Gets the Bot object.

See also
aegis
Exceptions
aegis::exceptionThrown on failure.
Returns
Aegis main object
channel * aegis::guild::get_channel ( snowflake  id) const
noexcept

Get channel internally.

Parameters
idSnowflake of channel
Returns
Pointer to channel object created
std::unordered_map<snowflake, channel*> aegis::guild::get_channels ( ) const
noexcept

Obtain map of channels.

Returns
unordered_map<snowflake, channel*> COPY of channels
const std::unordered_map<snowflake, channel*>& aegis::guild::get_channels_nocopy ( ) const
noexcept

Obtain map of channels - caller must lock guild._m to ensure no race conditions.

Returns
unordered_map<snowflake, channel*> of channels
aegis::future< gateway::objects::guild > aegis::guild::get_guild ( )

Get guild information.

Returns
aegis::future<gateway::objects::guild>
Todo:
Incomplete. Signature may change. Location may change.
aegis::future< rest::rest_reply > aegis::guild::get_guild_embed ( )

Get the guild embed settings.

Returns
aegis::future<rest::rest_reply>
Todo:
Incomplete. Signature may change
aegis::future< rest::rest_reply > aegis::guild::get_guild_integrations ( )

Get guild integrations.

Returns
aegis::future<rest::rest_reply>
Todo:
Incomplete. Signature may change
aegis::future< rest::rest_reply > aegis::guild::get_guild_invites ( )

Get active guild invites.

Returns
aegis::future<rest::rest_reply>
Todo:
Incomplete. Signature may change
aegis::future< rest::rest_reply > aegis::guild::get_guild_prune_count ( int16_t  days)

Get a count of members that would be pruned.

Parameters
daysThe days of inactivity to prune the member
Returns
aegis::future<rest::rest_reply>
Todo:
Incomplete. Signature may change
std::string aegis::guild::get_icon ( ) const
noexcept

Get icon of guild.

Returns
String of guild icon
snowflake aegis::guild::get_id ( ) const
noexcept

Get the snowflake of this guild.

Returns
A snowflake of this guild
int32_t aegis::guild::get_member_count ( ) const
noexcept

Get count of members in guild (potentially inaccurate)

Returns
Count of members in guild
std::unordered_map<snowflake, user*> aegis::guild::get_members ( ) const
noexcept

Obtain map of members.

Returns
unordered_map<snowflake, user*> COPY of members
const std::unordered_map<snowflake, user*>& aegis::guild::get_members_nocopy ( ) const
noexcept

Obtain map of members - caller must lock guild._m to ensure no race conditions.

Returns
unordered_map<snowflake, user*> of members
std::string aegis::guild::get_name ( ) const
noexcept

Get name of guild.

Returns
String of guild name
const snowflake aegis::guild::get_owner ( ) const
noexcept

Get owner of guild.

Returns
Snowflake of owner
permission aegis::guild::get_permissions ( snowflake  member_id,
snowflake  channel_id 
) const

Get guild permissions for member in channel.

Parameters
member_idSnowflake of member
channel_idSnowflake of channel
Returns
Permission object of channel
permission aegis::guild::get_permissions ( const user _member,
const channel _channel 
) const

Get guild permissions for member in channel.

Parameters
_memberPointer to member object
_channelPointer to channel object
Returns
Permission object of channel
std::string aegis::guild::get_region ( ) const
noexcept

Get region of guild.

Returns
String of region guild is in
const gateway::objects::role aegis::guild::get_role ( const int64_t  r) const

Get role.

Parameters
rSnowflake of role
Returns
Role object
std::unordered_map<snowflake, gateway::objects::role> aegis::guild::get_roles ( ) const
noexcept

Obtain map of roles.

Returns
unordered_map<snowflake, gateway::objects::role> COPY of roles
const std::unordered_map<snowflake, gateway::objects::role>& aegis::guild::get_roles_nocopy ( ) const
noexcept

Obtain map of roles - caller must lock guild._m to ensure no race conditions.

Returns
unordered_map<snowflake, gateway::objects::role> of roles
std::string aegis::guild::get_splash ( ) const
noexcept

Get splash of guild.

Returns
String of guild splash
std::unordered_map<snowflake, gateway::objects::voice_state> aegis::guild::get_voicestates ( ) const
noexcept

Obtain map of voice states.

Returns
std::unordered_map<snowflake, gateway::objects::voice_state> COPY of voice_states
aegis::future< rest::rest_reply > aegis::guild::leave ( )

Leave the guild this object is associated with.

Returns
aegis::future<rest::rest_reply>
bool aegis::guild::member_has_role ( snowflake  member_id,
snowflake  role_id 
) const
noexcept

Check if member has role.

Parameters
member_idSnowflake of member
role_idSnowflake of role
Returns
true if member has role
aegis::future< rest::rest_reply > aegis::guild::modify_channel_positions ( )

Modify positions of channels.

Returns
aegis::future<rest::rest_reply>
Todo:
Incomplete. Signature may change
aegis::future< gateway::objects::guild > aegis::guild::modify_guild ( lib::optional< std::string >  name = {},
lib::optional< std::string >  voice_region = {},
lib::optional< int >  verification_level = {},
lib::optional< int >  default_message_notifications = {},
lib::optional< int >  explicit_content_filter = {},
lib::optional< snowflake afk_channel_id = {},
lib::optional< int >  afk_timeout = {},
lib::optional< std::string >  icon = {},
lib::optional< snowflake owner_id = {},
lib::optional< std::string >  splash = {} 
)

Modify guild information.

Parameters
nameSet name of guild
voice_regionSet region for voice
verification_levelSet verification level from unrestricted level to verified phone level (NONE=0, LOW(verified email)=1, MEDIUM(registered >5m)=2, HIGH(member of server >10m)=3 VERY_HIGH(verified phone)=4
default_message_notificationsSet default notification level for new members
explicit_content_filterSet filter level for new content (DISABLED=0, MEMBERS_WITHOUT_ROLES=1, ALL_MEMBERS=2)
afk_channel_idSet channel for idle voice connections to be moved to
afk_timeoutSet time where voice connections are considered to be idle
iconSet icon
Todo:
Parameters
owner_idTransfer owner to someone else
splash
Returns
aegis::future<gateway::objects::guild>
aegis::future<gateway::objects::guild> aegis::guild::modify_guild ( modify_guild_t  obj)

Modify guild information.

See also
aegis::modify_guild_t
Parameters
objStruct of the contents of the request
Returns
aegis::future<gateway::objects::guild>
aegis::future< rest::rest_reply > aegis::guild::modify_guild_embed ( )

Modify the guild embed settings.

Returns
aegis::future<rest::rest_reply>
Todo:
Incomplete. Signature may change
aegis::future< rest::rest_reply > aegis::guild::modify_guild_integration ( )

Modify a guild integration.

Returns
aegis::future<rest::rest_reply>
Todo:
Incomplete. Signature may change
aegis::future< gateway::objects::member > aegis::guild::modify_guild_member ( snowflake  user_id,
lib::optional< std::string >  nick,
lib::optional< bool >  mute,
lib::optional< bool >  deaf,
lib::optional< std::vector< snowflake >>  roles,
lib::optional< snowflake channel_id 
)

Modify a member All fields are optional

Parameters
user_idThe snowflake of the user to edit
nickString of nickname to change to
muteWhether or not to voice mute the member
deafWhether or not to voice deafen the member
rolesArray of roles to apply to the member
channel_idSnowflake of the channel to move user to
Returns
aegis::future<gateway::objects::member>
aegis::future<gateway::objects::member> aegis::guild::modify_guild_member ( modify_guild_member_t  obj)

Modify a member All fields are optional

See also
aegis::modify_guild_member_t
Parameters
objStruct of the contents of the request
Returns
aegis::future<gateway::objects::member>
aegis::future< gateway::objects::role > aegis::guild::modify_guild_role ( snowflake  role_id,
const std::string &  name,
permission  _perms,
int32_t  color,
bool  hoist,
bool  mentionable 
)

Modify a guild role.

See also
aegis::permission
Parameters
idThe snowflake of the role to modify
nameThe name to set the role to
_permsThe permissions to set
color32bit integer of the color
hoistWhether the role should be separated from other roles
mentionableWhether the role can be specifically mentioned
Returns
aegis::future<gateway::objects::role>
aegis::future<gateway::objects::role> aegis::guild::modify_guild_role ( modify_guild_role_t  obj)

Modify a guild role.

See also
aegis::permission
aegis::modify_guild_role_t
Parameters
objStruct of the contents of the request
Returns
aegis::future<gateway::objects::role>
aegis::future< rest::rest_reply > aegis::guild::modify_guild_role_positions ( snowflake  role_id,
int16_t  position 
)

Modify the guild role positions.

Parameters
role_idSnowflake of role to change position
positionIndex of position to change role to
Returns
aegis::future<rest::rest_reply>
aegis::future< rest::rest_reply > aegis::guild::modify_my_nick ( const std::string &  newname)

Modify own nickname.

Parameters
newnameString of the new nickname to apply
Returns
aegis::future<rest::rest_reply>
permission aegis::guild::perms ( )

Get bot's current permissions for this guild.

Returns
Bitmask of current permissions for this guild contained within permission object
aegis::future< rest::rest_reply > aegis::guild::remove_guild_ban ( snowflake  user_id)

Remove a guild ban.

Parameters
user_idThe snowflake of the member to unban
Returns
aegis::future<rest::rest_reply>
aegis::future< rest::rest_reply > aegis::guild::remove_guild_member ( snowflake  user_id)

Remove guild member (kick)

Parameters
user_idThe snowflake of the member to kick
Returns
aegis::future<rest::rest_reply>
aegis::future< rest::rest_reply > aegis::guild::remove_guild_member_role ( snowflake  user_id,
snowflake  role_id 
)

Remove a role from guild member.

Parameters
user_idThe snowflake of the user to remove role
role_idThe snowflake of the role to remove from member
Returns
aegis::future<rest::rest_reply>
user * aegis::guild::self ( ) const

Get pointer to own member object.

Returns
Pointer to own member object
aegis::future< rest::rest_reply > aegis::guild::sync_guild_integration ( )

Get the guild integrations.

Returns
aegis::future<rest::rest_reply>
Todo:
Incomplete. Signature may change

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