-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathcommands.h
More file actions
84 lines (71 loc) · 2.11 KB
/
Copy pathcommands.h
File metadata and controls
84 lines (71 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#ifndef COMMANDS_H
#define COMMANDS_H
#include <list>
#include <functional>
#include <dpp/dpp.h>
#include <dpp/cluster.h>
#include <dpp/dispatcher.h>
namespace cmd
{
/**
* @brief Replies with a question in the chat to change the topic
* @param bot cluster
* @param event slash command event
*/
void topicCommand(dpp::cluster& bot, const dpp::slashcommand_t& event);
/**
* @brief Replies with a C++ related coding question
* @param bot cluster
* @param event slash command event
*/
void codingCommand(dpp::cluster& bot, const dpp::slashcommand_t& event);
/**
* @brief Closes a forum post
* @param bot cluster
* @param event slash command event
*/
void closeCommand(dpp::cluster& bot, const dpp::slashcommand_t& event);
/**
* @brief Opens a ticket
* @param bot cluster
* @param event slash command event
*/
void ticketCommand(dpp::cluster& bot, const dpp::slashcommand_t& event);
/**
* @brief Instruction: Formatting C++ Code on Discord
* @param bot cluster
* @param event slash command event
*/
void codeCommand(dpp::cluster& bot, const dpp::slashcommand_t& event);
/**
* @brief Replies with a coding project idea
* @param bot cluster
* @param event slash command event
*/
void projectCommand(dpp::cluster& bot, const dpp::slashcommand_t& event);
/**
* @brief Replies with the rules
* @param bot cluster
* @param event slash command event
*/
void ruleCommand(dpp::cluster& bot, const dpp::slashcommand_t& event);
namespace utils
{
/**
* @brief Read next line of file, jump to beginning if no next line
* @param path to the file
* @param index
* @return content of next line
*/
std::string readFileLine(const std::string& path, int& index);
}
}
struct cmdStruct
{
std::string name;
std::string desc;
typedef std::function<void(dpp::cluster&, const dpp::slashcommand_t&)> cmdFunc;
cmdFunc function;
std::list<dpp::command_option> args;
};
#endif // COMMANDS_H