droplet 1.1.0
A multipurpose Discord bot with the hacker in mind
Loading...
Searching...
No Matches
Core Class Reference

#include <Core.hpp>

Collaboration diagram for Core:

Static Public Member Functions

static auto is_admin (const dpp::guild_member &member) noexcept -> bool
 checks if a guild member is admin of that guild
 
static auto is_dropsoft_admin (const dpp::guild_member &member) noexcept -> bool
 checks if a guild member is admin of dropsoft
 
static auto get_role_id (const std::string &mention) noexcept -> std::string
 gets the id of a mentioned role
 
static auto get_channel_id (const std::string &mention) noexcept -> std::string
 get the id of a channel from a mention
 
static void timed_reply (dpp::cluster &bot, const dpp::slashcommand_t event, const std::string &message, size_t time_mills) noexcept
 replies to an event and displays the reply for a limited time
 
static void timed_reply (dpp::cluster &bot, const dpp::form_submit_t event, const std::string &message, size_t time_mills) noexcept
 replies to an event and displays the reply for a limited time
 
static void timed_reply_private (dpp::cluster &bot, const dpp::slashcommand_t event, const std::string &message, size_t time_mills) noexcept
 replies to an event and displays the reply for a limited time and only to the sender of the event
 
static void timed_reply_private (dpp::cluster &bot, const dpp::form_submit_t event, const std::string &message, size_t time_mills) noexcept
 replies to an event and displays the reply for a limited time and only to the sender of the event
 
static auto get_parameter (dpp::cluster &bot, const dpp::slashcommand_t event, const std::string &name, bool required=true) noexcept -> std::string
 get the parameter from a slash command
 
static auto simple_hash (const std::string &string) -> std::string
 

Member Function Documentation

◆ get_channel_id()

auto Core::get_channel_id ( const std::string & mention) -> std::string
staticnoexcept

get the id of a channel from a mention

Parameters
mentionthe mention string of a channel
Returns
the channel id as a std::string

◆ get_parameter()

auto Core::get_parameter ( dpp::cluster & bot,
const dpp::slashcommand_t event,
const std::string & name,
bool required = true ) -> std::string
staticnoexcept

get the parameter from a slash command

Parameters
botthe cluster that can be thought of the current bot instance
eventthe slash command event
namethe name of the parameter
Returns
the parameter with the given name as a std::string

◆ get_role_id()

auto Core::get_role_id ( const std::string & mention) -> std::string
staticnoexcept

gets the id of a mentioned role

Parameters
mentionthe mention string of a role
Returns
returns the role id as a std::string

◆ is_admin()

auto Core::is_admin ( const dpp::guild_member & member) -> bool
staticnoexcept

checks if a guild member is admin of that guild

Parameters
memberthe guild member
Returns
whether the member has admin right on guild or not

◆ is_dropsoft_admin()

auto Core::is_dropsoft_admin ( const dpp::guild_member & member) -> bool
staticnoexcept

checks if a guild member is admin of dropsoft

Parameters
memberthe guild member
Returns
whether the member has admin right on dropsoft

◆ simple_hash()

auto Core::simple_hash ( const std::string & string) -> std::string
static

◆ timed_reply() [1/2]

void Core::timed_reply ( dpp::cluster & bot,
const dpp::form_submit_t event,
const std::string & message,
size_t time_mills )
staticnoexcept

replies to an event and displays the reply for a limited time

Parameters
botthe cluster that can be thought of the current bot instance
eventthe event to be replied to
messagethe text to be put into the reply message
time_millsthe time to display the reply in milliseconds
Returns
doesn't return

◆ timed_reply() [2/2]

void Core::timed_reply ( dpp::cluster & bot,
const dpp::slashcommand_t event,
const std::string & message,
size_t time_mills )
staticnoexcept

replies to an event and displays the reply for a limited time

Parameters
botthe cluster that can be thought of the current bot instance
eventthe event to be replied to
messagethe text to be put into the reply message
time_millsthe time to display the reply in milliseconds
Returns
doesn't return

◆ timed_reply_private() [1/2]

void Core::timed_reply_private ( dpp::cluster & bot,
const dpp::form_submit_t event,
const std::string & message,
size_t time_mills )
staticnoexcept

replies to an event and displays the reply for a limited time and only to the sender of the event

Parameters
botthe cluster that can be thought of the current bot instance
eventthe event to be replied to
messagethe text to be put into the reply message
time_millsthe time to display the reply in milliseconds
Returns
doesn't return

◆ timed_reply_private() [2/2]

void Core::timed_reply_private ( dpp::cluster & bot,
const dpp::slashcommand_t event,
const std::string & message,
size_t time_mills )
staticnoexcept

replies to an event and displays the reply for a limited time and only to the sender of the event

Parameters
botthe cluster that can be thought of the current bot instance
eventthe event to be replied to
messagethe text to be put into the reply message
time_millsthe time to display the reply in milliseconds
Returns
doesn't return

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