32 lines
821 B
Python
32 lines
821 B
Python
import functools
|
|
|
|
|
|
class ComRun():
|
|
|
|
def __init__(self):
|
|
self.say = ""
|
|
self.trigger_dict = {
|
|
"trigger_type": None,
|
|
"trigger_prefix": None,
|
|
"trigger_str": None,
|
|
"trigger_command": None,
|
|
"trigger_hostmask": None,
|
|
"trigger_sender": None
|
|
}
|
|
|
|
|
|
def comrun_create():
|
|
"""This Detects --arguments to commands."""
|
|
|
|
def actual_decorator(function):
|
|
|
|
@functools.wraps(function)
|
|
def internal_comrun_create(bot, trigger, *args, **kwargs):
|
|
|
|
comrun = ComRun()
|
|
|
|
function(bot, trigger, comrun, *args, **kwargs)
|
|
|
|
return internal_comrun_create
|
|
return actual_decorator
|