48 lines
No EOL
1.7 KiB
Python
48 lines
No EOL
1.7 KiB
Python
import re
|
||
import string
|
||
from blacklist import blacklist
|
||
from wikil import im
|
||
async def command(str1,member):
|
||
str1 = re.sub(r'^~','~',str1)
|
||
try:
|
||
q = re.match(r'\[\[(.*)\|.*\]\]',str1)
|
||
return ('im '+q.group(1))
|
||
except Exception:
|
||
try:
|
||
q = re.match(r'^(发现新人:).*',str1)
|
||
print(q.group(1))
|
||
if str(member) == '2736881328':
|
||
return ('xrrrlei '+q.group(1))
|
||
else:
|
||
return ('paa')
|
||
except Exception:
|
||
try:
|
||
q = re.match(r'^.*(: ~)(.*)',str1)
|
||
return q.group(2)
|
||
except Exception:
|
||
try:
|
||
q = re.match(r'^~(.*)',str1)
|
||
if q.group(1).find('爬') != -1:
|
||
if member in blacklist():
|
||
return ('paa')
|
||
else:
|
||
return q.group(1)
|
||
else:
|
||
return q.group(1)
|
||
except Exception:
|
||
try:
|
||
q = re.match(r'^!(.*\-.*)',str1)
|
||
q = str.upper(q.group(1))
|
||
return ('bug '+q)
|
||
except Exception:
|
||
try:
|
||
w = re.findall(r'\[\[(.*?)\]\]',str1)
|
||
z = []
|
||
c = '\n'
|
||
for x in w:
|
||
print(x)
|
||
z.append(await im(x))
|
||
v = c.join(z)
|
||
return('echo '+v)
|
||
except Exception:
|
||
pass |