@mentions can contain bling.
authorCMDR furrycat <elite@furrycat.net>
Tue, 27 Sep 2016 14:51:39 +0000 (15:51 +0100)
committerCMDR furrycat <elite@furrycat.net>
Tue, 27 Sep 2016 14:51:39 +0000 (15:51 +0100)
bot.py

diff --git a/bot.py b/bot.py
index f82434e..9093b36 100755 (executable)
--- a/bot.py
+++ b/bot.py
@@ -211,7 +211,7 @@ def do_commands(message, command, raw, non_admin):
     m = re.match(r'\bbling\s+(\S+)', raw.lower())
     if m is not None:
       url = m.group(1)
-      m = re.match(r'<@(\d+)>', url)
+      m = re.match(r'<@(!?\d+)>', url)
       if m is not None:
         other = None
         id = str(m.group(1))