Skip to content

Commit

Permalink
Actually fixed the indentation (for real this time)
Browse files Browse the repository at this point in the history
  • Loading branch information
Henonicks committed Dec 3, 2023
1 parent f0b37fc commit 17e0d2b
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions docpages/example_code/using_emoji1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@
#include <dpp/unicode_emoji.h>

int main() {
dpp::cluster bot("Epic Token");
dpp::cluster bot("Epic Token");

bot.on_log(dpp::utility::cout_logger());
bot.on_log(dpp::utility::cout_logger());

/* We'll be using two emojis: shocked guy and animated mad face. */
dpp::emoji shocked("vahuyi", 1179366531856093214);
/* We'll be using two emojis: shocked guy and animated mad face. */
dpp::emoji shocked("vahuyi", 1179366531856093214);
dpp::emoji mad("mad", 1117795317052616704, dpp::e_animated); /* We need this third argument, which is an emoji flag. */

bot.on_slashcommand([shocked, mad](const dpp::slashcommand_t& event) {
if (event.command.get_command_name() == "send-emojis") {
bot.on_slashcommand([shocked, mad](const dpp::slashcommand_t& event) {
if (event.command.get_command_name() == "send-emojis") {

/* Here we send our very informative message: three epic emojis. */
event.reply(dpp::unicode_emoji::nerd + shocked.get_mention() + mad.get_mention());
}
});
/* Here we send our very informative message: three epic emojis. */
event.reply(dpp::unicode_emoji::nerd + shocked.get_mention() + mad.get_mention());
}
});

bot.on_ready([&bot](const dpp::ready_t& event) {
if (dpp::run_once<struct register_bot_commands>()) {
dpp::slashcommand send("send-emojis", "Send the emojis", bot.me.id);
bot.global_bulk_command_create({ send });
}
});
bot.on_ready([&bot](const dpp::ready_t& event) {
if (dpp::run_once<struct register_bot_commands>()) {
dpp::slashcommand send("send-emojis", "Send the emojis", bot.me.id);
bot.global_bulk_command_create({ send });
}
});

/* Start the bot! */
bot.start(dpp::st_wait);
return 0;
/* Start the bot! */
bot.start(dpp::st_wait);
return 0;
}

0 comments on commit 17e0d2b

Please sign in to comment.