mirror of
https://github.com/reality/dbot.git
synced 2025-01-23 18:44:14 +01:00
test reddit colour
This commit is contained in:
parent
92c045d8c7
commit
601d10b0de
@ -1,5 +1,8 @@
|
|||||||
{
|
{
|
||||||
"outputPrefix": "\u000312reddit\u000f",
|
"outputPrefix": "\u000312reddit\u000f",
|
||||||
"dependencies": [ "link" ],
|
"dependencies": [ "link" ],
|
||||||
"dbType": "redis"
|
"dbType": "redis",
|
||||||
|
"colours": {
|
||||||
|
"Drugs": "\u00033"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,6 +52,9 @@ var reddit = function(dbot) {
|
|||||||
this.api.getNewPosts(feed.subreddit, checkTimes[channel.id][feed.subreddit], function(err, posts) {
|
this.api.getNewPosts(feed.subreddit, checkTimes[channel.id][feed.subreddit], function(err, posts) {
|
||||||
if(!err && posts.length > 0) {
|
if(!err && posts.length > 0) {
|
||||||
_.each(posts, function(post) {
|
_.each(posts, function(post) {
|
||||||
|
if(_.has(this.colours, post.subreddit)) {
|
||||||
|
post.subreddit = this.colours[post.subreddit] + post.subreddit + "\u0003";
|
||||||
|
}
|
||||||
dbot.say(channel.server, channel.channel, dbot.t('about_new_post', {
|
dbot.say(channel.server, channel.channel, dbot.t('about_new_post', {
|
||||||
'title': _.unescape(post.title.trim()),
|
'title': _.unescape(post.title.trim()),
|
||||||
'poster': post.author,
|
'poster': post.author,
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"it": "[{display_name} ha {subscribers} abonnati ({active} activo/i)]"
|
"it": "[{display_name} ha {subscribers} abonnati ({active} activo/i)]"
|
||||||
},
|
},
|
||||||
"about_post": {
|
"about_post": {
|
||||||
"en": "[{title}] [Post by {poster} in {subreddit} — Comments: {comments}, Score: {score} (\u00039▲{up}\u000f|\u000312{down}▼\u000f)] — {url}",
|
"en": "[{subreddit}][{title}] [Post by {poster} — Comments: {comments}, Score: {score} (\u00039▲{up}\u000f|\u000312{down}▼\u000f)] — {url}",
|
||||||
"cy": "[Postio gan {poster} yn {subreddit} - Sylwadau: {comments}, Sgôr: {score} (\u00039]▲{up}\u000f|\u000312{down}▼\u000f)] — {url}",
|
"cy": "[Postio gan {poster} yn {subreddit} - Sylwadau: {comments}, Sgôr: {score} (\u00039]▲{up}\u000f|\u000312{down}▼\u000f)] — {url}",
|
||||||
"de": "[Beitrag von {poster} in {subreddit} — Kommentare: {comments}, Bewertung: {score} (\u00039▲{up}\u000f|\u000312{down}▼\u000f)] — {url}",
|
"de": "[Beitrag von {poster} in {subreddit} — Kommentare: {comments}, Bewertung: {score} (\u00039▲{up}\u000f|\u000312{down}▼\u000f)] — {url}",
|
||||||
"fr": "[Message de {poster} dans {subreddit} — Commentaires: {comments}, Score: {score} (\u00039▲{up}\u000f|\u000312{down}▼\u000f)] — {url}",
|
"fr": "[Message de {poster} dans {subreddit} — Commentaires: {comments}, Score: {score} (\u00039▲{up}\u000f|\u000312{down}▼\u000f)] — {url}",
|
||||||
|
Loading…
Reference in New Issue
Block a user