3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-27 14:29:29 +01:00

Show short form of link for Reddit posts [#293]

This commit is contained in:
reality 2013-04-13 20:04:06 +00:00
parent 588ea41fb7
commit cd3b468ada
2 changed files with 4 additions and 3 deletions

View File

@ -82,12 +82,13 @@ var reddit = function(dbot) {
'comments': info.num_comments,
'score': info.score,
'up': info.ups,
'down': info.downs
'down': info.downs,
'url': this.ApiRoot + matches[4]
});
if(info.over_18) infoString += ' [NSFW]';
event.reply(infoString);
}
});
}.bind(this));
} else if(matches[2]) { // It's a subreddit
this.api.getSubredditInfo(matches[2], function(info) {
if(info) {

View File

@ -3,7 +3,7 @@
"en": "[{display_name} has {subscribers} subscribers ({active} active)]"
},
"about_post": {
"en": "[Post by {poster} in {subreddit} - Comments: {comments}, Score: {score} ({up}|{down})]"
"en": "[Post by {poster} in {subreddit} - Comments: {comments}, Score: {score} ({up}|{down})] - {url}"
},
"about_comment": {
"en": "[Comment by {poster} in {subreddit} - Score: {score} ({up}|{down})]"