move activity to ready

This commit is contained in:
jude
2022-05-13 12:51:02 +01:00
parent fe85f82a09
commit 7a1a1c637f
3 changed files with 45 additions and 39 deletions

View File

@ -20,7 +20,7 @@ use crate::{
pub async fn listener(ctx: &Context, event: &poise::Event<'_>, data: &Data) -> Result<(), Error> {
match event {
poise::Event::CacheReady { .. } => {
poise::Event::Ready { .. } => {
ctx.set_activity(Activity::watching("for /play")).await;
}
poise::Event::GuildCreate { guild, is_new, .. } => {

View File

@ -124,8 +124,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
.token(discord_token)
.user_data_setup(move |ctx, _bot, framework| {
Box::pin(async move {
ctx.set_activity(Activity::watching("for /play")).await;
register_application_commands(
ctx,
framework,