Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add documentation for BanAsync and UnbanAsync parameters #1259

Merged
merged 2 commits into from
Jun 26, 2024

Conversation

AdamRaichu
Copy link
Contributor

I have no idea if this is the right way to do this, (there is no contributing guide), but I did my best.

Parameter documentation is copied from the Roblox docs, this page specifically.

@AdamRaichu
Copy link
Contributor Author

Should I add documentation for the methods as well (error handling and such)?

@osyrisrblx
Copy link
Member

osyrisrblx commented Jun 26, 2024

Thank you for contributing!

Could you please move the object types into roblox.d.ts and make them interfaces?
i.e.

interface BanAsyncConfig {
	/**
	 * (Required) UserID of the players to be banned.
	 *
	 * Max size is `50`. */
	UserIds: Array<number>;

	// ...
}

and then the method signatures would look like

BanAsync(this: Players, config: BanAsyncConfig): void;

Should I add documentation for the methods as well (error handling and such)?

No, this shouldn't be necessary. There's an automatic system for pulling documentation for API members (it wouldn't work for the dictionary here), but it needs to be upgraded to support the new create docs.

@osyrisrblx osyrisrblx merged commit 67e2c78 into roblox-ts:master Jun 26, 2024
2 checks passed
@osyrisrblx
Copy link
Member

osyrisrblx commented Jun 26, 2024

Thanks! This is now live in 1.0.785

@AdamRaichu AdamRaichu deleted the players-ban branch June 26, 2024 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants