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
|
|
@ -272,6 +272,7 @@ impl Command for FarmCommand {
|
|||
arg_type: ArgumentType::Enum(&["sell", "all", "harvest"]),
|
||||
required: false,
|
||||
default: None,
|
||||
children: &[],
|
||||
}]
|
||||
}
|
||||
|
||||
|
|
@ -384,14 +385,7 @@ impl Command for FarmCommand {
|
|||
}
|
||||
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, args: ParsedArguments, mut user: User) {
|
||||
let command = match args.get("action") {
|
||||
Some(ParsedArgument::Enum(s)) => s.as_str(),
|
||||
_ => "",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue