make code more efficient and added storage setting

This commit is contained in:
Syping 2024-02-03 07:16:12 +01:00
parent 3800da9b00
commit 25d83b243d
10 changed files with 264 additions and 186 deletions

33
src/slashcommands.h Normal file
View file

@ -0,0 +1,33 @@
/*****************************************************************************
* dtranslatebot Discord Translate Bot
* Copyright (C) 2024 Syping
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* This software is provided as-is, no warranties are given to you, we are not
* responsible for anything with use of the software, you are self responsible.
*****************************************************************************/
#ifndef SLASHCOMMANDS_H
#define SLASHCOMMANDS_H
#include <dpp/cluster.h>
#include "settings.h"
namespace bot {
class slashcommands {
public:
static void process_translate_command(dpp::cluster *bot, bot::settings::settings *settings, const dpp::slashcommand_t &event);
static void register_commands(dpp::cluster *bot, bot::settings::settings *settings);
};
}
#endif // SLASHCOMMANDS_H