modules.base.acl.module

Module Contents

Classes

ACL

Access control module.

Functions

setup(bot) → None

Attributes

tr

bot_log

guild_log

modules.base.acl.module.tr
modules.base.acl.module.bot_log
modules.base.acl.module.guild_log
class modules.base.acl.module.ACL(bot)

Access control module.

async acl_(self, ctx)

Permission control.

async acl_group(self, ctx)

Permission group control.

async acl_group_list(self, ctx)

List permission groups.

async acl_group_get(self, ctx, name: str)

Get ACL group.

async acl_group_add(self, ctx, name: str, parent: str, role_id: int)

Add ACL group.

Parameters
  • name – string matching [a-zA-Z-]+.

  • parent – ACL parent group name.

  • role_id – Guilded role ID.

To unlink the group from the parent, set it to “”.

To set up virtual group with no link to Guilded roles, set role_id to 0.

async acl_group_update(self, ctx, name: str, param: str, value)

Update ACL group.

Parameters

name – name of group

paramvalue options:

  • name: string matching [a-zA-Z-]+.

  • parent: parent group name.

  • role_id: Guilded role ID.

To unlink the group from any parents, set parent to “”.

To set up virtual group with no link to guilded roles, set role_id to 0.

async acl_group_remove(self, ctx, name: str)

Remove ACL group.

async acl_rule(self, ctx)

Permission rules.

async acl_rule_template(self, ctx)

Generate rule template.

async acl_rule_export(self, ctx)

Export command rules.

async acl_rule_remove(self, ctx, *, command: str)

Remove command.

async acl_rule_flush(self, ctx)

Flush all the command rules.

async acl_rule_import(self, ctx, mode: str = 'add')

Add new rules from JSON file.

Existing rules are skipped, unless you pass “replace” as mode parameter.

async command(self, ctx)
async command_disable(self, ctx, *, command: str)
async command_enable(self, ctx, *, command: str)
get_group_embed(self, ctx, group: database.acl.ACL_group) guilded.Embed

Get embed with group information.

get_all_commands(self) List[str]

Return list of registered commands

import_rules(self, guild_id: int, data: dict, mode: str = 'add') Tuple[Set[str], Set[str], Dict[str, Set[Tuple[str, str]]]]

Import JSON rules.

Returns

New commands as list, Updated commands as list, Rejected commands as (reason, (command, value)) list of tuples.

modules.base.acl.module.setup(bot) None