aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/__init__.py5
-rw-r--r--src/utils/consts.py1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/utils/__init__.py b/src/utils/__init__.py
index 4e947c4b..de812f5b 100644
--- a/src/utils/__init__.py
+++ b/src/utils/__init__.py
@@ -184,6 +184,11 @@ def export(setting: str, value: typing.Any):
{"setting": setting, "value": value})
return module
return _export_func
+def kwarg(key: str, value: typing.Any):
+ def _kwarg_func(func):
+ _set_get_append(func, consts.BITBOT_KWARG_MAGIC, {key: value})
+ return func
+ return _kwarg_func
class MultiCheck(object):
def __init__(self,
diff --git a/src/utils/consts.py b/src/utils/consts.py
index f5272cab..0c57b4b0 100644
--- a/src/utils/consts.py
+++ b/src/utils/consts.py
@@ -2,6 +2,7 @@ import typing
from . import _consts_256_color
BITBOT_HOOKS_MAGIC = "__bitbot_hooks"
+BITBOT_KWARG_MAGIC = "__bitbot_kwarg"
BITBOT_EXPORTS_MAGIC = "__bitbot_exports"
class IRCColor(object):