welcome message
parent
a0c742e7b9
commit
50c75fc5bb
3
main.py
3
main.py
|
@ -48,6 +48,9 @@ class MyClient(discord.Client):
|
|||
if RTXT != "":
|
||||
await message.channel.send(RTXT)
|
||||
return
|
||||
async def on_guild_join(self,G):
|
||||
await G.system_channel.send("Thank you for using this robot. When you enter `[[page name]]` or `{{template name}}`, the robot will automatically reply with a link.")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
client = MyClient(baseURL())
|
||||
|
|
|
@ -5,8 +5,13 @@ def gl(cont):
|
|||
Lcont = x[0]
|
||||
PLNK = re.search(r'^\[\[([^|#]+)(?:#([^|]+))?.*?]]$',Lcont)
|
||||
if PLNK != None:
|
||||
RLST.append(PLNK.group(1))
|
||||
continue
|
||||
try:
|
||||
SNAME = PLNK.group(2)
|
||||
SECTION = ("#{}".format(SNAME)) if SNAME != None else ""
|
||||
except IndexError:
|
||||
SECTION = ""
|
||||
RLST.append(PLNK.group(1) + SECTION)
|
||||
continue
|
||||
FUNC = re.search(r'^{{ *#(exer|if|ifeq|ifexist|ifexpr|switch|time|language|babel|invoke) *:',Lcont)
|
||||
if FUNC != None:
|
||||
RLST.append("mw:Help:Extension:ParserFunctions#{}".format(FUNC))
|
||||
|
|
Loading…
Reference in New Issue