Skip to content

Commit

Permalink
fix: tweets not having a grouping for different types
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTenno committed Nov 1, 2018
1 parent d2f72e7 commit 2c8bc3c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion commands.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/CommonFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ const trackableEvents = {
deals,
cetus: ['cetus.day', 'cetus.night'],
earth: ['earth.day', 'earth.night'],
'twitter.reply': eventTypes.filter(event => /twitter\.\w*\.reply/.test(event)),
'twitter.tweet': eventTypes.filter(event => /twitter\.\w*\.tweet/.test(event)),
'twitter.retweet': eventTypes.filter(event => /twitter\.\w*\.retweet/.test(event)),
'twitter.quote': eventTypes.filter(event => /twitter\.\w*\.quote/.test(event)),
twitter,
};

Expand Down
2 changes: 1 addition & 1 deletion src/notifications/Notifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class Notifier {
}

async sendTweets(newTweets, platform) {
await Promise.all(newTweets.map(t => this.broadcaster.broadcast(new TweetEmbed(this.bot, t.tweets[0]), platform, `${t.id}`, null, 3600)));
await Promise.all(newTweets.map(t => this.broadcaster.broadcast(new TweetEmbed(this.bot, t.tweets[0]), platform, t.id, null, 3600)));
}

async sendInvasion(invasion, platform) {
Expand Down
8 changes: 6 additions & 2 deletions src/resources/trackables.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"twitter.warframe.reply",
"twitter.digitalextremes.tweet",
"twitter.digitalextremes.quote",
"twitter.digitalextremes.reply",
"twitter.digitalextremes.reply",
"twitter.pablo.tweet",
"twitter.pablo.retweet",
"twitter.pablo.quote",
Expand Down Expand Up @@ -239,6 +239,10 @@
"fissures",
"cetus",
"earth",
"twitter.tweet",
"twitter.retweet",
"twitter.quote",
"twitter.reply",
"twitter"
],
"fissures":[
Expand Down Expand Up @@ -331,7 +335,7 @@
"twitter.warframe.quote",
"twitter.digitalextremes.tweet",
"twitter.digitalextremes.retweet",
"twitter.digitalextremes.quote",
"twitter.digitalextremes.quote",
"twitter.pablo.tweet",
"twitter.pablo.retweet",
"twitter.pablo.quote",
Expand Down

0 comments on commit 2c8bc3c

Please sign in to comment.