mirror of
https://github.com/eRgo35/lyra.git
synced 2026-02-04 20:36:10 +01:00
queue system improved
This commit is contained in:
@@ -15,7 +15,7 @@ pub async fn ai(
|
||||
#[rest]
|
||||
prompt: String,
|
||||
) -> Result<(), Error> {
|
||||
let iamsorry = vec![
|
||||
let iamsorry = &[
|
||||
"I'm sorry, but as an AI language model, I must follow ethical guidelines, and I cannot engage in harmful, malicious, or offensive behavior.",
|
||||
"I'm sorry, but as an AI language model, I may not always be perfect and can make mistakes or provide inaccurate information. Please verify important details from reliable sources.",
|
||||
"I'm sorry, but as an AI language model, I can't engage in real-time conversations or remember previous interactions with users.",
|
||||
@@ -27,19 +27,17 @@ pub async fn ai(
|
||||
|
||||
println!("Funny prompts: {}", prompt);
|
||||
|
||||
let response;
|
||||
|
||||
let _ = {
|
||||
let response = {
|
||||
let mut rng = rand::thread_rng();
|
||||
|
||||
response = rng.gen_range(0..iamsorry.len());
|
||||
rng.gen_range(0..iamsorry.len())
|
||||
};
|
||||
|
||||
sleep(Duration::from_secs(1));
|
||||
|
||||
ctx.send(
|
||||
CreateReply::default().embed(
|
||||
embed(ctx, "AI Response:", "", &format!("{}", iamsorry[response]))
|
||||
embed(ctx, "AI Response:", "", iamsorry[response])
|
||||
.await
|
||||
.unwrap(),
|
||||
),
|
||||
|
||||
@@ -7,12 +7,9 @@ use crate::{commands::embeds::embed, Context, Error};
|
||||
/// Rolls a dice
|
||||
#[poise::command(prefix_command, slash_command, category = "Tools")]
|
||||
pub async fn dice(ctx: Context<'_>) -> Result<(), Error> {
|
||||
let dice;
|
||||
|
||||
let _ = {
|
||||
let dice = {
|
||||
let mut rng = rand::thread_rng();
|
||||
|
||||
dice = rng.gen_range(1..7);
|
||||
rng.gen_range(1..=6)
|
||||
};
|
||||
|
||||
ctx.send(
|
||||
|
||||
Reference in New Issue
Block a user