add method
Future<void>
add(
- dynamic redditor, {
- List<
ModeratorPermission> permissions = const <ModeratorPermission>[], - Map<
String, String> ? params,
override
Add or invite redditor
to be a moderator of the subreddit.
If permissions
is not provided, the +all
permission will be used.
Otherwise, permissions
should specify the subset of permissions
to grant. If the empty list is provided, no permissions are granted
(default).
An invite will be sent unless the user making this call is an admin.
Implementation
@override
Future<void> add(/* RedditorRef, String */ redditor,
{List<ModeratorPermission> permissions = const <ModeratorPermission>[],
Map<String, String>? params}) async {
final data = _handlePermissions(permissions);
if (params != null) {
data.addAll(params);
}
await super.add(
redditor,
params: data,
);
}