Skip to content

Commit

Permalink
fix parameter docs
Browse files Browse the repository at this point in the history
  • Loading branch information
www committed Nov 11, 2024
1 parent 8726ded commit 908e1b2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
24 changes: 20 additions & 4 deletions docs/src/user/templating/2-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Sleep for a given duration.

- `duration` ([f64](#type.f64)): The duration to sleep for.


### Returns

- `slept_time` ([f64](#type.f64)): The actual duration slept for.
Expand Down Expand Up @@ -66,6 +67,7 @@ Returns the data associated with a template token.

- `token` ([string](#type.string)): The token of the template to retrieve data for.


### Returns

- `data` ([TemplateData?](#type.TemplateData)): The data associated with the template token, or `null` if no data is found.
Expand Down Expand Up @@ -104,6 +106,7 @@ Creates a new CAPTCHA with the given configuration.

- `config` ([CaptchaConfig](#type.CaptchaConfig)): The configuration to use for the CAPTCHA.


### Returns

- `captcha` ([{u8}](#type.u8)): The created CAPTCHA object.
Expand All @@ -130,6 +133,7 @@ function new(token: string)




---

# @antiraid/permissions
Expand All @@ -150,6 +154,7 @@ Returns a Permission object from a string.

- `perm_string` ([string](#type.string)): The string to parse into a Permission object.


### Returns

- `permission` ([Permission](#type.Permission)): The parsed Permission object.
Expand All @@ -166,6 +171,7 @@ Returns a string from a Permission object.

- `permission` ([Permission](#type.Permission)): The Permission object to parse into a string.


### Returns

- `perm_string` ([string](#type.string)): The parsed string.
Expand All @@ -180,7 +186,9 @@ Checks if a list of permissions in Permission object form contains a specific pe

### Parameters

- `permissions` ([{Permission}](#type.Permission)): The list of permissions- `permission` ([Permission](#type.Permission)): The permission to check for.
- `permissions` ([{Permission}](#type.Permission)): The list of permissions
- `permission` ([Permission](#type.Permission)): The permission to check for.


### Returns

Expand All @@ -196,7 +204,9 @@ Checks if a list of permissions in canonical string form contains a specific per

### Parameters

- `permissions` ([{string}](#type.string)): The list of permissions- `permission` ([string](#type.string)): The permission to check for.
- `permissions` ([{string}](#type.string)): The list of permissions
- `permission` ([string](#type.string)): The permission to check for.


### Returns

Expand All @@ -212,7 +222,10 @@ Checks if a single permission check passes.

### Parameters

- `check` ([PermissionCheck](#type.PermissionCheck)): The permission check to evaluate.- `member_native_perms` ([Permissions](#type.Permissions)): The native permissions of the member.- `member_kittycat_perms` ([{Permission}](#type.Permission)): The kittycat permissions of the member.
- `check` ([PermissionCheck](#type.PermissionCheck)): The permission check to evaluate.
- `member_native_perms` ([Permissions](#type.Permissions)): The native permissions of the member.
- `member_kittycat_perms` ([{Permission}](#type.Permission)): The kittycat permissions of the member.


### Returns

Expand All @@ -228,7 +241,10 @@ Evaluates a list of permission checks.

### Parameters

- `checks` ([{PermissionCheck}](#type.PermissionCheck)): The list of permission checks to evaluate.- `member_native_perms` ([Permissions](#type.Permissions)): The native permissions of the member.- `member_kittycat_perms` ([{Permission}](#type.Permission)): The kittycat permissions of the member.
- `checks` ([{PermissionCheck}](#type.PermissionCheck)): The list of permission checks to evaluate.
- `member_native_perms` ([Permissions](#type.Permissions)): The native permissions of the member.
- `member_kittycat_perms` ([{Permission}](#type.Permission)): The kittycat permissions of the member.


### Returns

Expand Down
2 changes: 1 addition & 1 deletion services/rust.assetgen/src/docgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ fn method_to_string(method: &Method) -> String {
markdown.push_str("\n\n### Parameters\n\n");

method.parameters.iter().for_each(|param| {
markdown.push_str(&param_to_string(param));
markdown.push_str(&format!("{}\n", param_to_string(param)));
});
}

Expand Down

0 comments on commit 908e1b2

Please sign in to comment.