Function create_embed_success

Source
pub fn create_embed_success(success_message: &str) -> CreateReply
Expand description

⚙️ Function: Creates a success embed reply for Discord messages.

This function generates a Discord embed with the title “Success”, a description provided by the success_message parameter, a green color to indicate success, and a footer notifying that the message will be deleted in 60 seconds. It returns a CreateReply containing the embed, suitable for sending as a response to a Discord interaction or message.

§Parameters:

  • success_message: A string slice that holds the success message to be displayed in the embed’s description.

§Returns:

  • CreateReply: A Discord reply containing the constructed success embed.

§⚠️ Notes:

  • The embed’s footer is in French: “This message will be deleted in 60 seconds.” (“This message will be deleted in 60 seconds.”).
  • The title “Success” appears to have a typo and might be intended as “Success”.
  • The embed uses a green color (0x00ff00) to visually indicate a successful operation.

§Example:

let reply = create_embed_success("Operation completed successfully!");
// Use `reply` to send the embed in a Discord channel