Skip to content

Commit

Permalink
uwufication added
Browse files Browse the repository at this point in the history
  • Loading branch information
ana-rchy committed Jun 3, 2024
1 parent 57e0a32 commit 4c216fe
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
13 changes: 13 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ time = { version = "0.3.36", features = ["serde", "parsing"] }
tokio = { version = "1.37.0", features = ["rt-multi-thread"] }
tokio-cron-scheduler = "0.10.2"
uuid = "1.8.0"
uwu-rs = "1.0.0"
15 changes: 15 additions & 0 deletions src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,21 @@ async fn roll_2(mut min: i64, mut max: i64) -> i64 {
}


#[poise::command(slash_command, prefix_command)]
pub async fn uwuify(ctx: Context<'_>, text: Option<String>) -> Result<(), Error> {
if text.is_none() {
ctx.say("nu tewext unu ;(").await?;
return Ok(());
}

let uwuified = uwu_rs::Uwu::new().uwuify(text.unwrap()).expect("uwufication failed bruh how tf");

ctx.say(uwuified).await?;

Ok(())
}


#[poise::command(prefix_command)]
pub async fn get_leaderboard(ctx: Context<'_>, param: Option<String>) -> Result<(), Error> {
let http = ctx.http();
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use eveningbot::{global::*, jobs, commands, event};
use eveningbot::{global::*, jobs, commands::*, event};
use poise::serenity_prelude::{self as serenity, GatewayIntents};
use std::sync::Arc;
use tokio_cron_scheduler::JobScheduler;
Expand Down Expand Up @@ -52,7 +52,7 @@ pub async fn poise_setup(shared_data: &SharedData) -> serenity::Client {
})
})
.options(poise::FrameworkOptions {
commands: vec![commands::fact_check(), commands::get_leaderboard(), commands::roll()],
commands: vec![fact_check(), get_leaderboard(), roll(), uwuify()],
prefix_options: poise::PrefixFrameworkOptions {
prefix: Some("!".into()),
..Default::default()
Expand Down

0 comments on commit 4c216fe

Please sign in to comment.