feat: add dms, hieracthical arguments, permission and rank system

This commit is contained in:
Soph :3 2025-09-14 14:59:16 +03:00
parent 544bbf73cb
commit 257bc55b75
25 changed files with 503 additions and 209 deletions

View file

@ -185,18 +185,18 @@ impl Command for FishCommand {
arg_type: ArgumentType::String,
required: false,
default: None,
children: &[],
}]
}
async fn constructed(&mut self, _: Client) {}
async fn event(&mut self, _: Client, _: ClientEvent) {}
async fn execute(&mut self, client: Client, player: Player, args: ParsedArguments) {
let mut user = sqlx::query_as::<_, User>("SELECT * FROM users WHERE _id = $1")
.bind(&player._id)
.fetch_optional(self.pool.as_ref())
.await
.unwrap()
.unwrap();
async fn execute(
&mut self,
client: Client,
player: Player,
args: ParsedArguments,
mut user: User,
) {
let action = match args.get("action") {
Some(ParsedArgument::String(s)) => s.as_str(),
_ => "",