diff --git a/rt.py b/rt.py index f1ba31c416ae6e6749ac3069f1734b2fe208e435..54fb34af1beeaf418514e0808473258a7f817675 100755 --- a/rt.py +++ b/rt.py @@ -18,8 +18,10 @@ class Config(BaseProxyConfig): class RT(Plugin): prefix: str whitelist: Set[UserID] + api: str + post_data: dict headers = {"User-agent": "maubot-rt"} - regex_number = re.compile(r'[0-9]{6}') + regex_number = re.compile(r'[0-9]+') regex_properties = re.compile(r'([a-zA-z]+): (.+)') regex_history = re.compile(r'([0-9]+): (.+)') regex_entry = re.compile(r'([a-zA-z]+): (.+(?:\n {8}.*)*)', re.MULTILINE) @@ -92,7 +94,7 @@ class RT(Plugin): ticket['Content'] = formatted_content.rstrip() return ticket - @command.passive("((^| )([rR][tT]#?))([0-9]{6})", multiple=True) + @command.passive("((^| )([rR][tT]#?))([0-9]+)", multiple=True) async def handler(self, evt: MessageEvent, subs: List[Tuple[str, str]]) -> None: await evt.mark_read() msg_lines = []