summaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/ask.rs4
-rw-r--r--src/commands/convert.rs6
-rw-r--r--src/commands/copypasta.rs7
3 files changed, 9 insertions, 8 deletions
diff --git a/src/commands/ask.rs b/src/commands/ask.rs
index 5075b9d..7cc82a1 100644
--- a/src/commands/ask.rs
+++ b/src/commands/ask.rs
@@ -1,5 +1,5 @@
use crate::consts;
-use crate::utils::random_choice;
+use crate::utils;
use crate::{Context, Error};
/// ask teawie a question!
@@ -10,7 +10,7 @@ pub async fn ask(
#[rename = "question"]
_question: String,
) -> Result<(), Error> {
- match random_choice(consts::RESPONSES) {
+ match utils::random_choice(consts::RESPONSES) {
Ok(resp) => {
ctx.say(resp).await?;
Ok(())
diff --git a/src/commands/convert.rs b/src/commands/convert.rs
index 4e5d71c..1f39ae4 100644
--- a/src/commands/convert.rs
+++ b/src/commands/convert.rs
@@ -1,5 +1,5 @@
use crate::{Context, Error};
-use bottomify::bottom::{decode_string, encode_string};
+use bottomify::bottom;
#[poise::command(
slash_command,
@@ -37,7 +37,7 @@ pub async fn to_bottom(
ctx: Context<'_>,
#[description = "what teawie will translate into bottom"] message: String,
) -> Result<(), Error> {
- let encoded = encode_string(&message);
+ let encoded = bottom::encode_string(&message);
ctx.say(encoded).await?;
Ok(())
}
@@ -48,7 +48,7 @@ pub async fn from_bottom(
ctx: Context<'_>,
#[description = "what teawie will translate from bottom"] message: String,
) -> Result<(), Error> {
- let d = decode_string(&message);
+ let d = bottom::decode_string(&message);
match d {
Ok(decoded) => {
ctx.say(decoded).await?;
diff --git a/src/commands/copypasta.rs b/src/commands/copypasta.rs
index 90d3b0a..14a6673 100644
--- a/src/commands/copypasta.rs
+++ b/src/commands/copypasta.rs
@@ -1,8 +1,9 @@
-use crate::utils;
-use crate::{Context, Error};
+use crate::{utils, Context, Error};
+
+use std::collections::HashMap;
+
use include_dir::{include_dir, Dir};
use log::*;
-use std::collections::HashMap;
const FILES: Dir = include_dir!("src/copypastas");