Fix group subject bulk command et update group regex
This commit is contained in:
parent
46ea892bf5
commit
c5a224c719
1 changed files with 2 additions and 2 deletions
|
@ -9,7 +9,7 @@ from administrator.logger import logger
|
||||||
|
|
||||||
extension_name = "PCP"
|
extension_name = "PCP"
|
||||||
logger = logger.getChild(extension_name)
|
logger = logger.getChild(extension_name)
|
||||||
group_re = re.compile(r"(G[0-9]S[0-9]|ASPE|LP DEVOPS|LP ESSIR|LP SID)")
|
group_re = re.compile(r"(G[0-9]S[0-9]|ASPE|LP DEVOPS2?|LP ESSIR|LP SID)")
|
||||||
msg_url_re = re.compile(r"https://.*discord.*\.com/channels/[0-9]+/([0-9+]+)/([0-9]+)")
|
msg_url_re = re.compile(r"https://.*discord.*\.com/channels/[0-9]+/([0-9+]+)/([0-9]+)")
|
||||||
role_mention_re = re.compile(r"<@&[0-9]+>")
|
role_mention_re = re.compile(r"<@&[0-9]+>")
|
||||||
user_mention_re = re.compile(r"<@![0-9]+>")
|
user_mention_re = re.compile(r"<@![0-9]+>")
|
||||||
|
@ -152,7 +152,7 @@ class PCP(commands.Cog):
|
||||||
if not role_mention_re.fullmatch(mention):
|
if not role_mention_re.fullmatch(mention):
|
||||||
raise BadArgument()
|
raise BadArgument()
|
||||||
for n in names:
|
for n in names:
|
||||||
await ctx.invoke(self.pcp_group_subject_add, n)
|
await ctx.invoke(self.pcp_group_subject_add, n, mention)
|
||||||
|
|
||||||
@pcp_group_subject.group("remove", pass_context=True)
|
@pcp_group_subject.group("remove", pass_context=True)
|
||||||
async def pcp_group_subject_remove(self, ctx: commands.Context, name: str, group: str):
|
async def pcp_group_subject_remove(self, ctx: commands.Context, name: str, group: str):
|
||||||
|
|
Reference in a new issue