tangled
alpha
login
or
join now
isabelroses.com
/
blahaj
1
fork
atom
silly goober bot
1
fork
atom
overview
issues
pulls
pipelines
fix(commands/bottom): wrap with codeblcok
isabelroses.com
2 years ago
8609dec1
a8264a31
+7
-2
1 changed file
expand all
collapse all
unified
split
src
commands
fun
bottom.rs
+7
-2
src/commands/fun/bottom.rs
···
8
pub async fn bottomify(ctx: Context<'_>, #[description = "text"] input: String) -> Result<()> {
9
let out = bottom::encode_string(&input);
10
11
-
ctx.say(out).await?;
12
Ok(())
13
}
14
···
17
pub async fn topify(ctx: Context<'_>, #[description = "text"] input: String) -> Result<()> {
18
let out = bottom::decode_string(&input);
19
20
-
ctx.say(out.expect("failed to translate")).await?;
0
0
0
0
0
21
Ok(())
22
}
···
8
pub async fn bottomify(ctx: Context<'_>, #[description = "text"] input: String) -> Result<()> {
9
let out = bottom::encode_string(&input);
10
11
+
ctx.say(format!("```{out}```")).await?;
12
Ok(())
13
}
14
···
17
pub async fn topify(ctx: Context<'_>, #[description = "text"] input: String) -> Result<()> {
18
let out = bottom::decode_string(&input);
19
20
+
if out.is_ok() {
21
+
ctx.say(out?).await?;
22
+
} else {
23
+
ctx.say("I couldn't decode that message.").await?;
24
+
}
25
+
26
Ok(())
27
}