Thomas Kaul
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
1 deletions
-
apps/api/src/services/twitter-bot/twitter-bot.service.ts
|
|
@ -6,6 +6,7 @@ import { |
|
|
|
} from '@ghostfolio/common/config'; |
|
|
|
import { resolveFearAndGreedIndex } from '@ghostfolio/common/helper'; |
|
|
|
import { Injectable, Logger } from '@nestjs/common'; |
|
|
|
import { isSunday } from 'date-fns'; |
|
|
|
import { TwitterApi, TwitterApiReadWrite } from 'twitter-api-v2'; |
|
|
|
|
|
|
|
@Injectable() |
|
|
@ -27,7 +28,10 @@ export class TwitterBotService { |
|
|
|
} |
|
|
|
|
|
|
|
public async tweetFearAndGreedIndex() { |
|
|
|
if (!this.configurationService.get('ENABLE_FEATURE_FEAR_AND_GREED_INDEX')) { |
|
|
|
if ( |
|
|
|
!this.configurationService.get('ENABLE_FEATURE_FEAR_AND_GREED_INDEX') || |
|
|
|
isSunday(new Date()) |
|
|
|
) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|