Added new commands to the ready.cpp

This commit is contained in:
Mathias Wagner 2023-11-04 23:59:26 +01:00
parent 29412b0148
commit 961ae9a725
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

View File

@ -26,9 +26,25 @@ void ready::execute(dpp::cluster &bot, const dpp::ready_t &event) {
if (dpp::run_once<struct register_bot_commands>()) {
bot.global_command_create(dpp::slashcommand("rules", "Shows you the rules of the global chat", bot.me.id));
bot.global_command_create(dpp::slashcommand("add", "Transforms the channel into a global channel", bot.me.id));
bot.global_command_create(dpp::slashcommand("remove", "Removes the channel from the global chat", bot.me.id).add_option(
dpp::command_option(dpp::co_channel, "channel", "The channel to remove", false)));
bot.global_command_create(
dpp::slashcommand("remove", "Removes the channel from the global chat", bot.me.id).add_option(
dpp::command_option(dpp::co_channel, "channel", "The channel to remove", false)));
bot.global_command_create(dpp::slashcommand("clear", "Removes all global channels", bot.me.id));
bot.global_command_create(dpp::slashcommand("coins", "Gets the current amount of StarCoins", bot.me.id));
dpp::command_option topic = dpp::command_option(dpp::co_string, "topic", "The topic of the global channel",true)
.add_choice(dpp::command_option_choice("General", "1"))
.add_choice(dpp::command_option_choice("Gaming", "2"))
.add_choice(dpp::command_option_choice("Programming", "3"))
.add_choice(dpp::command_option_choice("Politics", "4"));
dpp::command_option language = dpp::command_option(dpp::co_string, "language", "The language of the global channel",true)
.add_choice(dpp::command_option_choice("English", "en"))
.add_choice(dpp::command_option_choice("German", "de"));
bot.global_command_create(dpp::slashcommand("channel", "Test", bot.me.id)
.add_option(dpp::command_option(dpp::co_sub_command, "topic","Changes the topic of the global channel").add_option(topic))
.add_option(dpp::command_option(dpp::co_sub_command, "language","Changes the language of the global channel").add_option(language)));
bot.global_command_create(dpp::slashcommand().set_name("Report User").set_type(dpp::ctxm_message));
}