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:
parent
588ea41fb7
commit
cd3b468ada
@ -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) {
|
||||
|
@ -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})]"
|
||||
|
Loading…
Reference in New Issue
Block a user