if command == 'avatar':
# avatar
url = None
- m = re.match(r'\bavatar\s+(\S+)', raw.lower())
+ m = re.match(r'\bavatar\s+(\S+)', raw, re.IGNORECASE)
if m is not None:
url = m.group(1)
elif len(message.attachments):
elif command == 'bling':
# bling
url = None
- m = re.match(r'\bbling\s+(\S+)', raw.lower())
+ m = re.match(r'\bbling\s+(\S+)', raw, re.IGNORECASE)
filename = message.author.name
mentions = [message.author.mention] if not message.channel.is_private else None
if m is not None:
elif command == 'debug':
# debug
- m = re.match(r'\bdebug\s+(o(?:ff|n))\b', raw.lower())
+ m = re.match(r'\bdebug\s+(o(?:ff|n))\b', raw, re.IGNORECASE)
if m is None:
yield from say(message.channel, 'Sorry!')
return
args = {}
limit = 100
- m = re.match(r'\bdelete\s+(all|\d+)\b', raw.lower())
+ m = re.match(r'\bdelete\s+(all|\d+)\b', raw, re.IGNORECASE)
if m is not None:
if m.group(1) != 'all':
limit = int(m.group(1))
elif command == 'dryrun':
# dryrun
- m = re.match(r'\bdryrun\s+(o(?:ff|n))\b', raw.lower())
+ m = re.match(r'\bdryrun\s+(o(?:ff|n))\b', raw, re.IGNORECASE)
if m is None:
yield from say(message.channel, 'Sorry!')
return
elif command == 'idle':
# idle
- m = re.match(r'\bidle\s+(\d+)\b', raw.lower())
+ m = re.match(r'\bidle\s+(\d+)\b', raw, re.IGNORECASE)
if m is None:
yield from say(message.channel, 'Sorry!')
return
elif command == 'rss':
# rss
- m = re.match(r'\brss\s+(\d+)\b', raw.lower())
+ m = re.match(r'\brss\s+(\d+)\b', raw, re.IGNORECASE)
if m is None:
yield from say(message.channel, 'Sorry!')
return