feat: turn ask into an embed message
This commit is contained in:
parent
89a107503f
commit
e472930ade
@ -7,7 +7,7 @@ use serenity::model::prelude::{Message, UserId};
|
|||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
|
|
||||||
#[help]
|
#[help]
|
||||||
#[individual_command_tip = "Hello! Pour plus d'information sur une commande, passer la en argument."]
|
#[individual_command_tip = "Hello! Pour plus d'information sur une commande, passe la en argument."]
|
||||||
#[command_not_found_text = "La commande `{}` n'a pas été trouver."]
|
#[command_not_found_text = "La commande `{}` n'a pas été trouver."]
|
||||||
#[max_levenshtein_distance(3)]
|
#[max_levenshtein_distance(3)]
|
||||||
#[wrong_channel = "Strike"]
|
#[wrong_channel = "Strike"]
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use serenity::builder::{CreateEmbed, CreateEmbedFooter, CreateMessage};
|
||||||
use serenity::{
|
use serenity::{
|
||||||
all::Message,
|
all::Message,
|
||||||
client::Context,
|
client::Context,
|
||||||
@ -7,14 +8,13 @@ use serenity::{
|
|||||||
#[command]
|
#[command]
|
||||||
#[description = "Info to ask for new meme"]
|
#[description = "Info to ask for new meme"]
|
||||||
pub async fn ask(ctx: &Context, msg: &Message) -> CommandResult {
|
pub async fn ask(ctx: &Context, msg: &Message) -> CommandResult {
|
||||||
if let Err(why) = msg
|
let footer = CreateEmbedFooter::new("WeeboBot");
|
||||||
.channel_id
|
let embed = CreateEmbed::new()
|
||||||
.say(
|
.title("New meme ?")
|
||||||
&ctx.http,
|
.field("Hello, si tu souhaites ajouter un nouveau meme au bot, tu dois demander à batleforc d'en ajouter un nouveau. Tu peux le faire en lui envoyant un message.".to_string(), String::new(), true)
|
||||||
"Hi, if you want to add new meme to the bot, you need to ask batleforc to add new one. You can do it by sending a message to him.",
|
.footer(footer);
|
||||||
)
|
let builder = CreateMessage::new().embed(embed);
|
||||||
.await
|
if let Err(why) = msg.channel_id.send_message(&ctx.http, builder).await {
|
||||||
{
|
|
||||||
println!("Error sending message: {:?}", why)
|
println!("Error sending message: {:?}", why)
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Loading…
Reference in New Issue
Block a user