Archived
1
0
Fork 0
This repository has been archived on 2024-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
akari-bot/command.py
2020-06-14 19:58:31 +08:00

46 lines
No EOL
1.6 KiB
Python

import re
import string
from blacklist import blacklist
def command(str1,member):
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)
if q.group(1) == '':
if member in blacklist():
return ('paa')
else:
return ('im ' + q.group(1))
else:
return ('im ' + q.group(1))
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:
pass