Skip to content

Commit

Permalink
docs: fixed a ref issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaskowicz1 committed Oct 14, 2023
1 parent db4d039 commit 0258de6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
10 changes: 0 additions & 10 deletions docpages/example_code/components3_rolemenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,6 @@ int main() {
event.reply(msg);
}
});

/* When a user clicks your select menu , the on_select_click event will fire,
* containing the custom_id you defined in your select menu.
*/
bot.on_select_click([&bot](const dpp::select_click_t & event) {
/* Select clicks are still interactions, and must be replied to in some form to
* prevent the "this interaction has failed" message from Discord to the user.
*/
event.reply("You clicked " + event.custom_id + " and chose: " + event.values[0]);
});

bot.on_ready([&bot](const dpp::ready_t& event) {
if (dpp::run_once<struct register_bot_commands>()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This tutorial will cover how to set the default value for a select menu (that isn't a text select menu)!

\note **This only works for the following types of select menus: user, role, mentionable, and channel.** The default type of a select menu (as shown in \page components3 "this page") does not work for this, as that supports a "placeholder".
\note **This only works for the following types of select menus: user, role, mentionable, and channel.** The default type of a select menu (as shown in \ref components3 "this page") does not work for this, as that supports a "placeholder".

\include{cpp} default_select_value.cpp

Expand Down

0 comments on commit 0258de6

Please sign in to comment.