AquinBot 1.0.2
Official AquinBot made by Team Aquin | Finaly a simple Open Source Discord bot made in C++ by Aquin
 
Loading...
Searching...
No Matches
Bot.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "Bot.hpp"
4
5#include <dpp/dpp.h>
6
7namespace bot
8{
12 typedef struct BotSettings
13 {
14 std::string name;
15 std::string token;
17
21 class Bot
22 {
23 private:
24 static std::string ID;
25
27
28 public:
29 static dpp::cluster *app;
30
31 static bool botIsOn;
32
38 Bot(const std::string ID, const BotSettings &settings);
39
43 ~Bot();
44
50
54 void start() const;
55
59 void shutdown();
60
65 std::string getID();
66
71 std::string getToken();
72
77 int destroy(const int code);
78 };
79}
80
static std::string ID
Definition Bot.hpp:24
std::string getToken()
Get the bot token.
Definition Bot.cpp:53
Bot(const std::string ID, const BotSettings &settings)
Constructor to create the bot.
Definition Bot.cpp:17
std::string getID()
Get the current bot id.
Definition Bot.cpp:50
static dpp::cluster * app
Definition Bot.hpp:29
BotSettings getSettings()
Get the current bot token.
Definition Bot.cpp:47
~Bot()
Call Bot::destroy(0)
Definition Bot.cpp:27
int destroy(const int code)
Destroy the bot and end it with exit code 0
Definition Bot.cpp:56
void start() const
Start the bot.
Definition Bot.cpp:40
static BotSettings settings
Definition Bot.hpp:26
void shutdown()
Shutdown the bot.
Definition Bot.cpp:30
static bool botIsOn
Definition Bot.hpp:31
Definition cli.cpp:17
struct bot::BotSettings BotSettings
Create the bot settings:
Create the bot settings:
Definition Bot.hpp:13
std::string name
Definition Bot.hpp:14
std::string token
Definition Bot.hpp:15