new role management commands, bug fix, table restructuring, better output
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::Mutex;
|
||||
use std::collections::HashMap;
|
||||
use poise::serenity_prelude::UserId;
|
||||
use poise::{serenity_prelude::UserId, ReplyHandle};
|
||||
use sqlx::PgConnection;
|
||||
|
||||
pub struct Data {
|
||||
@@ -13,4 +13,16 @@ pub struct Data {
|
||||
}
|
||||
|
||||
pub type Error = Box<dyn std::error::Error + Send + Sync>;
|
||||
pub type Context<'a> = poise::Context<'a, Data, Error>;
|
||||
pub type Context<'a> = poise::Context<'a, Data, Error>;
|
||||
|
||||
use poise::serenity_prelude::builder::CreateAllowedMentions;
|
||||
use poise::CreateReply;
|
||||
|
||||
pub async fn no_ping_reply<'a>(ctx: &'a Context<'_>, text: impl Into<String>) -> Result<ReplyHandle<'a>, Error> {
|
||||
Ok(ctx.send(
|
||||
CreateReply::default()
|
||||
.content(text.into())
|
||||
.reply(true)
|
||||
.allowed_mentions(CreateAllowedMentions::new())
|
||||
).await?)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user