nonebot2/nonebot/consts.py

23 lines
556 B
Python
Raw Normal View History

2022-01-01 16:43:48 +08:00
from sys import intern
2021-12-14 01:08:48 +08:00
# used by Matcher
2022-01-01 16:43:48 +08:00
RECEIVE_KEY = intern("_receive_{id}")
LAST_RECEIVE_KEY = intern("_last_receive")
ARG_KEY = intern("{key}")
REJECT_TARGET = intern("_current_target")
REJECT_CACHE_TARGET = intern("_next_target")
2021-12-14 01:08:48 +08:00
# used by Rule
2022-01-01 16:43:48 +08:00
PREFIX_KEY = intern("_prefix")
2021-12-14 01:08:48 +08:00
2022-01-01 16:43:48 +08:00
CMD_KEY = intern("command")
RAW_CMD_KEY = intern("raw_command")
CMD_ARG_KEY = intern("command_arg")
2021-12-14 01:08:48 +08:00
2022-01-01 16:43:48 +08:00
SHELL_ARGS = intern("_args")
SHELL_ARGV = intern("_argv")
2021-12-14 01:08:48 +08:00
2022-01-01 16:43:48 +08:00
REGEX_MATCHED = intern("_matched")
REGEX_GROUP = intern("_matched_groups")
REGEX_DICT = intern("_matched_dict")