Don't set activity in ready event
This commit is contained in:
parent
218be2f0b1
commit
b5dbfe336d
@ -13,9 +13,6 @@ pub async fn listener(
|
|||||||
data: &Data,
|
data: &Data,
|
||||||
) -> Result<(), Error> {
|
) -> Result<(), Error> {
|
||||||
match event {
|
match event {
|
||||||
FullEvent::Ready { .. } => {
|
|
||||||
ctx.set_activity(Some(ActivityData::watching("for /remind")));
|
|
||||||
}
|
|
||||||
FullEvent::ChannelDelete { channel, .. } => {
|
FullEvent::ChannelDelete { channel, .. } => {
|
||||||
sqlx::query!("DELETE FROM channels WHERE channel = ?", channel.id.get())
|
sqlx::query!("DELETE FROM channels WHERE channel = ?", channel.id.get())
|
||||||
.execute(&data.database)
|
.execute(&data.database)
|
||||||
|
@ -39,6 +39,7 @@ use poise::serenity_prelude::{
|
|||||||
},
|
},
|
||||||
ClientBuilder,
|
ClientBuilder,
|
||||||
};
|
};
|
||||||
|
use serenity::all::ActivityData;
|
||||||
use sqlx::{MySql, Pool};
|
use sqlx::{MySql, Pool};
|
||||||
use tokio::sync::{broadcast, broadcast::Sender, RwLock};
|
use tokio::sync::{broadcast, broadcast::Sender, RwLock};
|
||||||
|
|
||||||
@ -283,8 +284,10 @@ async fn _main(tx: Sender<()>) -> Result<(), Box<dyn StdError + Send + Sync>> {
|
|||||||
.options(options)
|
.options(options)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
let mut client =
|
let mut client = ClientBuilder::new(&discord_token, GatewayIntents::GUILDS)
|
||||||
ClientBuilder::new(&discord_token, GatewayIntents::GUILDS).framework(framework).await?;
|
.framework(framework)
|
||||||
|
.activity(ActivityData::watching("for /remind"))
|
||||||
|
.await?;
|
||||||
|
|
||||||
client.start_autosharded().await?;
|
client.start_autosharded().await?;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user