Skip to content

Commit e8eff0c

Browse files
committed
Add emojis to responses
1 parent 2ad0851 commit e8eff0c

File tree

6 files changed

+33
-12
lines changed

6 files changed

+33
-12
lines changed

src/commands/bake.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub async fn bake(
1515
#[description = "Hvor mange vafler?"] amount: usize,
1616
) -> Result<(), Error> {
1717
if !ctx.data().queue.is_open() {
18-
ctx.say("Bestilling er stengt").await?;
18+
ctx.say("🔒️ Bestilling er stengt").await?;
1919
return Ok(());
2020
}
2121

@@ -31,10 +31,14 @@ pub async fn bake(
3131
}
3232

3333
let message = if baked.is_empty() {
34-
"Ingen vafler å steke".to_string()
34+
let mut s = "😟 Ingen å steke vafler til.".to_string();
35+
if amount > n {
36+
s.push_str(format!(" ({} vafler til overs)", amount - n).as_str());
37+
}
38+
s
3539
} else {
3640
let mut msg = MessageBuilder::new();
37-
msg.push("Stekte ").push(baked.len().to_string());
41+
msg.push("🧇 Stekte ").push(baked.len().to_string());
3842

3943
if baked.len() == 1 {
4044
msg.push(" en vaffel til: ");

src/commands/close.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ use crate::bot::{check_is_oracle, Context, Error};
1212
#[tracing::instrument(name = "close", skip(ctx))]
1313
pub async fn close(ctx: Context<'_>) -> Result<(), Error> {
1414
if !ctx.data().queue.is_open() {
15-
ctx.say("Bestilling er allerede stengt").await?;
15+
ctx.say("🔒️ Bestilling er allerede stengt").await?;
1616
return Ok(());
1717
}
1818

1919
ctx.data().queue.close();
20+
ctx.say("🔒️ Bestilling er nå stengt").await?;
2021

2122
ctx.serenity_context()
2223
.set_presence(None, OnlineStatus::Offline);

src/commands/open.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use serenity::all::{ActivityData, OnlineStatus};
2+
use tracing::debug;
23

34
use crate::bot::{check_is_oracle, Context, Error};
45

@@ -11,12 +12,15 @@ use crate::bot::{check_is_oracle, Context, Error};
1112
)]
1213
#[tracing::instrument(name = "open", skip(ctx))]
1314
pub async fn open(ctx: Context<'_>) -> Result<(), Error> {
15+
debug!("open command called");
16+
1417
if ctx.data().queue.is_open() {
15-
ctx.say("Bestilling er allerede åpnet").await?;
18+
ctx.say("🔓️ Bestilling er allerede åpnet").await?;
1619
return Ok(());
1720
}
1821

1922
ctx.data().queue.open();
23+
ctx.say("🔓️ Bestilling er nå åpnet").await?;
2024

2125
ctx.serenity_context().set_presence(
2226
Some(ActivityData::playing("🧇 Lager vafler")),

src/commands/ping.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
use tracing::debug;
2+
13
use crate::bot::{Context, Error};
24

35
/// Ping vaffelbot
46
#[poise::command(prefix_command, slash_command, rename = "ping")]
57
#[tracing::instrument(name = "ping", skip(ctx))]
68
pub async fn ping(ctx: Context<'_>) -> Result<(), Error> {
7-
ctx.say("Pong!").await?;
9+
debug!("ping command called");
10+
11+
ctx.say("🏓 Pong!").await?;
812
Ok(())
913
}

src/commands/queue_size.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
1+
use tracing::debug;
2+
13
use crate::bot::{Context, Error};
24

35
/// Se hvor mange som er foran deg i køen
46
#[poise::command(prefix_command, slash_command, rename = "kø")]
57
#[tracing::instrument(name = "queue", skip(ctx))]
68
pub async fn queue(ctx: Context<'_>) -> Result<(), Error> {
9+
debug!("queue command called");
10+
711
if !ctx.data().queue.is_open() {
8-
ctx.say("Bestilling er stengt").await?;
12+
ctx.say("🏮 Bestilling er stengt").await?;
913
return Ok(());
1014
}
1115

1216
let user_id = ctx.author().id.to_string();
1317
let message = match ctx.data().queue.index_of(user_id) {
14-
Some(index) => format!("Du er {} i køen", index + 1),
15-
None => "Du er ikke i køen".to_string(),
18+
Some(index) => format!("😎 Du er {} i køen", index + 1),
19+
None => "🏮 Du er ikke i køen.".to_string(),
1620
};
1721

1822
ctx.say(message).await?;

src/commands/waffle.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
1+
use tracing::debug;
2+
13
use crate::bot::{Context, Error};
24

35
/// Få en orakel til å steke vaffel til deg
46
#[poise::command(prefix_command, slash_command, rename = "vaffel")]
57
#[tracing::instrument(name = "waffle", skip(ctx))]
68
pub async fn waffle(ctx: Context<'_>) -> Result<(), Error> {
9+
debug!("waffle command called");
10+
711
if !ctx.data().queue.is_open() {
8-
ctx.say("Bestilling er stengt").await?;
12+
ctx.say("🏮 Bestilling er stengt").await?;
913
return Ok(());
1014
}
1115

1216
let user_id = ctx.author().id.to_string();
1317
let message = match ctx.data().queue.index_of(user_id.clone()) {
14-
Some(index) => format!("Du er {} i køen", index + 1),
18+
Some(index) => format!("⏲️ Du er allerede i køden. Det er **{} foran deg**.", index),
1519
None => {
1620
let size = ctx.data().queue.size();
1721
ctx.data().queue.push(user_id);
18-
format!("Du er nå i køen. Det er {} personer foran deg", size)
22+
format!("⏲️ Du er nå i køen. Det er **{} foran deg**.", size)
1923
}
2024
};
2125

0 commit comments

Comments
 (0)