feat: add dms, hieracthical arguments, permission and rank system
This commit is contained in:
parent
544bbf73cb
commit
257bc55b75
25 changed files with 503 additions and 209 deletions
|
|
@ -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(),
|
||||
_ => "",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue