69d58eede2
related functionality
11 lines
432 B
Python
11 lines
432 B
Python
|
|
from src import ModuleManager, utils
|
|
|
|
class Module(ModuleManager.BaseModule):
|
|
@utils.hook("preprocess.command")
|
|
def preprocess_command(self, event):
|
|
require_mode = event["hook"].get_kwarg("require_mode")
|
|
if event["is_channel"] and require_mode:
|
|
if not event["target"].mode_or_above(event["user"],
|
|
require_mode):
|
|
return "You do not have permission to do this"
|