sysadmin module

class shellbot.plugins.sysadmin.setup.Sysadmin(config, credentials=None, **kwargs)

An administration plugin.

coroutine invite(ctx)

Implement the invite command.

Parameters:ctx (Context) – The command context.
coroutine ban(ctx, *, user=None, ndays=1)

Implement the ban command.

Parameters:ctx (Context) – The command context.
Raise:NotFound – Unknown target.
Raise:BadArgument – Invalid target.
Raise:PAMError – Permissions error.
coroutine chgroup(ctx, *, mention, primary_key)

Implement the chgroup command.

Parameters:
  • ctx (Context) – The command context.
  • mention (str) – A string denoting a valid user mention.
  • primary_key (int) – A valid role primary key or a group.

If the role is given as a string, it tries to convert the string into a valid role using the PrimaryKeyType converter. The type of the rid parameter must be an integer if the method is called internally.

Raise:NotFound – Unknown target.
Raise:BadArgument – Invalid target.
Raise:PAMError – Permissions error.
coroutine group(ctx, *, mention=None)

Implement the group command.

Parameters:
  • ctx (Context) – The command context.
  • mention (str [optional]) – User id.
Raise:

NotFound – Unknown target.

Raise:

BadArgument – Invalid target.

coroutine groupmod(ctx, *, action, primary_key)

Implement the groupmod command.

Parameters:
coroutine kick(ctx, *, user)

Implement the kick command.

Parameters:
  • ctx (Context) – The command context.
  • user (str) – A valid user id.
Raise:

PAMError – Permissions error.

coroutine mute(ctx, **kwargs)

Implement the mute command.

Permissions for muting a member or managing a channel are granted to those who are (at least) part of the <ORDINAL> group. Permissions are only granted temporarily and are not globally modified.

In other words, <ORDINAL> or greater users are allowed to use this command to mute a member or a channel, without having explicitly these permissions.

Muting a channel requires to be at least part of the <ADMIN> group.

Parameters:ctx (Context) – The command context.
coroutine serverinfo(ctx)

Implement the serverinfo command.

Parameters:ctx (Context) – The command context.
coroutine unban(ctx, *, user_id)

Implement the unban command.

Parameters:
  • ctx (Context) – The command context.
  • user_id (int) – The user id to unban.
Raise:

NotFound – Unknown target.

coroutine whois(ctx, *, mention=None)

Implement the whois command.

Parameters:
  • ctx (Context) – The command context.
  • mention (str [optional]) – A valid user mention.
Raise:

NotFound – Invalid mention.