Checkpoint

This commit is contained in:
2026-02-26 01:55:07 -03:00
parent 70c531ddac
commit d0b5f86740
7 changed files with 59 additions and 43 deletions
+36 -28
View File
@@ -2,7 +2,7 @@ use async_trait::async_trait;
use rand::{Rng, SeedableRng};
use rand_chacha::ChaCha20Rng;
use twilight_model::gateway::{
payload::outgoing::update_presence::UpdatePresencePayload,
payload::outgoing::{UpdatePresence, update_presence::UpdatePresencePayload},
presence::{Activity, ActivityType, Status},
};
@@ -224,38 +224,46 @@ impl Task<State, Extras> for UpdatePresenceTask {
"Cuando se apaga la luz",
"Annie, are you ok?",
"Will you tell us that you're ok?",
"Life's like a road that you travel on",
"Life is a highway, I wanna ride it all night long",
"I wanna drive it all night long (all night long)",
"Tu cuerpo y el mío, llenando el vacío, subiendo y bajando",
"Yo quiero estar contigo, vivir contigo, bailar contigo, tener contigo una noche loca",
"But let me stop you there, oh, before you speak",
"Nah to the ah to the, no, no, no",
"My name is no, my sign is no, my number is no",
"If that boy ain't giving up, lick your lips and swing your hips",
];
let mut rng = ChaCha20Rng::from_os_rng();
let index = rng.random_range(0..presences.len());
rt.gateway_tx
.send(serde_json::to_string(&UpdatePresencePayload::new(
vec![Activity {
application_id: None,
assets: None,
buttons: vec![],
created_at: None,
details: None,
emoji: None,
flags: None,
id: None,
instance: None,
kind: ActivityType::Listening,
name: format!(
"p.help - \"{}\" - {}/{}",
presences[index], rt.shard_number, rt.shard_total
),
party: None,
secrets: None,
state: None,
timestamps: None,
url: None,
}],
false,
None,
Status::Online,
)?)?)?;
rt.gateway_tx.send(UpdatePresence::new(
vec![Activity {
application_id: None,
assets: None,
buttons: vec![],
created_at: None,
details: None,
emoji: None,
flags: None,
id: None,
instance: None,
kind: ActivityType::Listening,
name: format!(
"p.help - \"{}\" - {}/{}",
presences[index], rt.shard_number, rt.shard_total
),
party: None,
secrets: None,
state: None,
timestamps: None,
url: None,
}],
false,
None,
Status::Online,
)?)?;
Ok(())
}