if command is None:
lines = [
- '<@{}>, the cat-like robot from the 34th century of the future, recognises these commands (and more)'.format(client.user.id),
+ '<@{}>, the cat-like robot from the 34th century of the future, recognises these commands (and more):'.format(client.user.id),
'```',
'announce',
'coords',
'raikogram',
'time',
'```',
- 'Send help COMMAND` for help on a specific command.'
+ 'Send `help COMMAND` for help on a specific command.'
]
elif command == 'announce' or command == 'announcement':
if len(args) > 1:
def create_announcement(message, raw):
# announcement create [params]: <text>
# We want to split by colon but don't want to count any which are part of dates or URLs.
- m = re.match(r'(?:[^:]*\s+(?:(?:at|from|to)\s+\d\d\d\d-?\d\d-?\d\d(?:T|\s+)\d\d:?\d\d:?\d\dZ?|sound\s+https?:\S+))+', raw, re.IGNORECASE)
+ m = re.match(r'(?:[^:]*\s+(?:(?:at|from|to)\s+"?\d\d\d\d-?\d\d-?\d\d(?:T|\s+)\d\d:?\d\d:?\d\dZ?"?|sound\s+https?:\S+))+', raw, re.IGNORECASE)
if m is not None:
parts = raw[len(m.group(0)):].split(':')
parts[0] = m.group(0) + parts[0]
else:
m = re.match(r'<@((?:&?|#)\d+)>', param)
if m is None:
- m = re.match('r@((?:&?|#)\d+)', param)
+ m = re.match(r'@((?:&?|#)\d+)', param)
if m is None:
m = re.match('r@(everyone|here)', param)
if m is not None: