initial rewrite in rust & moderation commands
Signed-off-by: seth <getchoo@tuta.io>
This commit is contained in:
parent
b17e357b75
commit
45403e9d9b
53 changed files with 3297 additions and 2820 deletions
21
src/commands/general/rory.rs
Normal file
21
src/commands/general/rory.rs
Normal file
|
@ -0,0 +1,21 @@
|
|||
use crate::api::rory::get_rory;
|
||||
use crate::Context;
|
||||
|
||||
use color_eyre::eyre::Result;
|
||||
|
||||
#[poise::command(slash_command, prefix_command)]
|
||||
pub async fn rory(ctx: Context<'_>, id: Option<u64>) -> Result<()> {
|
||||
let resp = get_rory(id).await?;
|
||||
|
||||
ctx.send(|m| {
|
||||
m.embed(|e| {
|
||||
e.title("Rory :3")
|
||||
.url(&resp.url)
|
||||
.image(resp.url)
|
||||
.footer(|f| f.text(format!("ID {}", resp.id)))
|
||||
})
|
||||
})
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue