Skip to content

Commit

Permalink
Put slashcommand constructor into creation, rephrased select menus part
Browse files Browse the repository at this point in the history
  • Loading branch information
Henonicks committed Dec 4, 2023
1 parent dc13536 commit 41b1cf9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions docpages/example_code/using_emojis1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ int main() {

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_command_create(send);
bot.global_command_create(dpp::slashcommand("send-emojis", "Send the emojis", bot.me.id));
}
});

Expand Down
3 changes: 1 addition & 2 deletions docpages/example_code/using_emojis3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ int main() {

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

Expand Down
2 changes: 1 addition & 1 deletion docpages/example_programs/misc/using-emojis.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Yay, our bot has emotions now!

\image html using_emojis2.png

Finally, select menus. They're lists that let you select an option with an emoji each and are an optional part of a message. These guys are covered \ref components3 "here". They require emoji components (name, ID, animated state) to come separately. Also, if the emoji you're using isn't animated, you don't have to specify that. If your emoji is unicode, the ID is optional, too, since both are defaulted to none (0/false).
Finally, select menus. These guys are covered \ref components3 "here". They require emoji components (name, ID, animated state) to come separately. If the emoji you're using isn't animated, you don't have to specify that. If your emoji is unicode, it doesn't even have an ID, so you only put the character, since both animated state and ID are defaulted to none (false/0).

\include{cpp} using_emojis3.cpp

Expand Down

0 comments on commit 41b1cf9

Please sign in to comment.