mirror of
https://github.com/HappyTanuki/BumbleCee.git
synced 2025-12-18 21:23:29 +00:00
스킵 구현
This commit is contained in:
29
DPP-master/docpages/example_code/using_emojis1.cpp
Normal file
29
DPP-master/docpages/example_code/using_emojis1.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#include <dpp/dpp.h>
|
||||
#include <dpp/unicode_emoji.h>
|
||||
|
||||
int main() {
|
||||
dpp::cluster bot("Epic Token");
|
||||
|
||||
bot.on_log(dpp::utility::cout_logger());
|
||||
|
||||
/* 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") {
|
||||
/* 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>()) {
|
||||
bot.global_command_create(dpp::slashcommand("send-emojis", "Send the emojis", bot.me.id));
|
||||
}
|
||||
});
|
||||
|
||||
/* Start the bot! */
|
||||
bot.start(dpp::st_wait);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user