simple :D

This commit is contained in:
Luke Rogers 2013-12-01 19:28:24 +13:00
parent b3a8703d15
commit 017fd4fc2e
1 changed files with 9 additions and 0 deletions

View File

@ -5,6 +5,15 @@ import random
from datetime import datetime
TWITTER_RE = (r"(?:(?:www.twitter.com|twitter.com)/(?:[-_a-zA-Z0-9]+)/status/)([0-9]+)", re.I)
@hook.regex(*TWITTER_RE)
def twitter_url(match, bot=None):
tweet_id = match.group(1)
print tweet_id
return twitter(tweet_id, bot)
@hook.command("tw")
@hook.command("twatter")
@hook.command