Method Merge
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
Merge(IEnumerable<DiscordOverwriteBuilder>, OverwriteType, ulong, Permissions, Permissions, Permissions)
Merges new permissions for a target with target's existing permissions.
public static List<DiscordOverwriteBuilder> Merge(this IEnumerable<DiscordOverwriteBuilder> builderList, OverwriteType type, ulong target, Permissions allowed, Permissions denied, Permissions unset = Permissions.None)
Parameters
builderList
IEnumerable<DiscordOverwriteBuilder>The PermissionOverwrites to apply this to.
type
OverwriteTypeWhat type of overwrite you want to target.
target
ulongThe target's id.
allowed
PermissionsThe permissions to allow.
denied
PermissionsThe permissions deny.
unset
PermissionsThe permissions to unset.
Returns
- List<DiscordOverwriteBuilder>
A new List<T> containing the merged role.
Merge(IEnumerable<DiscordOverwriteBuilder>, DiscordMember, Permissions, Permissions, Permissions)
Merges new permissions for member with member's existing permissions.
public static List<DiscordOverwriteBuilder> Merge(this IEnumerable<DiscordOverwriteBuilder> builderList, DiscordMember member, Permissions allowed, Permissions denied, Permissions unset = Permissions.None)
Parameters
builderList
IEnumerable<DiscordOverwriteBuilder>The PermissionOverwrites to apply this to.
member
DiscordMemberThe member of which to modify their permissions.
allowed
PermissionsThe permissions to allow.
denied
PermissionsThe permissions to deny.
unset
PermissionsThe permissions to unset.
Returns
- List<DiscordOverwriteBuilder>
A new List<T> containing the merged member.
Merge(IEnumerable<DiscordOverwriteBuilder>, DiscordRole, Permissions, Permissions, Permissions)
Merges new permissions for role with role's existing permissions.
public static List<DiscordOverwriteBuilder> Merge(this IEnumerable<DiscordOverwriteBuilder> builderList, DiscordRole role, Permissions allowed, Permissions denied, Permissions unset = Permissions.None)
Parameters
builderList
IEnumerable<DiscordOverwriteBuilder>The PermissionOverwrites to apply this to.
role
DiscordRoleThe role of which to modify their permissions.
allowed
PermissionsThe permissions to allow.
denied
PermissionsThe permissions deny.
unset
PermissionsThe permissions to unset.
Returns
- List<DiscordOverwriteBuilder>
A new List<T> containing the merged role.
Merge(IEnumerable<DiscordOverwrite>, DiscordMember, Permissions, Permissions, Permissions)
Merges new permissions for member with member's existing permissions.
public static List<DiscordOverwriteBuilder> Merge(this IEnumerable<DiscordOverwrite> builderList, DiscordMember member, Permissions allowed, Permissions denied, Permissions unset = Permissions.None)
Parameters
builderList
IEnumerable<DiscordOverwrite>The PermissionOverwrites to apply this to.
member
DiscordMemberThe member of which to modify their permissions.
allowed
PermissionsThe permissions to allow.
denied
PermissionsThe permissions to deny.
unset
PermissionsThe permissions to unset.
Returns
- List<DiscordOverwriteBuilder>
A new List<T> containing the merged member.
Merge(IEnumerable<DiscordOverwrite>, DiscordRole, Permissions, Permissions, Permissions)
Merges new permissions for role with role's existing permissions.
public static List<DiscordOverwriteBuilder> Merge(this IEnumerable<DiscordOverwrite> builderList, DiscordRole role, Permissions allowed, Permissions denied, Permissions unset = Permissions.None)
Parameters
builderList
IEnumerable<DiscordOverwrite>The PermissionOverwrites to apply this to.
role
DiscordRoleThe role of which to modify their permissions.
allowed
PermissionsThe permissions to allow.
denied
PermissionsThe permissions deny.
unset
PermissionsThe permissions to unset.
Returns
- List<DiscordOverwriteBuilder>
A new List<T> containing the merged role.
Merge(IEnumerable<DiscordOverwrite>, OverwriteType, ulong, Permissions, Permissions, Permissions)
Merges new permissions for a target with target's existing permissions.
public static List<DiscordOverwriteBuilder> Merge(this IEnumerable<DiscordOverwrite> builderList, OverwriteType type, ulong target, Permissions allowed, Permissions denied, Permissions unset = Permissions.None)
Parameters
builderList
IEnumerable<DiscordOverwrite>The PermissionOverwrites to apply this to.
type
OverwriteTypeWhat type of overwrite you want to target.
target
ulongThe target's id.
allowed
PermissionsThe permissions to allow.
denied
PermissionsThe permissions deny.
unset
PermissionsThe permissions to unset.
Returns
- List<DiscordOverwriteBuilder>
A new List<T> containing the merged role.