forked from GitHub/dbot
hes got a knot in his tail
This commit is contained in:
parent
c1f3905672
commit
633e233d9d
@ -261,7 +261,7 @@ var reddit = function(dbot) {
|
|||||||
}.bind(this);
|
}.bind(this);
|
||||||
|
|
||||||
dbot.api.link.addHandler(this.name, // I'm so sorry, Jesus.
|
dbot.api.link.addHandler(this.name, // I'm so sorry, Jesus.
|
||||||
/https?:\/\/(www\.)?reddit\.com\/r\/([a-zA-Z0-9]+)(\/comments\/([a-zA-Z0-9]+)?\/([a-zA-Z0-9_]+)\/([a-zA-Z0-9_]+)?)?/,
|
/https?:\/\/(www|pay\.)?reddit\.com\/r\/([a-zA-Z0-9]+)(\/comments\/([a-zA-Z0-9]+)?\/([a-zA-Z0-9_]+)\/([a-zA-Z0-9_]+)?)?/,
|
||||||
rHandler);
|
rHandler);
|
||||||
dbot.api.link.addHandler(this.name + 'short',
|
dbot.api.link.addHandler(this.name + 'short',
|
||||||
/https?:\/\/(www\.)?redd.it\/([a-zA-Z0-9]+)/,
|
/https?:\/\/(www\.)?redd.it\/([a-zA-Z0-9]+)/,
|
||||||
@ -269,6 +269,7 @@ var reddit = function(dbot) {
|
|||||||
this.api.getPostInfo(match[2], function(info) {
|
this.api.getPostInfo(match[2], function(info) {
|
||||||
if(info) {
|
if(info) {
|
||||||
var infoString = dbot.t('about_post', {
|
var infoString = dbot.t('about_post', {
|
||||||
|
'title': info.title.trim(),
|
||||||
'poster': info.author,
|
'poster': info.author,
|
||||||
'subreddit': info.subreddit,
|
'subreddit': info.subreddit,
|
||||||
'comments': info.num_comments,
|
'comments': info.num_comments,
|
||||||
|
Loading…
Reference in New Issue
Block a user