The world's most clever kitty cat
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update status and mark saved on forget

Ben C d55c36b3 a6e9503a

+6 -2
+6 -2
src/cmd/forget.rs
··· 1 - use std::sync::Arc; 1 + use std::sync::{Arc, atomic::Ordering}; 2 2 3 3 use twilight_interactions::command::{CommandModel, CreateCommand}; 4 4 use twilight_model::application::interaction::{Interaction, application_command::CommandData}; 5 5 6 - use crate::{BotContext, cmd::DEFER_INTER_RESP_EPHEMERAL, prelude::*, require_owner}; 6 + use crate::{ 7 + BotContext, cmd::DEFER_INTER_RESP_EPHEMERAL, prelude::*, require_owner, status::update_status, 8 + }; 7 9 8 10 #[derive(CommandModel, CreateCommand)] 9 11 #[command( ··· 32 34 { 33 35 let mut brain = ctx.brain_handle.write().await; 34 36 brain.forget(token.as_str()); 37 + ctx.pending_save.store(true, Ordering::Relaxed); 38 + update_status(&brain, &ctx.shard_sender).context("Failed to update status")?; 35 39 } 36 40 37 41 client