Examples mostly

This commit is contained in:
Dandaedre 2024-11-30 00:43:26 +01:00
parent 7bb6b78352
commit cafc860b6f
1 changed files with 10 additions and 3 deletions

View File

@ -15,7 +15,7 @@
use crate::votes::EventHolder;
use chrono::{DateTime, Local, NaiveDate};
use poise::serenity_prelude::{self, CacheHttp, ChannelId};
use poise::serenity_prelude::{self, CacheHttp, ChannelId, Mention, RoleId};
/// The main scheduler waiting and dispatch loop.
///
@ -42,9 +42,16 @@ async fn fk_around(ev_ctx: &EventHolder) {
Local::now() // &ev_ctx
);
if let Some(discord_ctx) = ev_ctx.discord_ctx.lock().await.as_mut() {
println!("Fking around : {:#?}", discord_ctx);
println!("Full discord ctx : {:#?}", discord_ctx);
let mut m = serenity_prelude::Message::default();
m.content = "Bob".into();
// discord_ctx.http.get_scheduled_event_users(, , , , )
// discord_ctx.http.get_user(UserId::new(1));
m.content = format!("Hello {}", Mention::from(RoleId::new(1222612097091768371)));
// m.content = format!("Hello {}", Mention::from(UserId::new(1)));
// m.mentions = vec![User::];
// m.mention_roles = vec![];
let r = discord_ctx
.http()
.send_message(ChannelId::new(1300786300143800351), Vec::new(), &m)