|
1 | | -import { AppDataSource } from '~/database'; |
2 | | -import { isStreamOnline, stats } from '~/helpers/api'; |
3 | | -import { attributesReplace } from '~/helpers/attributesReplace'; |
4 | | -import { |
5 | | - announceTypes, getOwner, getUserSender, isUUID, prepare, |
6 | | -} from '~/helpers/commons'; |
7 | | -import { isBotStarted, isDbConnected } from '~/helpers/database'; |
8 | | -import { debounce } from '~/helpers/debounce'; |
9 | | - |
10 | 1 | import { DiscordLink } from '@entity/discord'; |
11 | | - |
12 | | -import { eventEmitter } from '~/helpers/events'; |
13 | | - |
14 | 2 | import { Events } from '@entity/event'; |
15 | | - |
16 | | -import { |
17 | | - chatIn, chatOut, debug, error, info, warning, whisperOut, |
18 | | -} from '~/helpers/log'; |
19 | | - |
20 | 3 | import { Permissions as PermissionsEntity } from '@entity/permissions'; |
21 | | - |
22 | | -import { check } from '~/helpers/permissions/check'; |
23 | | - |
24 | 4 | import { User } from '@entity/user'; |
25 | 5 |
|
26 | | -import { get as getPermission } from '~/helpers/permissions/get'; |
27 | | - |
28 | 6 | import { HOUR, MINUTE } from '@sogebot/ui-helpers/constants'; |
29 | 7 |
|
30 | | -import { adminEndpoint } from '~/helpers/socket'; |
31 | | - |
32 | 8 | import { dayjs, timezone } from '@sogebot/ui-helpers/dayjsHelper'; |
33 | 9 |
|
34 | 10 | import * as changelog from '~/helpers/user/changelog.js'; |
@@ -56,6 +32,21 @@ import Expects from '../expects'; |
56 | 32 | import { Message } from '../message'; |
57 | 33 | import Parser from '../parser'; |
58 | 34 | import users from '../users'; |
| 35 | +import { AppDataSource } from '~/database'; |
| 36 | +import { isStreamOnline, stats } from '~/helpers/api'; |
| 37 | +import { attributesReplace } from '~/helpers/attributesReplace'; |
| 38 | +import { |
| 39 | + announceTypes, getOwner, getUserSender, isUUID, prepare, |
| 40 | +} from '~/helpers/commons'; |
| 41 | +import { isBotStarted, isDbConnected } from '~/helpers/database'; |
| 42 | +import { debounce } from '~/helpers/debounce'; |
| 43 | +import { eventEmitter } from '~/helpers/events'; |
| 44 | +import { |
| 45 | + chatIn, chatOut, debug, error, info, warning, whisperOut, |
| 46 | +} from '~/helpers/log'; |
| 47 | +import { check } from '~/helpers/permissions/check'; |
| 48 | +import { get as getPermission } from '~/helpers/permissions/get'; |
| 49 | +import { adminEndpoint } from '~/helpers/socket'; |
59 | 50 |
|
60 | 51 | class Discord extends Integration { |
61 | 52 | client: DiscordJs.Client | null = null; |
@@ -370,6 +361,11 @@ class Discord extends Integration { |
370 | 361 | if (o === '$subscribers' && broadcasterType !== '') { |
371 | 362 | return false; |
372 | 363 | } |
| 364 | + |
| 365 | + if (o === '$tags' && (stats.value.currentTags ?? []).length === 0) { |
| 366 | + // don't show empty tags |
| 367 | + return false; |
| 368 | + } |
373 | 369 | return true; |
374 | 370 | } |
375 | 371 |
|
|
0 commit comments