Initial commit
This commit is contained in:
commit
5a5f817df7
55 files changed
+3919
No files matched your search
@@ -0,0 +1,34 @@
|
||||
use crate::{Context, Error};
|
||||
use tracing::trace;
|
||||
|
||||
pub async fn trace_message(msg: &str, channel: String, guild: String) {
|
||||
trace!(
|
||||
"Saying \"{}\" in channel {} in guild {}",
|
||||
msg, channel, guild
|
||||
);
|
||||
}
|
||||
|
||||
pub async fn edit_response_message<'a>(
|
||||
response_message: &poise::ReplyHandle<'a>,
|
||||
ctx: Context<'_>,
|
||||
content: &str,
|
||||
silent: bool,
|
||||
) -> Result<(), Error> {
|
||||
if silent {
|
||||
response_message
|
||||
.edit(
|
||||
ctx,
|
||||
poise::CreateReply::default()
|
||||
.content(content)
|
||||
.allowed_mentions(
|
||||
poise::serenity_prelude::CreateAllowedMentions::new().empty_users(),
|
||||
),
|
||||
)
|
||||
.await?;
|
||||
} else {
|
||||
response_message
|
||||
.edit(ctx, poise::CreateReply::default().content(content))
|
||||
.await?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
Reference in new issue
Block a user