Skip to content

Commit e52ed92

Browse files
authored
docs: made the setting_status page use the latest ready_t feature (#1039)
1 parent 4eabe3b commit e52ed92

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docpages/example_code/setting_status2.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ int main() {
1010
/* We put our status updating inside "run_once" so that multiple shards don't try do this as "set_presence" updates all the shards. */
1111
if (dpp::run_once<struct register_bot_commands>()) {
1212
/* We update the presence now as the timer will do the first execution after the x amount of seconds we specify */
13-
bot.set_presence(dpp::presence(dpp::presence_status::ps_online, dpp::activity_type::at_game, "with " + std::to_string(dpp::get_guild_cache()->count()) + " guilds!"));
13+
bot.set_presence(dpp::presence(dpp::presence_status::ps_online, dpp::activity_type::at_game, "with " + std::to_string(event.guild_count) + " guilds!"));
1414

1515
/* Create a timer that runs every 120 seconds, that sets the status */
1616
bot.start_timer([&bot](const dpp::timer& timer) {

docpages/example_programs/misc/setting_status.md

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ If all went well, your bot should now be online and say this on members list!
1212

1313
\image html botonlinestatus.png
1414

15+
If you want to make your bot show as Do Not Disturb, then you could change dpp::ps_online to dpp::ps_dnd.
16+
You can also play around with dpp::at_game, changing it to something like dpp::at_custom or dpp::at_listening!
17+
1518
Now, let's cover setting the bot status to say `Playing with x guilds!` every two minutes.
1619

1720
\include{cpp} setting_status2.cpp

0 commit comments

Comments
 (0)