droplet
1.3.0
A multipurpose Discord bot with the hacker in mind
Toggle main menu visibility
Loading...
Searching...
No Matches
HelpCommand.hpp
Go to the documentation of this file.
1
/*
2
* (c) Copyright erarnitox.de - All rights reserved
3
* Author: Erarnitox <david@erarnitox.de>
4
*
5
* License: MIT License
6
*/
7
8
#pragma once
9
10
#include <
CommandTypes.hpp
>
11
#include <
IGlobalSlashCommand.hpp
>
12
#include <string_view>
13
14
struct
AppContext
;
15
16
class
HelpCommand
:
public
IGlobalSlashCommand
{
17
public
:
18
static
constexpr
std::string_view
k_name
{
"help"
};
19
static
constexpr
std::string_view
k_description
{
"List all available commands"
};
20
21
explicit
HelpCommand
(
AppContext
& ctx);
22
23
void
on_slashcommand
(
const
dpp::slashcommand_t& event)
override
;
24
25
private
:
26
slash_commands_t
& slash_commands_;
27
};
CommandTypes.hpp
slash_commands_t
std::map< std::string, std::shared_ptr< IGlobalSlashCommand > > slash_commands_t
Definition
CommandTypes.hpp:15
IGlobalSlashCommand.hpp
HelpCommand::HelpCommand
HelpCommand(AppContext &ctx)
Definition
HelpCommand.cpp:23
HelpCommand::on_slashcommand
void on_slashcommand(const dpp::slashcommand_t &event) override
Definition
HelpCommand.cpp:31
HelpCommand::k_name
static constexpr std::string_view k_name
Definition
HelpCommand.hpp:18
HelpCommand::k_description
static constexpr std::string_view k_description
Definition
HelpCommand.hpp:19
IGlobalSlashCommand
Definition
IGlobalSlashCommand.hpp:6
AppContext
Definition
AppContext.hpp:12
src
bot_library
commands
help
HelpCommand.hpp
Generated by
1.18.0