droplet 1.3.0
A multipurpose Discord bot with the hacker in mind
Loading...
Searching...
No Matches
WarnCommand.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 <role.h>
11
13#include <string_view>
14
15struct AppContext;
16
18 public:
19 static constexpr std::string_view k_name{"warn"};
20 static constexpr std::string_view k_description{"Warn a user. Bans the user if already warned"};
21
22 explicit WarnCommand(AppContext& ctx);
23
24 void on_slashcommand(const dpp::slashcommand_t& event) override;
25
26 private:
27 void warn_user(const dpp::slashcommand_t& event,
28 dpp::snowflake guild_id,
29 dpp::snowflake user_id,
30 const dpp::role& warned_role);
31 dpp::cluster& discord_;
32};
Definition IGlobalSlashCommand.hpp:6
WarnCommand(AppContext &ctx)
Definition WarnCommand.cpp:23
static constexpr std::string_view k_description
Definition WarnCommand.hpp:20
static constexpr std::string_view k_name
Definition WarnCommand.hpp:19
void on_slashcommand(const dpp::slashcommand_t &event) override
Definition WarnCommand.cpp:61
Definition AppContext.hpp:12