#include <Guild.h>
|
std::string | get_token () const |
|
json | api_call (const std::string &url, const std::string &method="GET", const json &data=json(), const std::string &content_type="", const bool cache=true) |
| helper function to communicate with the http api
|
|
◆ Guild() [1/3]
DiscordCPP::Guild::Guild |
( |
Discord * | client, |
|
|
const json & | data, |
|
|
const std::string & | token ) |
◆ Guild() [2/3]
DiscordCPP::Guild::Guild |
( |
Discord * | client, |
|
|
const std::string & | id, |
|
|
const std::string & | token ) |
◆ Guild() [3/3]
DiscordCPP::Guild::Guild |
( |
| ) |
|
|
default |
◆ ban()
void DiscordCPP::Guild::ban |
( |
const User & | user, |
|
|
const std::string & | reason, |
|
|
const int | delete_message_days = 0 ) |
bans the given User from this Guild
- Parameters
-
[in] | user | User to ban |
[in] | reason | reason, why the User should be banned |
[in] | delete_message_days | (optional) number of days to delete messages from user (0-7) |
- Exceptions
-
◆ delete_guild()
void DiscordCPP::Guild::delete_guild |
( |
| ) |
|
delete this guild
- Exceptions
-
◆ get_afk_channel()
- Returns
- the guild's afk channel(voice)
◆ get_afk_channel_id()
std::optional< std::string > DiscordCPP::Guild::get_afk_channel_id |
( |
| ) |
|
|
inline |
- Returns
- the id of the guild's afk channel(voice)
◆ get_afk_timeout()
int DiscordCPP::Guild::get_afk_timeout |
( |
| ) |
|
|
inline |
- Returns
- afk timeout in seconds
◆ get_application_id()
std::string DiscordCPP::Guild::get_application_id |
( |
| ) |
|
|
inline |
- Returns
- application id of the guild creator if the guild is bot-created
◆ get_channels()
- Returns
- channels of the guild
◆ get_default_message_notifications()
int DiscordCPP::Guild::get_default_message_notifications |
( |
| ) |
|
|
inline |
◆ get_embed_channel()
- Returns
- the embedded channel
◆ get_embed_channel_id()
std::optional< std::string > DiscordCPP::Guild::get_embed_channel_id |
( |
| ) |
|
|
inline |
- Returns
- the id of the embedded channel
◆ get_explicit_content_filter()
int DiscordCPP::Guild::get_explicit_content_filter |
( |
| ) |
|
|
inline |
◆ get_features()
std::vector< std::string > DiscordCPP::Guild::get_features |
( |
| ) |
|
|
inline |
- Returns
- enabled guild features
◆ get_icon()
std::string DiscordCPP::Guild::get_icon |
( |
| ) |
|
|
inline |
- Returns
- the guild's icon hash
◆ get_joined_at()
std::string DiscordCPP::Guild::get_joined_at |
( |
| ) |
|
|
inline |
- Returns
- when the guild was created
◆ get_member_count()
int DiscordCPP::Guild::get_member_count |
( |
| ) |
|
|
inline |
◆ get_members()
std::vector< Member > DiscordCPP::Guild::get_members |
( |
| ) |
|
|
inline |
- Returns
- users in the guild
◆ get_mfa_level()
int DiscordCPP::Guild::get_mfa_level |
( |
| ) |
|
|
inline |
◆ get_name()
std::string DiscordCPP::Guild::get_name |
( |
| ) |
|
|
inline |
◆ get_owner()
- Returns
- the owner of the guild
◆ get_owner_id()
std::optional< std::string > DiscordCPP::Guild::get_owner_id |
( |
| ) |
|
|
inline |
- Returns
- the id of the owner of the guild
◆ get_permissions()
int DiscordCPP::Guild::get_permissions |
( |
| ) |
|
|
inline |
- Returns
- total permissions for the user(doesn't include channel overrides)
◆ get_region()
std::string DiscordCPP::Guild::get_region |
( |
| ) |
|
|
inline |
- Returns
- the guild's voice redion
◆ get_splash()
std::string DiscordCPP::Guild::get_splash |
( |
| ) |
|
|
inline |
- Returns
- the guild's splash hash
◆ get_system_channel()
- Returns
- the channel to which system messages are sent
◆ get_system_channel_id()
std::optional< std::string > DiscordCPP::Guild::get_system_channel_id |
( |
| ) |
|
|
inline |
- Returns
- the id of the channel to which system messages are sent
◆ get_verification_level()
int DiscordCPP::Guild::get_verification_level |
( |
| ) |
|
|
inline |
◆ get_widget_channel()
- Returns
- the channel for the server widget
◆ get_widget_channel_id()
std::optional< std::string > DiscordCPP::Guild::get_widget_channel_id |
( |
| ) |
|
|
inline |
- Returns
- the id of the channel for the server widget
◆ is_embed_enabled()
bool DiscordCPP::Guild::is_embed_enabled |
( |
| ) |
|
|
inline |
- Returns
- true, if the guild is embeddable
◆ is_large()
bool DiscordCPP::Guild::is_large |
( |
| ) |
|
|
inline |
- Returns
- true if it is a large guild
◆ is_unavailable()
bool DiscordCPP::Guild::is_unavailable |
( |
| ) |
|
|
inline |
- Returns
- true if the guild is not available
◆ is_widget_enabled()
bool DiscordCPP::Guild::is_widget_enabled |
( |
| ) |
|
|
inline |
- Returns
- true if the server widget is enabled
◆ kick()
void DiscordCPP::Guild::kick |
( |
const User & | user | ) |
|
kicks the given User from this Guild
- Parameters
-
- Exceptions
-
◆ leave()
void DiscordCPP::Guild::leave |
( |
| ) |
|
leave this guild
- Exceptions
-
◆ operator std::string()
DiscordCPP::Guild::operator std::string |
( |
| ) |
|
|
inlineexplicit |
- Returns
- Guild name as std::string
◆ unban()
void DiscordCPP::Guild::unban |
( |
const User & | user | ) |
|
unbans the given User from this Guild
- Parameters
-
- Exceptions
-
The documentation for this class was generated from the following files: