-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathinitCynanBotBackend.py
1903 lines (1654 loc) · 88.5 KB
/
initCynanBotBackend.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import asyncio
import locale
from asyncio import AbstractEventLoop
from src.aniv.anivContentScanner import AnivContentScanner
from src.aniv.anivContentScannerInterface import AnivContentScannerInterface
from src.aniv.anivCopyMessageTimeoutScorePresenter import AnivCopyMessageTimeoutScorePresenter
from src.aniv.anivCopyMessageTimeoutScorePresenterInterface import AnivCopyMessageTimeoutScorePresenterInterface
from src.aniv.anivCopyMessageTimeoutScoreRepository import AnivCopyMessageTimeoutScoreRepository
from src.aniv.anivCopyMessageTimeoutScoreRepositoryInterface import AnivCopyMessageTimeoutScoreRepositoryInterface
from src.aniv.anivSettingsRepository import AnivSettingsRepository
from src.aniv.anivSettingsRepositoryInterface import AnivSettingsRepositoryInterface
from src.aniv.anivUserIdProvider import AnivUserIdProvider
from src.aniv.anivUserIdProviderInterface import AnivUserIdProviderInterface
from src.aniv.mostRecentAnivMessageRepository import MostRecentAnivMessageRepository
from src.aniv.mostRecentAnivMessageRepositoryInterface import MostRecentAnivMessageRepositoryInterface
from src.aniv.mostRecentAnivMessageTimeoutHelper import MostRecentAnivMessageTimeoutHelper
from src.aniv.mostRecentAnivMessageTimeoutHelperInterface import MostRecentAnivMessageTimeoutHelperInterface
from src.beanStats.beanStatsPresenter import BeanStatsPresenter
from src.beanStats.beanStatsPresenterInterface import BeanStatsPresenterInterface
from src.beanStats.beanStatsRepository import BeanStatsRepository
from src.beanStats.beanStatsRepositoryInterface import BeanStatsRepositoryInterface
from src.chatActions.anivCheckChatAction import AnivCheckChatAction
from src.chatActions.chatBackMessagesChatAction import ChatBackMessagesChatAction
from src.chatActions.chatLoggerChatAction import ChatLoggerChatAction
from src.chatActions.cheerActionsWizardChatAction import CheerActionsWizardChatAction
from src.chatActions.manager.chatActionsManager import ChatActionsManager
from src.chatActions.manager.chatActionsManagerInterface import ChatActionsManagerInterface
from src.chatActions.persistAllUsersChatAction import PersistAllUsersChatAction
from src.chatActions.recurringActionsWizardChatAction import RecurringActionsWizardChatAction
from src.chatActions.saveMostRecentAnivMessageChatAction import SaveMostRecentAnivMessageChatAction
from src.chatLogger.chatLogger import ChatLogger
from src.chatLogger.chatLoggerInterface import ChatLoggerInterface
from src.cheerActions.beanChance.beanChanceCheerActionHelper import BeanChanceCheerActionHelper
from src.cheerActions.beanChance.beanChanceCheerActionHelperInterface import BeanChanceCheerActionHelperInterface
from src.cheerActions.cheerActionHelper import CheerActionHelper
from src.cheerActions.cheerActionHelperInterface import CheerActionHelperInterface
from src.cheerActions.cheerActionJsonMapper import CheerActionJsonMapper
from src.cheerActions.cheerActionJsonMapperInterface import CheerActionJsonMapperInterface
from src.cheerActions.cheerActionSettingsRepository import CheerActionSettingsRepository
from src.cheerActions.cheerActionSettingsRepositoryInterface import CheerActionSettingsRepositoryInterface
from src.cheerActions.cheerActionsRepository import CheerActionsRepository
from src.cheerActions.cheerActionsRepositoryInterface import CheerActionsRepositoryInterface
from src.cheerActions.cheerActionsWizard import CheerActionsWizard
from src.cheerActions.cheerActionsWizardInterface import CheerActionsWizardInterface
from src.cheerActions.timeout.timeoutCheerActionHelper import TimeoutCheerActionHelper
from src.cheerActions.timeout.timeoutCheerActionHelperInterface import TimeoutCheerActionHelperInterface
from src.cheerActions.timeout.timeoutCheerActionMapper import TimeoutCheerActionMapper
from src.contentScanner.bannedWordsRepository import BannedWordsRepository
from src.contentScanner.bannedWordsRepositoryInterface import BannedWordsRepositoryInterface
from src.contentScanner.contentScanner import ContentScanner
from src.contentScanner.contentScannerInterface import ContentScannerInterface
from src.cuteness.cutenessPresenter import CutenessPresenter
from src.cuteness.cutenessPresenterInterface import CutenessPresenterInterface
from src.cuteness.cutenessRepository import CutenessRepository
from src.cuteness.cutenessRepositoryInterface import CutenessRepositoryInterface
from src.cuteness.cutenessUtils import CutenessUtils
from src.cuteness.cutenessUtilsInterface import CutenessUtilsInterface
from src.cynanBot import CynanBot
from src.deepL.deepLApiService import DeepLApiService
from src.deepL.deepLApiServiceInterface import DeepLApiServiceInterface
from src.deepL.deepLJsonMapper import DeepLJsonMapper
from src.deepL.deepLJsonMapperInterface import DeepLJsonMapperInterface
from src.emojiHelper.emojiHelper import EmojiHelper
from src.emojiHelper.emojiHelperInterface import EmojiHelperInterface
from src.emojiHelper.emojiRepository import EmojiRepository
from src.emojiHelper.emojiRepositoryInterface import EmojiRepositoryInterface
from src.funtoon.apiService.funtoonApiService import FuntoonApiService
from src.funtoon.apiService.funtoonApiServiceInterface import FuntoonApiServiceInterface
from src.funtoon.funtoonHelper import FuntoonHelper
from src.funtoon.funtoonHelperInterface import FuntoonHelperInterface
from src.funtoon.funtoonUserIdProvider import FuntoonUserIdProvider
from src.funtoon.funtoonUserIdProviderInterface import FuntoonUserIdProviderInterface
from src.funtoon.jsonMapper.funtoonJsonMapper import FuntoonJsonMapper
from src.funtoon.jsonMapper.funtoonJsonMapperInterface import FuntoonJsonMapperInterface
from src.funtoon.tokens.funtoonTokensRepository import FuntoonTokensRepository
from src.funtoon.tokens.funtoonTokensRepositoryInterface import FuntoonTokensRepositoryInterface
from src.google.accessToken.googleApiAccessTokenStorage import GoogleApiAccessTokenStorage
from src.google.accessToken.googleApiAccessTokenStorageInterface import GoogleApiAccessTokenStorageInterface
from src.google.apiService.googleApiService import GoogleApiService
from src.google.apiService.googleApiServiceInterface import GoogleApiServiceInterface
from src.google.jsonMapper.googleJsonMapper import GoogleJsonMapper
from src.google.jsonMapper.googleJsonMapperInterface import GoogleJsonMapperInterface
from src.google.jwtBuilder.googleJwtBuilder import GoogleJwtBuilder
from src.google.jwtBuilder.googleJwtBuilderInterface import GoogleJwtBuilderInterface
from src.jisho.jishoApiService import JishoApiService
from src.jisho.jishoApiServiceInterface import JishoApiServiceInterface
from src.jisho.jishoJsonMapper import JishoJsonMapper
from src.jisho.jishoJsonMapperInterface import JishoJsonMapperInterface
from src.jisho.jishoPresenter import JishoPresenter
from src.jisho.jishoPresenterInterface import JishoPresenterInterface
from src.language.jishoHelper import JishoHelper
from src.language.jishoHelperInterface import JishoHelperInterface
from src.language.jsonMapper.languageEntryJsonMapper import LanguageEntryJsonMapper
from src.language.jsonMapper.languageEntryJsonMapperInterface import LanguageEntryJsonMapperInterface
from src.language.languagesRepository import LanguagesRepository
from src.language.languagesRepositoryInterface import LanguagesRepositoryInterface
from src.language.translation.deepLTranslationApi import DeepLTranslationApi
from src.language.translation.googleTranslationApi import GoogleTranslationApi
from src.language.translationHelper import TranslationHelper
from src.language.translationHelperInterface import TranslationHelperInterface
from src.language.wordOfTheDay.wordOfTheDayPresenter import WordOfTheDayPresenter
from src.language.wordOfTheDay.wordOfTheDayPresenterInterface import WordOfTheDayPresenterInterface
from src.language.wordOfTheDay.wordOfTheDayRepository import WordOfTheDayRepository
from src.language.wordOfTheDay.wordOfTheDayRepositoryInterface import WordOfTheDayRepositoryInterface
from src.location.locationsRepository import LocationsRepository
from src.location.locationsRepositoryInterface import LocationsRepositoryInterface
from src.location.timeZoneRepository import TimeZoneRepository
from src.location.timeZoneRepositoryInterface import TimeZoneRepositoryInterface
from src.misc.administratorProvider import AdministratorProvider
from src.misc.administratorProviderInterface import AdministratorProviderInterface
from src.misc.authRepository import AuthRepository
from src.misc.backgroundTaskHelper import BackgroundTaskHelper
from src.misc.backgroundTaskHelperInterface import BackgroundTaskHelperInterface
from src.misc.cynanBotUserIdsProvider import CynanBotUserIdsProvider
from src.misc.cynanBotUserIdsProviderInterface import CynanBotUserIdsProviderInterface
from src.misc.generalSettingsRepository import GeneralSettingsRepository
from src.mostRecentChat.mostRecentChatsRepository import MostRecentChatsRepository
from src.mostRecentChat.mostRecentChatsRepositoryInterface import MostRecentChatsRepositoryInterface
from src.network.aioHttp.aioHttpClientProvider import AioHttpClientProvider
from src.network.aioHttp.aioHttpCookieJarProvider import AioHttpCookieJarProvider
from src.network.networkClientProvider import NetworkClientProvider
from src.network.networkClientType import NetworkClientType
from src.network.networkJsonMapper import NetworkJsonMapper
from src.network.networkJsonMapperInterface import NetworkJsonMapperInterface
from src.network.requests.requestsClientProvider import RequestsClientProvider
from src.nightbot.nightbotUserIdProvider import NightbotUserIdProvider
from src.nightbot.nightbotUserIdProviderInterface import NightbotUserIdProviderInterface
from src.openWeather.apiService.openWeatherApiService import OpenWeatherApiService
from src.openWeather.apiService.openWeatherApiServiceInterface import OpenWeatherApiServiceInterface
from src.openWeather.jsonMapper.openWeatherJsonMapper import OpenWeatherJsonMapper
from src.openWeather.jsonMapper.openWeatherJsonMapperInterface import OpenWeatherJsonMapperInterface
from src.pkmn.pokepediaJsonMapper import PokepediaJsonMapper
from src.pkmn.pokepediaJsonMapperInterface import PokepediaJsonMapperInterface
from src.pkmn.pokepediaRepository import PokepediaRepository
from src.pkmn.pokepediaRepositoryInterface import PokepediaRepositoryInterface
from src.puptime.puptimeUserIdProvider import PuptimeUserIdProvider
from src.puptime.puptimeUserIdProviderInterface import PuptimeUserIdProviderInterface
from src.recurringActions.configuration.absRecurringActionsEventHandler import AbsRecurringActionsEventHandler
from src.recurringActions.configuration.recurringActionsEventHandler import RecurringActionsEventHandler
from src.recurringActions.jsonParser.recurringActionsJsonParser import RecurringActionsJsonParser
from src.recurringActions.jsonParser.recurringActionsJsonParserInterface import RecurringActionsJsonParserInterface
from src.recurringActions.mostRecentRecurringActionRepository import MostRecentRecurringActionRepository
from src.recurringActions.mostRecentRecurringActionRepositoryInterface import \
MostRecentRecurringActionRepositoryInterface
from src.recurringActions.recurringActionsHelper import RecurringActionsHelper
from src.recurringActions.recurringActionsHelperInterface import RecurringActionsHelperInterface
from src.recurringActions.recurringActionsMachine import RecurringActionsMachine
from src.recurringActions.recurringActionsMachineInterface import RecurringActionsMachineInterface
from src.recurringActions.recurringActionsRepository import RecurringActionsRepository
from src.recurringActions.recurringActionsRepositoryInterface import RecurringActionsRepositoryInterface
from src.recurringActions.recurringActionsWizard import RecurringActionsWizard
from src.recurringActions.recurringActionsWizardInterface import RecurringActionsWizardInterface
from src.sentMessageLogger.sentMessageLogger import SentMessageLogger
from src.sentMessageLogger.sentMessageLoggerInterface import SentMessageLoggerInterface
from src.seryBot.seryBotUserIdProvider import SeryBotUserIdProvider
from src.seryBot.seryBotUserIdProviderInterface import SeryBotUserIdProviderInterface
from src.soundPlayerManager.soundPlayerManagerProviderInterface import SoundPlayerManagerProviderInterface
from src.soundPlayerManager.soundPlayerRandomizerHelperInterface import SoundPlayerRandomizerHelperInterface
from src.soundPlayerManager.stub.stubSoundPlayerManagerProvider import StubSoundPlayerManagerProvider
from src.soundPlayerManager.stub.stubSoundPlayerRandomizerHelper import StubSoundPlayerRandomizerHelper
from src.starWars.starWarsQuotesRepository import StarWarsQuotesRepository
from src.starWars.starWarsQuotesRepositoryInterface import StarWarsQuotesRepositoryInterface
from src.storage.backingDatabase import BackingDatabase
from src.storage.backingPsqlDatabase import BackingPsqlDatabase
from src.storage.backingSqliteDatabase import BackingSqliteDatabase
from src.storage.databaseType import DatabaseType
from src.storage.jsonFileReader import JsonFileReader
from src.storage.linesFileReader import LinesFileReader
from src.storage.psqlCredentialsProvider import PsqlCredentialsProvider
from src.storage.psqlCredentialsProviderInterface import PsqlCredentialsProviderInterface
from src.storage.storageJsonMapper import StorageJsonMapper
from src.storage.storageJsonMapperInterface import StorageJsonMapperInterface
from src.streamAlertsManager.streamAlertsManagerInterface import StreamAlertsManagerInterface
from src.streamAlertsManager.stub.stubStreamAlertsManager import StubStreamAlertsManager
from src.streamElements.streamElementsUserIdProvider import StreamElementsUserIdProvider
from src.streamElements.streamElementsUserIdProviderInterface import StreamElementsUserIdProviderInterface
from src.streamLabs.streamLabsUserIdProvider import StreamLabsUserIdProvider
from src.streamLabs.streamLabsUserIdProviderInterface import StreamLabsUserIdProviderInterface
from src.tangia.tangiaBotUserIdProvider import TangiaBotUserIdProvider
from src.tangia.tangiaBotUserIdProviderInterface import TangiaBotUserIdProviderInterface
from src.timber.timber import Timber
from src.timber.timberInterface import TimberInterface
from src.timeout.guaranteedTimeoutUsersRepository import GuaranteedTimeoutUsersRepository
from src.timeout.guaranteedTimeoutUsersRepositoryInterface import GuaranteedTimeoutUsersRepositoryInterface
from src.timeout.timeoutActionHelper import TimeoutActionHelper
from src.timeout.timeoutActionHelperInterface import TimeoutActionHelperInterface
from src.timeout.timeoutActionHistoryRepository import TimeoutActionHistoryRepository
from src.timeout.timeoutActionHistoryRepositoryInterface import TimeoutActionHistoryRepositoryInterface
from src.timeout.timeoutActionJsonMapper import TimeoutActionJsonMapper
from src.timeout.timeoutActionJsonMapperInterface import TimeoutActionJsonMapperInterface
from src.timeout.timeoutActionSettingsRepository import TimeoutActionSettingsRepository
from src.timeout.timeoutActionSettingsRepositoryInterface import TimeoutActionSettingsRepositoryInterface
from src.transparent.transparentApiService import TransparentApiService
from src.transparent.transparentApiServiceInterface import TransparentApiServiceInterface
from src.transparent.transparentXmlMapper import TransparentXmlMapper
from src.transparent.transparentXmlMapperInterface import TransparentXmlMapperInterface
from src.trivia.additionalAnswers.additionalTriviaAnswersRepository import AdditionalTriviaAnswersRepository
from src.trivia.additionalAnswers.additionalTriviaAnswersRepositoryInterface import \
AdditionalTriviaAnswersRepositoryInterface
from src.trivia.banned.bannedTriviaGameControllersRepository import BannedTriviaGameControllersRepository
from src.trivia.banned.bannedTriviaGameControllersRepositoryInterface import \
BannedTriviaGameControllersRepositoryInterface
from src.trivia.banned.bannedTriviaIdsRepository import BannedTriviaIdsRepository
from src.trivia.banned.bannedTriviaIdsRepositoryInterface import BannedTriviaIdsRepositoryInterface
from src.trivia.banned.triviaBanHelper import TriviaBanHelper
from src.trivia.banned.triviaBanHelperInterface import TriviaBanHelperInterface
from src.trivia.builder.triviaGameBuilder import TriviaGameBuilder
from src.trivia.builder.triviaGameBuilderInterface import TriviaGameBuilderInterface
from src.trivia.compilers.triviaAnswerCompiler import TriviaAnswerCompiler
from src.trivia.compilers.triviaAnswerCompilerInterface import TriviaAnswerCompilerInterface
from src.trivia.compilers.triviaQuestionCompiler import TriviaQuestionCompiler
from src.trivia.compilers.triviaQuestionCompilerInterface import TriviaQuestionCompilerInterface
from src.trivia.configuration.absTriviaEventHandler import AbsTriviaEventHandler
from src.trivia.configuration.triviaEventHandler import TriviaEventHandler
from src.trivia.content.triviaContentScanner import TriviaContentScanner
from src.trivia.content.triviaContentScannerInterface import TriviaContentScannerInterface
from src.trivia.emotes.triviaEmoteGenerator import TriviaEmoteGenerator
from src.trivia.emotes.triviaEmoteGeneratorInterface import TriviaEmoteGeneratorInterface
from src.trivia.emotes.triviaEmoteRepository import TriviaEmoteRepository
from src.trivia.emotes.triviaEmoteRepositoryInterface import TriviaEmoteRepositoryInterface
from src.trivia.emotes.twitch.triviaTwitchEmoteHelper import TriviaTwitchEmoteHelper
from src.trivia.emotes.twitch.triviaTwitchEmoteHelperInterface import TriviaTwitchEmoteHelperInterface
from src.trivia.gameController.triviaGameControllersRepository import TriviaGameControllersRepository
from src.trivia.gameController.triviaGameControllersRepositoryInterface import TriviaGameControllersRepositoryInterface
from src.trivia.gameController.triviaGameGlobalControllersRepository import TriviaGameGlobalControllersRepository
from src.trivia.gameController.triviaGameGlobalControllersRepositoryInterface import \
TriviaGameGlobalControllersRepositoryInterface
from src.trivia.games.queuedTriviaGameStore import QueuedTriviaGameStore
from src.trivia.games.triviaGameStore import TriviaGameStore
from src.trivia.games.triviaGameStoreInterface import TriviaGameStoreInterface
from src.trivia.misc.triviaDifficultyParser import TriviaDifficultyParser
from src.trivia.misc.triviaDifficultyParserInterface import TriviaDifficultyParserInterface
from src.trivia.misc.triviaQuestionTypeParser import TriviaQuestionTypeParser
from src.trivia.misc.triviaQuestionTypeParserInterface import TriviaQuestionTypeParserInterface
from src.trivia.score.triviaScoreRepository import TriviaScoreRepository
from src.trivia.score.triviaScoreRepositoryInterface import TriviaScoreRepositoryInterface
from src.trivia.scraper.triviaScraper import TriviaScraper
from src.trivia.scraper.triviaScraperInterface import TriviaScraperInterface
from src.trivia.specialStatus.shinyTriviaHelper import ShinyTriviaHelper
from src.trivia.specialStatus.shinyTriviaOccurencesRepository import ShinyTriviaOccurencesRepository
from src.trivia.specialStatus.shinyTriviaOccurencesRepositoryInterface import ShinyTriviaOccurencesRepositoryInterface
from src.trivia.specialStatus.toxicTriviaHelper import ToxicTriviaHelper
from src.trivia.specialStatus.toxicTriviaOccurencesRepository import ToxicTriviaOccurencesRepository
from src.trivia.specialStatus.toxicTriviaOccurencesRepositoryInterface import ToxicTriviaOccurencesRepositoryInterface
from src.trivia.superTriviaCooldownHelper import SuperTriviaCooldownHelper
from src.trivia.triviaAnswerChecker import TriviaAnswerChecker
from src.trivia.triviaGameMachine import TriviaGameMachine
from src.trivia.triviaGameMachineInterface import TriviaGameMachineInterface
from src.trivia.triviaHistoryRepository import TriviaHistoryRepository
from src.trivia.triviaHistoryRepositoryInterface import TriviaHistoryRepositoryInterface
from src.trivia.triviaIdGenerator import TriviaIdGenerator
from src.trivia.triviaIdGeneratorInterface import TriviaIdGeneratorInterface
from src.trivia.triviaQuestionPresenter import TriviaQuestionPresenter
from src.trivia.triviaQuestionPresenterInterface import TriviaQuestionPresenterInterface
from src.trivia.triviaRepositories.bongo.bongoApiService import BongoApiService
from src.trivia.triviaRepositories.bongo.bongoApiServiceInterface import BongoApiServiceInterface
from src.trivia.triviaRepositories.bongo.bongoJsonParser import BongoJsonParser
from src.trivia.triviaRepositories.bongo.bongoJsonParserInterface import BongoJsonParserInterface
from src.trivia.triviaRepositories.bongoTriviaQuestionRepository import BongoTriviaQuestionRepository
from src.trivia.triviaRepositories.funtoonTriviaQuestionRepository import FuntoonTriviaQuestionRepository
from src.trivia.triviaRepositories.glacialTriviaQuestionRepository import GlacialTriviaQuestionRepository
from src.trivia.triviaRepositories.glacialTriviaQuestionRepositoryInterface import \
GlacialTriviaQuestionRepositoryInterface
from src.trivia.triviaRepositories.jServiceTriviaQuestionRepository import JServiceTriviaQuestionRepository
from src.trivia.triviaRepositories.lordOfTheRings.lotrDatabaseQuestionStorage import LotrDatabaseQuestionStorage
from src.trivia.triviaRepositories.lordOfTheRings.lotrDatabaseQuestionStorageInterface import \
LotrDatabaseQuestionStorageInterface
from src.trivia.triviaRepositories.lotrTriviaQuestionsRepository import LotrTriviaQuestionRepository
from src.trivia.triviaRepositories.millionaire.millionaireTriviaQuestionStorage import MillionaireTriviaQuestionStorage
from src.trivia.triviaRepositories.millionaire.millionaireTriviaQuestionStorageInterface import \
MillionaireTriviaQuestionStorageInterface
from src.trivia.triviaRepositories.millionaireTriviaQuestionRepository import MillionaireTriviaQuestionRepository
from src.trivia.triviaRepositories.openTriviaDatabase.openTriviaDatabaseApiService import OpenTriviaDatabaseApiService
from src.trivia.triviaRepositories.openTriviaDatabase.openTriviaDatabaseApiServiceInterface import \
OpenTriviaDatabaseApiServiceInterface
from src.trivia.triviaRepositories.openTriviaDatabase.openTriviaDatabaseJsonParser import OpenTriviaDatabaseJsonParser
from src.trivia.triviaRepositories.openTriviaDatabase.openTriviaDatabaseJsonParserInterface import \
OpenTriviaDatabaseJsonParserInterface
from src.trivia.triviaRepositories.openTriviaDatabase.openTriviaDatabaseQuestionFetcher import \
OpenTriviaDatabaseQuestionFetcher
from src.trivia.triviaRepositories.openTriviaDatabase.openTriviaDatabaseQuestionFetcherInterface import \
OpenTriviaDatabaseQuestionFetcherInterface
from src.trivia.triviaRepositories.openTriviaDatabase.openTriviaDatabaseSessionTokenRepository import \
OpenTriviaDatabaseSessionTokenRepository
from src.trivia.triviaRepositories.openTriviaDatabase.openTriviaDatabaseSessionTokenRepositoryInterface import \
OpenTriviaDatabaseSessionTokenRepositoryInterface
from src.trivia.triviaRepositories.openTriviaDatabaseTriviaQuestionRepository import \
OpenTriviaDatabaseTriviaQuestionRepository
from src.trivia.triviaRepositories.openTriviaQa.openTriviaQaQuestionStorage import OpenTriviaQaQuestionStorage
from src.trivia.triviaRepositories.openTriviaQa.openTriviaQaQuestionStorageInterface import \
OpenTriviaQaQuestionStorageInterface
from src.trivia.triviaRepositories.openTriviaQa.openTriviaQaQuestionTypeParser import OpenTriviaQaQuestionTypeParser
from src.trivia.triviaRepositories.openTriviaQa.openTriviaQaQuestionTypeParserInterface import \
OpenTriviaQaQuestionTypeParserInterface
from src.trivia.triviaRepositories.openTriviaQaTriviaQuestionRepository import OpenTriviaQaTriviaQuestionRepository
from src.trivia.triviaRepositories.pkmnTriviaQuestionRepository import PkmnTriviaQuestionRepository
from src.trivia.triviaRepositories.quizApiTriviaQuestionRepository import QuizApiTriviaQuestionRepository
from src.trivia.triviaRepositories.triviaDatabase.triviaDatabaseQuestionStorage import TriviaDatabaseQuestionStorage
from src.trivia.triviaRepositories.triviaDatabase.triviaDatabaseQuestionStorageInterface import \
TriviaDatabaseQuestionStorageInterface
from src.trivia.triviaRepositories.triviaDatabaseTriviaQuestionRepository import TriviaDatabaseTriviaQuestionRepository
from src.trivia.triviaRepositories.triviaQuestionCompanyTriviaQuestionRepository import \
TriviaQuestionCompanyTriviaQuestionRepository
from src.trivia.triviaRepositories.triviaRepository import TriviaRepository
from src.trivia.triviaRepositories.triviaRepositoryInterface import TriviaRepositoryInterface
from src.trivia.triviaRepositories.willFry.willFryTriviaApiService import WillFryTriviaApiService
from src.trivia.triviaRepositories.willFry.willFryTriviaApiServiceInterface import WillFryTriviaApiServiceInterface
from src.trivia.triviaRepositories.willFry.willFryTriviaJsonParser import WillFryTriviaJsonParser
from src.trivia.triviaRepositories.willFry.willFryTriviaJsonParserInterface import WillFryTriviaJsonParserInterface
from src.trivia.triviaRepositories.willFryTriviaQuestionRepository import WillFryTriviaQuestionRepository
from src.trivia.triviaRepositories.wwtbamTriviaQuestionRepository import WwtbamTriviaQuestionRepository
from src.trivia.triviaSettingsRepository import TriviaSettingsRepository
from src.trivia.triviaSettingsRepositoryInterface import TriviaSettingsRepositoryInterface
from src.trivia.triviaSourceInstabilityHelper import TriviaSourceInstabilityHelper
from src.trivia.triviaUtils import TriviaUtils
from src.trivia.triviaUtilsInterface import TriviaUtilsInterface
from src.trivia.triviaVerifier import TriviaVerifier
from src.trivia.triviaVerifierInterface import TriviaVerifierInterface
from src.trollmoji.trollmojiHelper import TrollmojiHelper
from src.trollmoji.trollmojiHelperInterface import TrollmojiHelperInterface
from src.trollmoji.trollmojiSettingsRepository import TrollmojiSettingsRepository
from src.trollmoji.trollmojiSettingsRepositoryInterface import TrollmojiSettingsRepositoryInterface
from src.tts.compositeTtsManagerInterface import CompositeTtsManagerInterface
from src.tts.stub.stubCompositeTtsManager import StubCompositeTtsManager
from src.tts.ttsJsonMapper import TtsJsonMapper
from src.tts.ttsJsonMapperInterface import TtsJsonMapperInterface
from src.twitch.absTwitchCheerHandler import AbsTwitchCheerHandler
from src.twitch.absTwitchFollowHandler import AbsTwitchFollowHandler
from src.twitch.absTwitchPollHandler import AbsTwitchPollHandler
from src.twitch.absTwitchPredictionHandler import AbsTwitchPredictionHandler
from src.twitch.absTwitchRaidHandler import AbsTwitchRaidHandler
from src.twitch.absTwitchSubscriptionHandler import AbsTwitchSubscriptionHandler
from src.twitch.activeChatters.activeChattersRepository import ActiveChattersRepository
from src.twitch.activeChatters.activeChattersRepositoryInterface import ActiveChattersRepositoryInterface
from src.twitch.api.jsonMapper.twitchJsonMapper import TwitchJsonMapper
from src.twitch.api.jsonMapper.twitchJsonMapperInterface import TwitchJsonMapperInterface
from src.twitch.api.twitchApiService import TwitchApiService
from src.twitch.api.twitchApiServiceInterface import TwitchApiServiceInterface
from src.twitch.channelEditors.twitchChannelEditorsRepository import TwitchChannelEditorsRepository
from src.twitch.channelEditors.twitchChannelEditorsRepositoryInterface import TwitchChannelEditorsRepositoryInterface
from src.twitch.configuration.twitchChannelJoinHelper import TwitchChannelJoinHelper
from src.twitch.configuration.twitchCheerHandler import TwitchCheerHandler
from src.twitch.configuration.twitchConfiguration import TwitchConfiguration
from src.twitch.configuration.twitchFollowHandler import TwitchFollowHandler
from src.twitch.configuration.twitchIo.twitchIoConfiguration import TwitchIoConfiguration
from src.twitch.configuration.twitchPollHandler import TwitchPollHandler
from src.twitch.configuration.twitchPredictionHandler import TwitchPredictionHandler
from src.twitch.configuration.twitchRaidHandler import TwitchRaidHandler
from src.twitch.configuration.twitchSubscriptionHandler import TwitchSubscriptionHandler
from src.twitch.emotes.twitchEmotesHelper import TwitchEmotesHelper
from src.twitch.emotes.twitchEmotesHelperInterface import TwitchEmotesHelperInterface
from src.twitch.followingStatus.twitchFollowingStatusRepository import TwitchFollowingStatusRepository
from src.twitch.followingStatus.twitchFollowingStatusRepositoryInterface import \
TwitchFollowingStatusRepositoryInterface
from src.twitch.friends.twitchFriendsUserIdRepository import TwitchFriendsUserIdRepository
from src.twitch.friends.twitchFriendsUserIdRepositoryInterface import TwitchFriendsUserIdRepositoryInterface
from src.twitch.isLive.isLiveOnTwitchRepository import IsLiveOnTwitchRepository
from src.twitch.isLive.isLiveOnTwitchRepositoryInterface import IsLiveOnTwitchRepositoryInterface
from src.twitch.officialAccounts.officialTwitchAccountUserIdProvider import OfficialTwitchAccountUserIdProvider
from src.twitch.officialAccounts.officialTwitchAccountUserIdProviderInterface import \
OfficialTwitchAccountUserIdProviderInterface
from src.twitch.timeout.timeoutImmuneUserIdsRepository import TimeoutImmuneUserIdsRepository
from src.twitch.timeout.timeoutImmuneUserIdsRepositoryInterface import TimeoutImmuneUserIdsRepositoryInterface
from src.twitch.timeout.twitchTimeoutHelper import TwitchTimeoutHelper
from src.twitch.timeout.twitchTimeoutHelperInterface import TwitchTimeoutHelperInterface
from src.twitch.timeout.twitchTimeoutRemodHelper import TwitchTimeoutRemodHelper
from src.twitch.timeout.twitchTimeoutRemodHelperInterface import TwitchTimeoutRemodHelperInterface
from src.twitch.timeout.twitchTimeoutRemodRepository import TwitchTimeoutRemodRepository
from src.twitch.timeout.twitchTimeoutRemodRepositoryInterface import TwitchTimeoutRemodRepositoryInterface
from src.twitch.tokens.twitchTokensRepository import TwitchTokensRepository
from src.twitch.tokens.twitchTokensRepositoryInterface import TwitchTokensRepositoryInterface
from src.twitch.tokens.twitchTokensUtils import TwitchTokensUtils
from src.twitch.tokens.twitchTokensUtilsInterface import TwitchTokensUtilsInterface
from src.twitch.twitchChannelJoinHelperInterface import TwitchChannelJoinHelperInterface
from src.twitch.twitchMessageStringUtils import TwitchMessageStringUtils
from src.twitch.twitchMessageStringUtilsInterface import TwitchMessageStringUtilsInterface
from src.twitch.twitchPredictionWebsocketUtils import TwitchPredictionWebsocketUtils
from src.twitch.twitchPredictionWebsocketUtilsInterface import TwitchPredictionWebsocketUtilsInterface
from src.twitch.twitchUtils import TwitchUtils
from src.twitch.twitchUtilsInterface import TwitchUtilsInterface
from src.twitch.websocket.twitchWebsocketAllowedUsersRepository import TwitchWebsocketAllowedUsersRepository
from src.twitch.websocket.twitchWebsocketAllowedUsersRepositoryInterface import \
TwitchWebsocketAllowedUsersRepositoryInterface
from src.twitch.websocket.twitchWebsocketClient import TwitchWebsocketClient
from src.twitch.websocket.twitchWebsocketClientInterface import TwitchWebsocketClientInterface
from src.twitch.websocket.twitchWebsocketInstabilityHelper import TwitchWebsocketInstabilityHelper
from src.twitch.websocket.twitchWebsocketJsonMapper import TwitchWebsocketJsonMapper
from src.twitch.websocket.twitchWebsocketJsonMapperInterface import TwitchWebsocketJsonMapperInterface
from src.twitch.websocket.twitchWebsocketUrlHelper import TwitchWebsocketUrlHelper
from src.users.addOrRemoveUserDataHelper import AddOrRemoveUserDataHelper
from src.users.addOrRemoveUserDataHelperInterface import AddOrRemoveUserDataHelperInterface
from src.users.chatSoundAlert.chatSoundAlertJsonParserInterface import ChatSoundAlertJsonParserInterface
from src.users.chatSoundAlert.stub.stubChatSoundAlertJsonParser import StubChatSoundAlertJsonParser
from src.users.crowdControl.crowdControlJsonParser import CrowdControlJsonParser
from src.users.crowdControl.crowdControlJsonParserInterface import CrowdControlJsonParserInterface
from src.users.cuteness.cutenessBoosterPackJsonParser import CutenessBoosterPackJsonParser
from src.users.cuteness.cutenessBoosterPackJsonParserInterface import CutenessBoosterPackJsonParserInterface
from src.users.decTalkSongs.decTalkSongBoosterPackParser import DecTalkSongBoosterPackParser
from src.users.decTalkSongs.decTalkSongBoosterPackParserInterface import DecTalkSongBoosterPackParserInterface
from src.users.pkmn.pkmnBoosterPackJsonParser import PkmnBoosterPackJsonParser
from src.users.pkmn.pkmnBoosterPackJsonParserInterface import PkmnBoosterPackJsonParserInterface
from src.users.soundAlert.soundAlertRedemptionJsonParserInterface import SoundAlertRedemptionJsonParserInterface
from src.users.soundAlert.stub.stubSoundAlertRedemptionJsonParser import StubSoundAlertRedemptionJsonParser
from src.users.timeout.timeoutBoosterPackJsonParser import TimeoutBoosterPackJsonParser
from src.users.timeout.timeoutBoosterPackJsonParserInterface import TimeoutBoosterPackJsonParserInterface
from src.users.tts.stub.stubTtsBoosterPackParser import StubTtsBoosterPackParser
from src.users.tts.stub.stubTtsChatterBoosterPackParser import StubTtsChatterBoosterPackParser
from src.users.tts.ttsBoosterPackParserInterface import TtsBoosterPackParserInterface
from src.users.ttsChatters.ttsChatterBoosterPackParserInterface import TtsChatterBoosterPackParserInterface
from src.users.userIdsRepository import UserIdsRepository
from src.users.userIdsRepositoryInterface import UserIdsRepositoryInterface
from src.users.usersRepository import UsersRepository
from src.users.usersRepositoryInterface import UsersRepositoryInterface
from src.weather.weatherReportPresenter import WeatherReportPresenter
from src.weather.weatherReportPresenterInterface import WeatherReportPresenterInterface
from src.weather.weatherRepository import WeatherRepository
from src.weather.weatherRepositoryInterface import WeatherRepositoryInterface
from src.websocketConnection.stub.stubWebsocketConnectionServer import StubWebsocketConnectionServer
from src.websocketConnection.websocketConnectionServerInterface import WebsocketConnectionServerInterface
# Uncomment this chunk to turn on extra extra debug logging
# logging.basicConfig(
# filename = 'generalLogging.log',
# level = logging.DEBUG
# )
locale.setlocale(locale.LC_ALL, 'en_US.utf8')
#################################
## Core initialization section ##
#################################
eventLoop: AbstractEventLoop = asyncio.new_event_loop()
asyncio.set_event_loop(eventLoop)
backgroundTaskHelper: BackgroundTaskHelperInterface = BackgroundTaskHelper(
eventLoop = eventLoop
)
timeZoneRepository: TimeZoneRepositoryInterface = TimeZoneRepository()
timber: TimberInterface = Timber(
backgroundTaskHelper = backgroundTaskHelper,
timeZoneRepository = timeZoneRepository
)
networkJsonMapper: NetworkJsonMapperInterface = NetworkJsonMapper()
storageJsonMapper: StorageJsonMapperInterface = StorageJsonMapper()
generalSettingsRepository = GeneralSettingsRepository(
settingsJsonReader = JsonFileReader('../config/generalSettingsRepository.json'),
networkJsonMapper = networkJsonMapper,
storageJsonMapper = storageJsonMapper
)
generalSettingsSnapshot = generalSettingsRepository.getAll()
backingDatabase: BackingDatabase
psqlCredentialsProvider: PsqlCredentialsProviderInterface | None = None
match generalSettingsSnapshot.requireDatabaseType():
case DatabaseType.POSTGRESQL:
psqlCredentialsProvider = PsqlCredentialsProvider(
credentialsJsonReader = JsonFileReader('../config/psqlCredentials.json')
)
backingDatabase = BackingPsqlDatabase(
eventLoop = eventLoop,
psqlCredentialsProvider = psqlCredentialsProvider,
timber = timber
)
case DatabaseType.SQLITE:
backingDatabase = BackingSqliteDatabase(
eventLoop = eventLoop
)
case _:
raise RuntimeError(f'Unknown/misconfigured DatabaseType: \"{generalSettingsSnapshot.requireDatabaseType()}\"')
networkClientProvider: NetworkClientProvider
match generalSettingsSnapshot.requireNetworkClientType():
case NetworkClientType.AIOHTTP:
aioHttpCookieJarProvider = AioHttpCookieJarProvider(
eventLoop = eventLoop
)
networkClientProvider = AioHttpClientProvider(
eventLoop = eventLoop,
cookieJarProvider = aioHttpCookieJarProvider,
timber = timber
)
case NetworkClientType.REQUESTS:
networkClientProvider = RequestsClientProvider(
timber = timber
)
case _:
raise RuntimeError(f'Unknown/misconfigured NetworkClientType: \"{generalSettingsSnapshot.requireNetworkClientType()}\"')
authRepository = AuthRepository(
authJsonReader = JsonFileReader('../config/authRepository.json')
)
twitchJsonMapper: TwitchJsonMapperInterface = TwitchJsonMapper(
timber = timber,
timeZoneRepository = timeZoneRepository
)
twitchWebsocketJsonMapper: TwitchWebsocketJsonMapperInterface = TwitchWebsocketJsonMapper(
timber = timber,
twitchJsonMapper = twitchJsonMapper
)
twitchApiService: TwitchApiServiceInterface = TwitchApiService(
networkClientProvider = networkClientProvider,
timber = timber,
timeZoneRepository = timeZoneRepository,
twitchCredentialsProvider = authRepository,
twitchJsonMapper = twitchJsonMapper
)
officialTwitchAccountUserIdProvider: OfficialTwitchAccountUserIdProviderInterface = OfficialTwitchAccountUserIdProvider()
userIdsRepository: UserIdsRepositoryInterface = UserIdsRepository(
backingDatabase = backingDatabase,
timber = timber,
twitchApiService = twitchApiService
)
twitchTokensRepository: TwitchTokensRepositoryInterface = TwitchTokensRepository(
backgroundTaskHelper = backgroundTaskHelper,
backingDatabase = backingDatabase,
timber = timber,
timeZoneRepository = timeZoneRepository,
twitchApiService = twitchApiService,
userIdsRepository = userIdsRepository,
seedFileReader = JsonFileReader('../config/twitchTokensRepositorySeedFile.json')
)
administratorProvider: AdministratorProviderInterface = AdministratorProvider(
generalSettingsRepository = generalSettingsRepository,
twitchTokensRepository = twitchTokensRepository,
userIdsRepository = userIdsRepository
)
bannedWordsRepository: BannedWordsRepositoryInterface = BannedWordsRepository(
bannedWordsLinesReader = LinesFileReader('bannedWords.txt'),
timber = timber
)
contentScanner: ContentScannerInterface = ContentScanner(
bannedWordsRepository = bannedWordsRepository,
timber = timber
)
twitchTokensUtils: TwitchTokensUtilsInterface = TwitchTokensUtils(
administratorProvider = administratorProvider,
twitchTokensRepository = twitchTokensRepository
)
twitchEmotesHelper: TwitchEmotesHelperInterface = TwitchEmotesHelper(
timber = timber,
twitchApiService = twitchApiService,
twitchHandleProvider = authRepository,
twitchTokensRepository = twitchTokensRepository,
userIdsRepository = userIdsRepository
)
twitchFollowingStatusRepository: TwitchFollowingStatusRepositoryInterface = TwitchFollowingStatusRepository(
backingDatabase = backingDatabase,
timber = timber,
twitchApiService = twitchApiService,
userIdsRepository = userIdsRepository
)
chatSoundAlertJsonParser: ChatSoundAlertJsonParserInterface = StubChatSoundAlertJsonParser()
crowdControlJsonParser: CrowdControlJsonParserInterface = CrowdControlJsonParser()
cutenessBoosterPackJsonParser: CutenessBoosterPackJsonParserInterface = CutenessBoosterPackJsonParser()
decTalkSongBoosterPackParser: DecTalkSongBoosterPackParserInterface = DecTalkSongBoosterPackParser()
languageEntryJsonMapper: LanguageEntryJsonMapperInterface = LanguageEntryJsonMapper()
pkmnBoosterPackJsonParser: PkmnBoosterPackJsonParserInterface = PkmnBoosterPackJsonParser(
timber = timber
)
soundAlertRedemptionJsonParser: SoundAlertRedemptionJsonParserInterface = StubSoundAlertRedemptionJsonParser()
timeoutBoosterPackJsonParser: TimeoutBoosterPackJsonParserInterface = TimeoutBoosterPackJsonParser()
ttsJsonMapper: TtsJsonMapperInterface = TtsJsonMapper(
timber = timber
)
ttsBoosterPackParser: TtsBoosterPackParserInterface = StubTtsBoosterPackParser()
ttsChatterBoosterPackParser: TtsChatterBoosterPackParserInterface = StubTtsChatterBoosterPackParser()
usersRepository: UsersRepositoryInterface = UsersRepository(
chatSoundAlertJsonParser = chatSoundAlertJsonParser,
crowdControlJsonParser = crowdControlJsonParser,
cutenessBoosterPackJsonParser = cutenessBoosterPackJsonParser,
decTalkSongBoosterPackParser = decTalkSongBoosterPackParser,
languageEntryJsonMapper = languageEntryJsonMapper,
pkmnBoosterPackJsonParser = pkmnBoosterPackJsonParser,
soundAlertRedemptionJsonParser = soundAlertRedemptionJsonParser,
timber = timber,
timeoutBoosterPackJsonParser = timeoutBoosterPackJsonParser,
timeZoneRepository = timeZoneRepository,
ttsBoosterPackParser = ttsBoosterPackParser,
ttsChatterBoosterPackParser = ttsChatterBoosterPackParser,
ttsJsonMapper = ttsJsonMapper
)
twitchChannelJoinHelper: TwitchChannelJoinHelperInterface = TwitchChannelJoinHelper(
backgroundTaskHelper = backgroundTaskHelper,
verified = True,
timber = timber,
usersRepository = usersRepository
)
twitchPredictionWebsocketUtils: TwitchPredictionWebsocketUtilsInterface = TwitchPredictionWebsocketUtils()
addOrRemoveUserDataHelper: AddOrRemoveUserDataHelperInterface = AddOrRemoveUserDataHelper(
timber = timber,
timeZoneRepository = timeZoneRepository
)
chatLogger: ChatLoggerInterface = ChatLogger(
backgroundTaskHelper = backgroundTaskHelper,
timber = timber,
timeZoneRepository = timeZoneRepository
)
activeChattersRepository: ActiveChattersRepositoryInterface = ActiveChattersRepository(
timeZoneRepository = timeZoneRepository
)
#####################################
## CynanBot initialization section ##
#####################################
cynanBotUserIdsProvider: CynanBotUserIdsProviderInterface = CynanBotUserIdsProvider()
twitchFriendsUserIdRepository: TwitchFriendsUserIdRepositoryInterface = TwitchFriendsUserIdRepository()
#####################################
## Cuteness initialization section ##
#####################################
cutenessPresenter: CutenessPresenterInterface = CutenessPresenter()
cutenessRepository: CutenessRepositoryInterface = CutenessRepository(
backingDatabase = backingDatabase,
userIdsRepository = userIdsRepository
)
cutenessUtils: CutenessUtilsInterface = CutenessUtils()
#####################################
## Nightbot initialization section ##
#####################################
nightbotUserIdProvider: NightbotUserIdProviderInterface = NightbotUserIdProvider()
###################################
## Tangia initialization section ##
###################################
tangiaBotUserIdProvider: TangiaBotUserIdProviderInterface = TangiaBotUserIdProvider()
######################################
## Trollmoji initialization section ##
######################################
trollmojiSettingsRepository: TrollmojiSettingsRepositoryInterface = TrollmojiSettingsRepository(
twitchFriendsUserIdRepository = twitchFriendsUserIdRepository
)
trollmojiHelper: TrollmojiHelperInterface = TrollmojiHelper(
timber = timber,
timeZoneRepository = timeZoneRepository,
trollmojiSettingsRepository = trollmojiSettingsRepository,
twitchEmotesHelper = twitchEmotesHelper
)
####################################
## Funtoon initialization section ##
####################################
funtoonUserIdProvider: FuntoonUserIdProviderInterface = FuntoonUserIdProvider()
funtoonTokensRepository: FuntoonTokensRepositoryInterface = FuntoonTokensRepository(
backingDatabase = backingDatabase,
timber = timber,
userIdsRepository = userIdsRepository,
seedFileReader = JsonFileReader('../config/funtoonTokensRepositorySeedFile.json')
)
funtoonJsonMapper: FuntoonJsonMapperInterface = FuntoonJsonMapper()
funtoonApiService: FuntoonApiServiceInterface = FuntoonApiService(
funtoonJsonMapper = funtoonJsonMapper,
networkClientProvider = networkClientProvider,
timber = timber
)
funtoonHelper: FuntoonHelperInterface = FuntoonHelper(
funtoonApiService = funtoonApiService,
funtoonJsonMapper = funtoonJsonMapper,
funtoonTokensRepository = funtoonTokensRepository,
timber = timber
)
emojiRepository: EmojiRepositoryInterface = EmojiRepository(
emojiJsonReader = JsonFileReader('emojiRepository.json'),
timber = timber
)
emojiHelper: EmojiHelperInterface = EmojiHelper(
emojiRepository = emojiRepository
)
isLiveOnTwitchRepository: IsLiveOnTwitchRepositoryInterface = IsLiveOnTwitchRepository(
administratorProvider = administratorProvider,
timber = timber,
twitchApiService = twitchApiService,
twitchTokensRepository = twitchTokensRepository
)
twitchChannelEditorsRepository: TwitchChannelEditorsRepositoryInterface = TwitchChannelEditorsRepository(
timber = timber,
timeZoneRepository = timeZoneRepository,
twitchApiService = twitchApiService,
twitchTokensRepository = twitchTokensRepository
)
languagesRepository: LanguagesRepositoryInterface = LanguagesRepository()
locationsRepository: LocationsRepositoryInterface = LocationsRepository(
locationsJsonReader = JsonFileReader('locationsRepository.json'),
timber = timber,
timeZoneRepository = timeZoneRepository
)
mostRecentChatsRepository: MostRecentChatsRepositoryInterface = MostRecentChatsRepository(
backingDatabase = backingDatabase,
timber = timber,
timeZoneRepository = timeZoneRepository
)
pokepediaJsonMapper: PokepediaJsonMapperInterface = PokepediaJsonMapper(
timber = timber
)
pokepediaRepository: PokepediaRepositoryInterface = PokepediaRepository(
networkClientProvider = networkClientProvider,
pokepediaJsonMapper = pokepediaJsonMapper,
timber = timber
)
twitchConfiguration: TwitchConfiguration = TwitchIoConfiguration(
userIdsRepository = userIdsRepository
)
sentMessageLogger: SentMessageLoggerInterface = SentMessageLogger(
backgroundTaskHelper = backgroundTaskHelper,
timber = timber,
timeZoneRepository = timeZoneRepository
)
twitchTimeoutRemodRepository: TwitchTimeoutRemodRepositoryInterface = TwitchTimeoutRemodRepository(
backingDatabase = backingDatabase,
timber = timber,
timeZoneRepository = timeZoneRepository
)
twitchTimeoutRemodHelper: TwitchTimeoutRemodHelperInterface = TwitchTimeoutRemodHelper(
backgroundTaskHelper = backgroundTaskHelper,
timber = timber,
timeZoneRepository = timeZoneRepository,
twitchApiService = twitchApiService,
twitchTimeoutRemodRepository = twitchTimeoutRemodRepository,
twitchTokensRepository = twitchTokensRepository,
userIdsRepository = userIdsRepository
)
twitchMessageStringUtils: TwitchMessageStringUtilsInterface = TwitchMessageStringUtils()
twitchUtils: TwitchUtilsInterface = TwitchUtils(
backgroundTaskHelper = backgroundTaskHelper,
generalSettingsRepository = generalSettingsRepository,
sentMessageLogger = sentMessageLogger,
timber = timber,
timeZoneRepository = timeZoneRepository,
twitchApiService = twitchApiService,
twitchHandleProvider = authRepository,
twitchTokensRepository = twitchTokensRepository,
userIdsRepository = userIdsRepository
)
puptimeUserIdProvider: PuptimeUserIdProviderInterface = PuptimeUserIdProvider()
seryBotUserIdProvider: SeryBotUserIdProviderInterface = SeryBotUserIdProvider()
streamElementsUserIdProvider: StreamElementsUserIdProviderInterface = StreamElementsUserIdProvider()
streamLabsUserIdProvider: StreamLabsUserIdProviderInterface = StreamLabsUserIdProvider()
timeoutImmuneUserIdsRepository: TimeoutImmuneUserIdsRepositoryInterface = TimeoutImmuneUserIdsRepository(
cynanBotUserIdsProvider = cynanBotUserIdsProvider,
funtoonUserIdProvider = funtoonUserIdProvider,
nightbotUserIdProvider = nightbotUserIdProvider,
officialTwitchAccountUserIdProvider = officialTwitchAccountUserIdProvider,
puptimeUserIdProvider = puptimeUserIdProvider,
seryBotUserIdProvider = seryBotUserIdProvider,
streamElementsUserIdProvider = streamElementsUserIdProvider,
streamLabsUserIdProvider = streamLabsUserIdProvider,
tangiaBotUserIdProvider = tangiaBotUserIdProvider,
twitchFriendsUserIdProvider = twitchFriendsUserIdRepository,
twitchHandleProvider = authRepository,
userIdsRepository = userIdsRepository
)
twitchTimeoutHelper: TwitchTimeoutHelperInterface = TwitchTimeoutHelper(
timber = timber,
timeoutImmuneUserIdsRepository = timeoutImmuneUserIdsRepository,
twitchApiService = twitchApiService,
twitchConstants = twitchUtils,
twitchHandleProvider = authRepository,
twitchTimeoutRemodHelper = twitchTimeoutRemodHelper,
userIdsRepository = userIdsRepository
)
transparentXmlMapper: TransparentXmlMapperInterface = TransparentXmlMapper(
timeZoneRepository = timeZoneRepository
)
transparentApiService: TransparentApiServiceInterface = TransparentApiService(
networkClientProvider = networkClientProvider,
timber = timber,
transparentXmlMapper = transparentXmlMapper
)
wordOfTheDayRepository: WordOfTheDayRepositoryInterface = WordOfTheDayRepository(
timber = timber,
transparentApiService = transparentApiService
)
wordOfTheDayPresenter: WordOfTheDayPresenterInterface = WordOfTheDayPresenter()
deepLJsonMapper: DeepLJsonMapperInterface = DeepLJsonMapper(
languagesRepository = languagesRepository,
timber = timber
)
deepLApiService: DeepLApiServiceInterface = DeepLApiService(
deepLAuthKeyProvider = authRepository,
deepLJsonMapper = deepLJsonMapper,
networkClientProvider = networkClientProvider,
timber = timber
)
deepLTranslationApi = DeepLTranslationApi(
deepLApiService = deepLApiService,
deepLAuthKeyProvider = authRepository,
timber = timber
)
googleApiAccessTokenStorage: GoogleApiAccessTokenStorageInterface = GoogleApiAccessTokenStorage(
timber = timber,
timeZoneRepository = timeZoneRepository
)
googleJsonMapper: GoogleJsonMapperInterface = GoogleJsonMapper(
timber = timber,
timeZoneRepository = timeZoneRepository
)
googleJwtBuilder: GoogleJwtBuilderInterface = GoogleJwtBuilder(
googleCloudCredentialsProvider = authRepository,
googleJsonMapper = googleJsonMapper,
timeZoneRepository = timeZoneRepository
)
googleApiService: GoogleApiServiceInterface = GoogleApiService(
googleApiAccessTokenStorage = googleApiAccessTokenStorage,
googleCloudProjectCredentialsProvider = authRepository,
googleJsonMapper = googleJsonMapper,
googleJwtBuilder = googleJwtBuilder,
networkClientProvider = networkClientProvider,
timber = timber
)
googleTranslationApi = GoogleTranslationApi(
googleApiService = googleApiService,
googleCloudProjectCredentialsProvider = authRepository,
languagesRepository = languagesRepository,
timber = timber
)
translationHelper: TranslationHelperInterface | None = TranslationHelper(
deepLTranslationApi = deepLTranslationApi,
googleTranslationApi = googleTranslationApi,
languagesRepository = languagesRepository,
timber = timber
)
twitchWebsocketAllowedUsersRepository: TwitchWebsocketAllowedUsersRepositoryInterface = TwitchWebsocketAllowedUsersRepository(
timber = timber,
twitchTokensRepository = twitchTokensRepository,
userIdsRepository = userIdsRepository,
usersRepository = usersRepository
)
twitchWebsocketInstabilityHelper: TwitchWebsocketInstabilityHelper = TwitchWebsocketInstabilityHelper(
timber = timber,
timeZoneRepository = timeZoneRepository
)
twitchWebsocketUrlHelper: TwitchWebsocketUrlHelper = TwitchWebsocketUrlHelper(
timber = timber
)
twitchWebsocketClient: TwitchWebsocketClientInterface | None = None
if generalSettingsSnapshot.isEventSubEnabled():
twitchWebsocketClient = TwitchWebsocketClient(
backgroundTaskHelper = backgroundTaskHelper,
timber = timber,
timeZoneRepository = timeZoneRepository,
twitchApiService = twitchApiService,
twitchTokensRepository = twitchTokensRepository,
twitchWebsocketAllowedUsersRepository = twitchWebsocketAllowedUsersRepository,
twitchWebsocketInstabilityHelper = twitchWebsocketInstabilityHelper,
twitchWebsocketJsonMapper = twitchWebsocketJsonMapper,
twitchWebsocketUrlHelper = twitchWebsocketUrlHelper
)
####################################
## Weather initialization section ##
####################################
openWeatherJsonMapper: OpenWeatherJsonMapperInterface = OpenWeatherJsonMapper(
timber = timber,
timeZoneRepository = timeZoneRepository
)
openWeatherApiService: OpenWeatherApiServiceInterface = OpenWeatherApiService(
networkClientProvider = networkClientProvider,
openWeatherApiKeyProvider = authRepository,
openWeatherJsonMapper = openWeatherJsonMapper,
timber = timber
)
weatherReportPresenter: WeatherReportPresenterInterface = WeatherReportPresenter()
weatherRepository: WeatherRepositoryInterface = WeatherRepository(
openWeatherApiKeyProvider = authRepository,
openWeatherApiService = openWeatherApiService,
timber = timber
)
###################################
## Trivia initialization section ##
###################################
shinyTriviaOccurencesRepository: ShinyTriviaOccurencesRepositoryInterface = ShinyTriviaOccurencesRepository(
backingDatabase = backingDatabase,
timeZoneRepository = timeZoneRepository
)
toxicTriviaOccurencesRepository: ToxicTriviaOccurencesRepositoryInterface = ToxicTriviaOccurencesRepository(
backingDatabase = backingDatabase,
timeZoneRepository = timeZoneRepository
)
triviaSettingsRepository: TriviaSettingsRepositoryInterface = TriviaSettingsRepository(
settingsJsonReader = JsonFileReader('triviaSettingsRepository.json')
)
triviaAnswerCompiler: TriviaAnswerCompilerInterface = TriviaAnswerCompiler(
timber = timber
)
triviaQuestionCompiler: TriviaQuestionCompilerInterface = TriviaQuestionCompiler(
timber = timber
)
triviaIdGenerator: TriviaIdGeneratorInterface = TriviaIdGenerator()