Add check.command.is-channel handler in commands module
This commit is contained in:
parent
5838314396
commit
fda9869690
1 changed files with 7 additions and 0 deletions
|
@ -425,3 +425,10 @@ class Module(ModuleManager.BaseModule):
|
|||
return utils.consts.PERMISSION_FORCE_SUCCESS
|
||||
else:
|
||||
return "You do not have permission to do this"
|
||||
|
||||
@utils.hook("check.command.is-channel")
|
||||
def check_command_self(self, event):
|
||||
if event["is_channel"]:
|
||||
return utils.consts.PERMISSION_FORCE_SUCCESS
|
||||
else:
|
||||
return "This command can only be used in-channel"
|
||||
|
|
Loading…
Reference in a new issue