droplet
1.3.0
A multipurpose Discord bot with the hacker in mind
Toggle main menu visibility
Loading...
Searching...
No Matches
SetPortalCommand.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 <
IGlobalSlashCommand.hpp
>
11
#include <
IMessageCommand.hpp
>
12
#include <string_view>
13
14
struct
AppContext
;
15
class
DatabaseExecutor
;
16
class
PortalIndex
;
17
class
BlacklistIndex
;
18
19
class
SetPortalCommand
:
public
IGlobalSlashCommand
,
public
IMessageCommand
{
20
public
:
21
static
constexpr
std::string_view
k_name
{
"set_portal"
};
22
static
constexpr
std::string_view
k_description
{
"Set a channel as a portal for foreign messages (Admin only!)"
};
23
24
explicit
SetPortalCommand
(
AppContext
& ctx);
25
26
void
on_slashcommand
(
const
dpp::slashcommand_t& event)
override
;
27
void
on_message_create
(
const
dpp::message_create_t& event)
override
;
28
29
private
:
30
dpp::cluster& discord_;
31
DatabaseExecutor
& db_;
32
PortalIndex
& portal_index_;
33
BlacklistIndex
& blacklist_index_;
34
};
IGlobalSlashCommand.hpp
IMessageCommand.hpp
BlacklistIndex
Definition
PortalIndex.hpp:23
DatabaseExecutor
Definition
DatabaseExecutor.hpp:14
IGlobalSlashCommand
Definition
IGlobalSlashCommand.hpp:6
IMessageCommand
Definition
IMessageCommand.hpp:6
PortalIndex
Definition
PortalIndex.hpp:11
SetPortalCommand::SetPortalCommand
SetPortalCommand(AppContext &ctx)
Definition
SetPortalCommand.cpp:161
SetPortalCommand::k_description
static constexpr std::string_view k_description
Definition
SetPortalCommand.hpp:22
SetPortalCommand::on_slashcommand
void on_slashcommand(const dpp::slashcommand_t &event) override
Definition
SetPortalCommand.cpp:171
SetPortalCommand::k_name
static constexpr std::string_view k_name
Definition
SetPortalCommand.hpp:21
SetPortalCommand::on_message_create
void on_message_create(const dpp::message_create_t &event) override
Definition
SetPortalCommand.cpp:206
AppContext
Definition
AppContext.hpp:12
src
bot_library
commands
portal
SetPortalCommand.hpp
Generated by
1.18.0