mirror of
https://github.com/Noratrieb/widetom.git
synced 2026-01-14 17:05:03 +01:00
uwuify replies
This commit is contained in:
parent
1f35ded39a
commit
9d5e73edee
1 changed files with 4 additions and 1 deletions
|
|
@ -52,7 +52,10 @@ async fn say(ctx: &Context, msg: &Message, args: Args) -> CommandResult {
|
||||||
#[command]
|
#[command]
|
||||||
#[description("uwuifies the arguments, or the last message in the channel if no args are supplied")]
|
#[description("uwuifies the arguments, or the last message in the channel if no args are supplied")]
|
||||||
async fn uwuify(ctx: &Context, msg: &Message, args: Args) -> CommandResult {
|
async fn uwuify(ctx: &Context, msg: &Message, args: Args) -> CommandResult {
|
||||||
if args.is_empty() {
|
if let Some(parent) = &msg.referenced_message {
|
||||||
|
let uwu = uwuify_str_sse(&*parent.content);
|
||||||
|
msg.channel_id.say(&ctx.http, uwu).await?;
|
||||||
|
} else if args.is_empty() {
|
||||||
let mut data = ctx.data.write().await;
|
let mut data = ctx.data.write().await;
|
||||||
let map = data.get_mut::<LastMessageInChannel>().expect("No LastMessageInChannel in TypeMap");
|
let map = data.get_mut::<LastMessageInChannel>().expect("No LastMessageInChannel in TypeMap");
|
||||||
let old_message = map.get(&msg.channel_id);
|
let old_message = map.get(&msg.channel_id);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue