@notidotbot/noti-api-client 1.9.62 → 1.9.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/classes/adminAnnouncements.d.ts +108 -0
- package/dist/classes/adminAnnouncements.js +52 -0
- package/dist/classes/adminPolls.d.ts +111 -0
- package/dist/classes/adminPolls.js +59 -0
- package/dist/classes/announcements.d.ts +68 -0
- package/dist/classes/announcements.js +45 -0
- package/dist/classes/guildGiveaway.d.ts +28 -1
- package/dist/classes/guildGiveaway.js +14 -0
- package/dist/classes/guildInfluencerPanel.d.ts +266 -0
- package/dist/classes/guildInfluencerPanel.js +98 -0
- package/dist/classes/guildPlatform.d.ts +15 -3
- package/dist/classes/polls.d.ts +117 -0
- package/dist/classes/polls.js +62 -0
- package/dist/classes/publicDrops.d.ts +147 -0
- package/dist/classes/publicDrops.js +54 -0
- package/dist/classes/publicGiveaways.d.ts +152 -0
- package/dist/classes/publicGiveaways.js +80 -0
- package/dist/core/manager.d.ts +14 -0
- package/dist/core/manager.js +14 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +15 -1
- package/dist/other/bitfields.d.ts +17 -2
- package/dist/other/bitfields.js +15 -0
- package/dist/other/features.d.ts +1 -1
- package/dist/other/features.js +6 -0
- package/dist/other/giveawayClaims.d.ts +23 -0
- package/dist/other/giveawayClaims.js +33 -0
- package/dist/other/zod/giveaways.zod.d.ts +19 -0
- package/dist/other/zod/giveaways.zod.js +12 -0
- package/dist/other/zod/guild.zod.d.ts +2 -0
- package/dist/other/zod/guild.zod.js +2 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/prisma/generated/ts-prisma.d.ts +303 -58
- package/prisma/schema/models/giveaways.prisma +43 -0
- package/prisma/schema/models/guild.prisma +3 -0
- package/prisma/schema/schema.prisma +6 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { CancelOutWebResponses } from '../types';
|
|
2
|
+
import { WebDataManager } from '../core/manager';
|
|
3
|
+
/**
|
|
4
|
+
* The PUBLIC drops and badges pages - current and upcoming Kick and Twitch drops campaigns, and the chat
|
|
5
|
+
* badges they reward.
|
|
6
|
+
*
|
|
7
|
+
* ── WHO SEES WHAT ──────────────────────────────────────────────────────────
|
|
8
|
+
* `listPublicDrops` / `listPublicBadges` need no session: the first 12. The `*All*` methods page the rest for
|
|
9
|
+
* any logged-in user (no server permission), so pass `auth`.
|
|
10
|
+
*
|
|
11
|
+
* ── SOURCES ────────────────────────────────────────────────────────────────
|
|
12
|
+
* Every response carries `sources`: whether the Kick or Twitch drops source is failing right now. An empty list
|
|
13
|
+
* with a failing source means "unavailable", not "no drops" - show it that way.
|
|
14
|
+
*
|
|
15
|
+
* Behind the `publicDrops` launch flag: while it is hidden for the caller the lists are EMPTY (not 403).
|
|
16
|
+
* Built from the bot's last successful sync (every 5 minutes), so a new campaign can take that long to appear.
|
|
17
|
+
*/
|
|
18
|
+
export declare class APIPublicDrops {
|
|
19
|
+
private web;
|
|
20
|
+
constructor(web: WebDataManager);
|
|
21
|
+
/** The first 12 drops campaigns, live (ending soonest) then upcoming. No session. */
|
|
22
|
+
listPublicDrops({ platform }?: PublicDropsFunctionsInput['listPublicDrops']): Promise<import("../types").WebResponse<PublicDropList>>;
|
|
23
|
+
/** Every drops campaign, 24 per page. Pass the previous page's `nextCursor`; null = last page. */
|
|
24
|
+
listAllPublicDrops({ auth, platform, cursor }: PublicDropsFunctionsInput['listAllPublicDrops']): Promise<import("../types").WebResponse<PublicDropPage>>;
|
|
25
|
+
/** The first 12 chat badges from drops, live then upcoming. No session. */
|
|
26
|
+
listPublicBadges({ platform }?: PublicDropsFunctionsInput['listPublicBadges']): Promise<import("../types").WebResponse<PublicBadgeList>>;
|
|
27
|
+
/** Every chat badge, 24 per page. */
|
|
28
|
+
listAllPublicBadges({ auth, platform, cursor }: PublicDropsFunctionsInput['listAllPublicBadges']): Promise<import("../types").WebResponse<PublicBadgePage>>;
|
|
29
|
+
}
|
|
30
|
+
/** `all` (or omitted) = both platforms. */
|
|
31
|
+
export type PublicDropsPlatformFilter = 'kick' | 'twitch' | 'all';
|
|
32
|
+
export type PublicDropsFunctionsInput = {
|
|
33
|
+
'listPublicDrops': {
|
|
34
|
+
platform?: PublicDropsPlatformFilter;
|
|
35
|
+
};
|
|
36
|
+
'listAllPublicDrops': {
|
|
37
|
+
auth: string;
|
|
38
|
+
platform?: PublicDropsPlatformFilter;
|
|
39
|
+
cursor?: string | null;
|
|
40
|
+
};
|
|
41
|
+
'listPublicBadges': {
|
|
42
|
+
platform?: PublicDropsPlatformFilter;
|
|
43
|
+
};
|
|
44
|
+
'listAllPublicBadges': {
|
|
45
|
+
auth: string;
|
|
46
|
+
platform?: PublicDropsPlatformFilter;
|
|
47
|
+
cursor?: string | null;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
export type PublicDropsGetReturnTypes = {
|
|
51
|
+
'listPublicDropsRaw': Awaited<ReturnType<APIPublicDrops['listPublicDrops']>>;
|
|
52
|
+
'listPublicDropsSuccess': CancelOutWebResponses<Awaited<ReturnType<APIPublicDrops['listPublicDrops']>>>;
|
|
53
|
+
'listAllPublicDropsRaw': Awaited<ReturnType<APIPublicDrops['listAllPublicDrops']>>;
|
|
54
|
+
'listAllPublicDropsSuccess': CancelOutWebResponses<Awaited<ReturnType<APIPublicDrops['listAllPublicDrops']>>>;
|
|
55
|
+
'listPublicBadgesRaw': Awaited<ReturnType<APIPublicDrops['listPublicBadges']>>;
|
|
56
|
+
'listPublicBadgesSuccess': CancelOutWebResponses<Awaited<ReturnType<APIPublicDrops['listPublicBadges']>>>;
|
|
57
|
+
'listAllPublicBadgesRaw': Awaited<ReturnType<APIPublicDrops['listAllPublicBadges']>>;
|
|
58
|
+
'listAllPublicBadgesSuccess': CancelOutWebResponses<Awaited<ReturnType<APIPublicDrops['listAllPublicBadges']>>>;
|
|
59
|
+
};
|
|
60
|
+
/** Is each drops source failing right now. `since` is ISO, set while failing. */
|
|
61
|
+
export type PublicDropsSources = {
|
|
62
|
+
kick: {
|
|
63
|
+
ok: boolean;
|
|
64
|
+
since: string | null;
|
|
65
|
+
};
|
|
66
|
+
twitch: {
|
|
67
|
+
ok: boolean;
|
|
68
|
+
since: string | null;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
export type PublicDropReward = {
|
|
72
|
+
name: string;
|
|
73
|
+
imageUrl: string | null;
|
|
74
|
+
requiredMinutes: number | null;
|
|
75
|
+
/** Subscriptions the reward needs (Twitch only); null when none. */
|
|
76
|
+
requiredSubs: number | null;
|
|
77
|
+
isBadge: boolean;
|
|
78
|
+
};
|
|
79
|
+
/** One campaign. Mirrors `PublicDropCard` in Noti-v3's `src/modules/publicDrops.ts`. */
|
|
80
|
+
export type PublicDropCard = {
|
|
81
|
+
/** `<platform>:<campaignId>`. */
|
|
82
|
+
id: string;
|
|
83
|
+
platform: 'kick' | 'twitch';
|
|
84
|
+
name: string;
|
|
85
|
+
game: {
|
|
86
|
+
name: string;
|
|
87
|
+
imageUrl: string | null;
|
|
88
|
+
};
|
|
89
|
+
/** Kick only. */
|
|
90
|
+
organization: string | null;
|
|
91
|
+
/** ISO. */
|
|
92
|
+
startsAt: string;
|
|
93
|
+
/** ISO. */
|
|
94
|
+
endsAt: string;
|
|
95
|
+
status: 'live' | 'upcoming';
|
|
96
|
+
/** Where to watch: the Kick category page, or the Twitch campaign page. */
|
|
97
|
+
url: string | null;
|
|
98
|
+
rewards: PublicDropReward[];
|
|
99
|
+
/** Kick drops earned only by watching these streamers; null for everyone else. */
|
|
100
|
+
exclusive: {
|
|
101
|
+
streamers: {
|
|
102
|
+
username: string;
|
|
103
|
+
url: string;
|
|
104
|
+
}[];
|
|
105
|
+
} | null;
|
|
106
|
+
};
|
|
107
|
+
/** One chat badge. Mirrors `PublicBadgeCard` in Noti-v3. */
|
|
108
|
+
export type PublicBadgeCard = {
|
|
109
|
+
/** `<platform>:<rewardId>`. */
|
|
110
|
+
key: string;
|
|
111
|
+
platform: 'kick' | 'twitch';
|
|
112
|
+
name: string;
|
|
113
|
+
imageUrl: string | null;
|
|
114
|
+
game: string;
|
|
115
|
+
campaign: string;
|
|
116
|
+
/** ISO. */
|
|
117
|
+
startsAt: string;
|
|
118
|
+
/** ISO. */
|
|
119
|
+
endsAt: string;
|
|
120
|
+
/** Claimable right now. */
|
|
121
|
+
active: boolean;
|
|
122
|
+
url: string | null;
|
|
123
|
+
requiredMinutes: number | null;
|
|
124
|
+
requiredSubs: number | null;
|
|
125
|
+
};
|
|
126
|
+
export type PublicDropList = {
|
|
127
|
+
drops: PublicDropCard[];
|
|
128
|
+
total: number;
|
|
129
|
+
sources: PublicDropsSources;
|
|
130
|
+
};
|
|
131
|
+
export type PublicDropPage = {
|
|
132
|
+
drops: PublicDropCard[];
|
|
133
|
+
nextCursor: string | null;
|
|
134
|
+
total: number;
|
|
135
|
+
sources: PublicDropsSources;
|
|
136
|
+
};
|
|
137
|
+
export type PublicBadgeList = {
|
|
138
|
+
badges: PublicBadgeCard[];
|
|
139
|
+
total: number;
|
|
140
|
+
sources: PublicDropsSources;
|
|
141
|
+
};
|
|
142
|
+
export type PublicBadgePage = {
|
|
143
|
+
badges: PublicBadgeCard[];
|
|
144
|
+
nextCursor: string | null;
|
|
145
|
+
total: number;
|
|
146
|
+
sources: PublicDropsSources;
|
|
147
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.APIPublicDrops = void 0;
|
|
4
|
+
// Data.
|
|
5
|
+
/**
|
|
6
|
+
* The PUBLIC drops and badges pages - current and upcoming Kick and Twitch drops campaigns, and the chat
|
|
7
|
+
* badges they reward.
|
|
8
|
+
*
|
|
9
|
+
* ── WHO SEES WHAT ──────────────────────────────────────────────────────────
|
|
10
|
+
* `listPublicDrops` / `listPublicBadges` need no session: the first 12. The `*All*` methods page the rest for
|
|
11
|
+
* any logged-in user (no server permission), so pass `auth`.
|
|
12
|
+
*
|
|
13
|
+
* ── SOURCES ────────────────────────────────────────────────────────────────
|
|
14
|
+
* Every response carries `sources`: whether the Kick or Twitch drops source is failing right now. An empty list
|
|
15
|
+
* with a failing source means "unavailable", not "no drops" - show it that way.
|
|
16
|
+
*
|
|
17
|
+
* Behind the `publicDrops` launch flag: while it is hidden for the caller the lists are EMPTY (not 403).
|
|
18
|
+
* Built from the bot's last successful sync (every 5 minutes), so a new campaign can take that long to appear.
|
|
19
|
+
*/
|
|
20
|
+
class APIPublicDrops {
|
|
21
|
+
web;
|
|
22
|
+
constructor(web) {
|
|
23
|
+
this.web = web;
|
|
24
|
+
}
|
|
25
|
+
/** The first 12 drops campaigns, live (ending soonest) then upcoming. No session. */
|
|
26
|
+
async listPublicDrops({ platform } = {}) {
|
|
27
|
+
return await this.web.request({
|
|
28
|
+
method: 'GET',
|
|
29
|
+
endpoint: this.web.qp('/public/drops', platform ? { platform } : {}),
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/** Every drops campaign, 24 per page. Pass the previous page's `nextCursor`; null = last page. */
|
|
33
|
+
async listAllPublicDrops({ auth, platform, cursor }) {
|
|
34
|
+
return await this.web.request({
|
|
35
|
+
method: 'GET', auth,
|
|
36
|
+
endpoint: this.web.qp('/public/drops/all', { ...(platform ? { platform } : {}), ...(cursor ? { cursor } : {}) }),
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/** The first 12 chat badges from drops, live then upcoming. No session. */
|
|
40
|
+
async listPublicBadges({ platform } = {}) {
|
|
41
|
+
return await this.web.request({
|
|
42
|
+
method: 'GET',
|
|
43
|
+
endpoint: this.web.qp('/public/badges', platform ? { platform } : {}),
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/** Every chat badge, 24 per page. */
|
|
47
|
+
async listAllPublicBadges({ auth, platform, cursor }) {
|
|
48
|
+
return await this.web.request({
|
|
49
|
+
method: 'GET', auth,
|
|
50
|
+
endpoint: this.web.qp('/public/badges/all', { ...(platform ? { platform } : {}), ...(cursor ? { cursor } : {}) }),
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.APIPublicDrops = APIPublicDrops;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { CancelOutWebResponses } from '../types';
|
|
2
|
+
import { WebDataManager } from '../core/manager';
|
|
3
|
+
/**
|
|
4
|
+
* The PUBLIC giveaways page - running giveaways from every server that lists them on noti.bot.
|
|
5
|
+
*
|
|
6
|
+
* ── WHO SEES WHAT ──────────────────────────────────────────────────────────
|
|
7
|
+
* `listPublicGiveaways` needs no session: the latest 10. Everything else needs a logged-in user (any
|
|
8
|
+
* Discord account - no server permission), so pass `auth`.
|
|
9
|
+
*
|
|
10
|
+
* ── LISTED BY DEFAULT ──────────────────────────────────────────────────────
|
|
11
|
+
* A server's giveaways are listed unless it switched them off (`guildGiveaway.updatePublicGiveawaySettings`),
|
|
12
|
+
* and each giveaway can override that (`publicListing`). Behind the `publicGiveaways` launch flag: while it
|
|
13
|
+
* is hidden for the caller the lists are EMPTY (not 403) and single lookups 404.
|
|
14
|
+
*
|
|
15
|
+
* ── WHAT A CARD NEVER CARRIES ──────────────────────────────────────────────
|
|
16
|
+
* No host, winners, entrants or internal ids. Roles are names, dates are ISO strings, and a role deleted
|
|
17
|
+
* since the giveaway was made reads "deleted role" rather than disappearing.
|
|
18
|
+
*
|
|
19
|
+
* The lists are cached on the server for up to a minute, so an entry count can trail by that much.
|
|
20
|
+
*/
|
|
21
|
+
export declare class APIPublicGiveaways {
|
|
22
|
+
private web;
|
|
23
|
+
constructor(web: WebDataManager);
|
|
24
|
+
/** The latest 10 listed giveaways and how many are listed in all. No session. */
|
|
25
|
+
listPublicGiveaways(): Promise<import("../types").WebResponse<PublicGiveawayList>>;
|
|
26
|
+
/** Every listed giveaway, 24 per page, newest first. Pass the previous page's `nextCursor`; null = last page. */
|
|
27
|
+
listAllPublicGiveaways({ auth, cursor }: PublicGiveawaysFunctionsInput['listAllPublicGiveaways']): Promise<import("../types").WebResponse<PublicGiveawayPage>>;
|
|
28
|
+
/** One listed giveaway, plus where the logged-in user stands on it. 404 when it is not listed (or ended). */
|
|
29
|
+
getPublicGiveaway({ auth, giveawayId }: PublicGiveawaysFunctionsInput['getPublicGiveaway']): Promise<import("../types").WebResponse<PublicGiveawayWithViewer>>;
|
|
30
|
+
/**
|
|
31
|
+
* Enter a listed giveaway as the logged-in user - the same rules as the Discord button. A refusal is
|
|
32
|
+
* `{ status: 400 | 404 | 429, error: { code } }` with `code` from `PUBLIC_ENTRY_REFUSALS`; word it on the
|
|
33
|
+
* page (the card's `requirements` say what is required). 10 attempts per user per minute.
|
|
34
|
+
*/
|
|
35
|
+
createPublicGiveawayEntry({ auth, giveawayId }: PublicGiveawaysFunctionsInput['createPublicGiveawayEntry']): Promise<import("../types").WebResponse<PublicGiveawayEntryResult>>;
|
|
36
|
+
/**
|
|
37
|
+
* A link to join the giveaway's server - only when the card's `canJoin` is true. 404 when the server does
|
|
38
|
+
* not allow it or no invite could be made. The same link is reused; do not call it per render.
|
|
39
|
+
*/
|
|
40
|
+
getPublicGiveawayJoinLink({ auth, giveawayId }: PublicGiveawaysFunctionsInput['getPublicGiveawayJoinLink']): Promise<import("../types").WebResponse<{
|
|
41
|
+
url: string;
|
|
42
|
+
}>>;
|
|
43
|
+
}
|
|
44
|
+
export type PublicGiveawaysFunctionsInput = {
|
|
45
|
+
'listAllPublicGiveaways': {
|
|
46
|
+
auth: string;
|
|
47
|
+
cursor?: string | null;
|
|
48
|
+
};
|
|
49
|
+
'getPublicGiveaway': {
|
|
50
|
+
auth: string;
|
|
51
|
+
giveawayId: string;
|
|
52
|
+
};
|
|
53
|
+
'createPublicGiveawayEntry': {
|
|
54
|
+
auth: string;
|
|
55
|
+
giveawayId: string;
|
|
56
|
+
};
|
|
57
|
+
'getPublicGiveawayJoinLink': {
|
|
58
|
+
auth: string;
|
|
59
|
+
giveawayId: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
export type PublicGiveawaysGetReturnTypes = {
|
|
63
|
+
'listPublicGiveawaysRaw': Awaited<ReturnType<APIPublicGiveaways['listPublicGiveaways']>>;
|
|
64
|
+
'listPublicGiveawaysSuccess': CancelOutWebResponses<Awaited<ReturnType<APIPublicGiveaways['listPublicGiveaways']>>>;
|
|
65
|
+
'listAllPublicGiveawaysRaw': Awaited<ReturnType<APIPublicGiveaways['listAllPublicGiveaways']>>;
|
|
66
|
+
'listAllPublicGiveawaysSuccess': CancelOutWebResponses<Awaited<ReturnType<APIPublicGiveaways['listAllPublicGiveaways']>>>;
|
|
67
|
+
'getPublicGiveawayRaw': Awaited<ReturnType<APIPublicGiveaways['getPublicGiveaway']>>;
|
|
68
|
+
'getPublicGiveawaySuccess': CancelOutWebResponses<Awaited<ReturnType<APIPublicGiveaways['getPublicGiveaway']>>>;
|
|
69
|
+
'createPublicGiveawayEntryRaw': Awaited<ReturnType<APIPublicGiveaways['createPublicGiveawayEntry']>>;
|
|
70
|
+
'createPublicGiveawayEntrySuccess': CancelOutWebResponses<Awaited<ReturnType<APIPublicGiveaways['createPublicGiveawayEntry']>>>;
|
|
71
|
+
'getPublicGiveawayJoinLinkRaw': Awaited<ReturnType<APIPublicGiveaways['getPublicGiveawayJoinLink']>>;
|
|
72
|
+
'getPublicGiveawayJoinLinkSuccess': CancelOutWebResponses<Awaited<ReturnType<APIPublicGiveaways['getPublicGiveawayJoinLink']>>>;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Every reason an entry can be refused. Mirrors `PUBLIC_ENTRY_REFUSALS` in Noti-v3's
|
|
76
|
+
* `src/modules/publicGiveaways.ts`; the eligibility ones match the card's `requirements` / `entryFilter`.
|
|
77
|
+
*/
|
|
78
|
+
export declare const PUBLIC_ENTRY_REFUSALS: readonly ["not_listed", "ended", "full", "not_member", "already_entered", "rate_limited", "role_whitelist", "role_blacklist", "joined_server_before", "account_created_before", "min_account_age", "boosting_server", "roles", "message_count"];
|
|
79
|
+
export type PublicEntryRefusal = typeof PUBLIC_ENTRY_REFUSALS[number];
|
|
80
|
+
export type PublicGiveawayRole = {
|
|
81
|
+
id: string;
|
|
82
|
+
name: string;
|
|
83
|
+
};
|
|
84
|
+
/** One giveaway as the public page shows it. Mirrors `PublicGiveawayCard` in Noti-v3. */
|
|
85
|
+
export type PublicGiveawayCard = {
|
|
86
|
+
giveawayId: string;
|
|
87
|
+
name: string;
|
|
88
|
+
emoji: string | null;
|
|
89
|
+
/** ISO. */
|
|
90
|
+
endsAt: string;
|
|
91
|
+
winnerCount: number;
|
|
92
|
+
maxEntries: number | null;
|
|
93
|
+
entryCount: number;
|
|
94
|
+
/** Minutes winners have to press Claim; null when the giveaway does not need claiming. */
|
|
95
|
+
claimWindowMinutes: number | null;
|
|
96
|
+
/** Voting for Noti counts as a second entry. */
|
|
97
|
+
doubleVoteEntry: boolean;
|
|
98
|
+
requirements: {
|
|
99
|
+
/** ISO. */
|
|
100
|
+
joinedServerBefore: string | null;
|
|
101
|
+
/** ISO. */
|
|
102
|
+
accountCreatedBefore: string | null;
|
|
103
|
+
minAccountAgeDays: number | null;
|
|
104
|
+
boostingServer: boolean;
|
|
105
|
+
messageCount: number | null;
|
|
106
|
+
roles: PublicGiveawayRole[];
|
|
107
|
+
} | null;
|
|
108
|
+
entryFilter: {
|
|
109
|
+
mode: 'whitelist' | 'blacklist';
|
|
110
|
+
roles: PublicGiveawayRole[];
|
|
111
|
+
} | null;
|
|
112
|
+
/** `stacks: false` = only the member's highest bonus role counts. */
|
|
113
|
+
bonusRoles: {
|
|
114
|
+
roles: PublicGiveawayRole[];
|
|
115
|
+
additionalEntries: number;
|
|
116
|
+
stacks: boolean;
|
|
117
|
+
}[];
|
|
118
|
+
guild: {
|
|
119
|
+
id: string;
|
|
120
|
+
name: string;
|
|
121
|
+
icon: string | null;
|
|
122
|
+
memberCount: number;
|
|
123
|
+
};
|
|
124
|
+
/** The giveaway message in Discord. */
|
|
125
|
+
messageUrl: string;
|
|
126
|
+
/** The server lets people join from noti.bot - offer `getPublicGiveawayJoinLink`. */
|
|
127
|
+
canJoin: boolean;
|
|
128
|
+
};
|
|
129
|
+
export type PublicGiveawayViewer = {
|
|
130
|
+
entered: boolean;
|
|
131
|
+
isMember: boolean;
|
|
132
|
+
eligible: boolean;
|
|
133
|
+
/** Why not, when `eligible` is false. */
|
|
134
|
+
reason: PublicEntryRefusal | null;
|
|
135
|
+
};
|
|
136
|
+
export type PublicGiveawayList = {
|
|
137
|
+
giveaways: PublicGiveawayCard[];
|
|
138
|
+
total: number;
|
|
139
|
+
};
|
|
140
|
+
export type PublicGiveawayPage = {
|
|
141
|
+
giveaways: PublicGiveawayCard[];
|
|
142
|
+
nextCursor: string | null;
|
|
143
|
+
total: number;
|
|
144
|
+
};
|
|
145
|
+
export type PublicGiveawayWithViewer = {
|
|
146
|
+
giveaway: PublicGiveawayCard;
|
|
147
|
+
viewer: PublicGiveawayViewer;
|
|
148
|
+
};
|
|
149
|
+
export type PublicGiveawayEntryResult = {
|
|
150
|
+
entered: true;
|
|
151
|
+
entries: number;
|
|
152
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PUBLIC_ENTRY_REFUSALS = exports.APIPublicGiveaways = void 0;
|
|
4
|
+
// Data.
|
|
5
|
+
/**
|
|
6
|
+
* The PUBLIC giveaways page - running giveaways from every server that lists them on noti.bot.
|
|
7
|
+
*
|
|
8
|
+
* ── WHO SEES WHAT ──────────────────────────────────────────────────────────
|
|
9
|
+
* `listPublicGiveaways` needs no session: the latest 10. Everything else needs a logged-in user (any
|
|
10
|
+
* Discord account - no server permission), so pass `auth`.
|
|
11
|
+
*
|
|
12
|
+
* ── LISTED BY DEFAULT ──────────────────────────────────────────────────────
|
|
13
|
+
* A server's giveaways are listed unless it switched them off (`guildGiveaway.updatePublicGiveawaySettings`),
|
|
14
|
+
* and each giveaway can override that (`publicListing`). Behind the `publicGiveaways` launch flag: while it
|
|
15
|
+
* is hidden for the caller the lists are EMPTY (not 403) and single lookups 404.
|
|
16
|
+
*
|
|
17
|
+
* ── WHAT A CARD NEVER CARRIES ──────────────────────────────────────────────
|
|
18
|
+
* No host, winners, entrants or internal ids. Roles are names, dates are ISO strings, and a role deleted
|
|
19
|
+
* since the giveaway was made reads "deleted role" rather than disappearing.
|
|
20
|
+
*
|
|
21
|
+
* The lists are cached on the server for up to a minute, so an entry count can trail by that much.
|
|
22
|
+
*/
|
|
23
|
+
class APIPublicGiveaways {
|
|
24
|
+
web;
|
|
25
|
+
constructor(web) {
|
|
26
|
+
this.web = web;
|
|
27
|
+
}
|
|
28
|
+
/** The latest 10 listed giveaways and how many are listed in all. No session. */
|
|
29
|
+
async listPublicGiveaways() {
|
|
30
|
+
return await this.web.request({
|
|
31
|
+
method: 'GET',
|
|
32
|
+
endpoint: this.web.qp('/public/giveaways'),
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/** Every listed giveaway, 24 per page, newest first. Pass the previous page's `nextCursor`; null = last page. */
|
|
36
|
+
async listAllPublicGiveaways({ auth, cursor }) {
|
|
37
|
+
return await this.web.request({
|
|
38
|
+
method: 'GET', auth,
|
|
39
|
+
endpoint: this.web.qp('/public/giveaways/all', cursor ? { cursor } : {}),
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/** One listed giveaway, plus where the logged-in user stands on it. 404 when it is not listed (or ended). */
|
|
43
|
+
async getPublicGiveaway({ auth, giveawayId }) {
|
|
44
|
+
return await this.web.request({
|
|
45
|
+
method: 'GET', auth,
|
|
46
|
+
endpoint: this.web.qp('/public/giveaways/' + giveawayId),
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Enter a listed giveaway as the logged-in user - the same rules as the Discord button. A refusal is
|
|
51
|
+
* `{ status: 400 | 404 | 429, error: { code } }` with `code` from `PUBLIC_ENTRY_REFUSALS`; word it on the
|
|
52
|
+
* page (the card's `requirements` say what is required). 10 attempts per user per minute.
|
|
53
|
+
*/
|
|
54
|
+
async createPublicGiveawayEntry({ auth, giveawayId }) {
|
|
55
|
+
return await this.web.request({
|
|
56
|
+
method: 'POST', auth,
|
|
57
|
+
endpoint: this.web.qp('/public/giveaways/' + giveawayId + '/entries'),
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* A link to join the giveaway's server - only when the card's `canJoin` is true. 404 when the server does
|
|
62
|
+
* not allow it or no invite could be made. The same link is reused; do not call it per render.
|
|
63
|
+
*/
|
|
64
|
+
async getPublicGiveawayJoinLink({ auth, giveawayId }) {
|
|
65
|
+
return await this.web.request({
|
|
66
|
+
method: 'GET', auth,
|
|
67
|
+
endpoint: this.web.qp('/public/giveaways/' + giveawayId + '/join'),
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.APIPublicGiveaways = APIPublicGiveaways;
|
|
72
|
+
/**
|
|
73
|
+
* Every reason an entry can be refused. Mirrors `PUBLIC_ENTRY_REFUSALS` in Noti-v3's
|
|
74
|
+
* `src/modules/publicGiveaways.ts`; the eligibility ones match the card's `requirements` / `entryFilter`.
|
|
75
|
+
*/
|
|
76
|
+
exports.PUBLIC_ENTRY_REFUSALS = [
|
|
77
|
+
'not_listed', 'ended', 'full', 'not_member', 'already_entered', 'rate_limited',
|
|
78
|
+
'role_whitelist', 'role_blacklist', 'joined_server_before', 'account_created_before', 'min_account_age',
|
|
79
|
+
'boosting_server', 'roles', 'message_count',
|
|
80
|
+
];
|
package/dist/core/manager.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { APIGuildDrops } from '../classes/guildDrops';
|
|
|
12
12
|
import { APIGuildBadges } from '../classes/guildBadges';
|
|
13
13
|
import { APIGuildBounties } from '../classes/guildBounties';
|
|
14
14
|
import { APIGuildAutoRoles } from '../classes/guildAutoRoles';
|
|
15
|
+
import { APIGuildInfluencerPanel } from '../classes/guildInfluencerPanel';
|
|
15
16
|
import { APIDropsGames } from '../classes/dropsGames';
|
|
16
17
|
import { APIGames } from '../classes/games';
|
|
17
18
|
import { AxiosResponse } from 'axios';
|
|
@@ -29,6 +30,12 @@ import { APIEmotes } from '../classes/emotes';
|
|
|
29
30
|
import { APIFiles } from '../classes/files';
|
|
30
31
|
import { APIMinigamesFishing } from '../classes/minigamesFishing';
|
|
31
32
|
import { APIPublicFishing } from '../classes/publicFishing';
|
|
33
|
+
import { APIPublicGiveaways } from '../classes/publicGiveaways';
|
|
34
|
+
import { APIPublicDrops } from '../classes/publicDrops';
|
|
35
|
+
import { APIPolls } from '../classes/polls';
|
|
36
|
+
import { APIAnnouncements } from '../classes/announcements';
|
|
37
|
+
import { APIAdminPolls } from '../classes/adminPolls';
|
|
38
|
+
import { APIAdminAnnouncements } from '../classes/adminAnnouncements';
|
|
32
39
|
import { APIGuildFishing } from '../classes/guildFishing';
|
|
33
40
|
import { APIAdminFishing } from '../classes/adminFishing';
|
|
34
41
|
import { APIAdmin } from '../classes/admin';
|
|
@@ -50,6 +57,12 @@ export declare class WebDataManager {
|
|
|
50
57
|
readonly guildFishing: APIGuildFishing;
|
|
51
58
|
readonly minigamesFishing: APIMinigamesFishing;
|
|
52
59
|
readonly publicFishing: APIPublicFishing;
|
|
60
|
+
readonly publicGiveaways: APIPublicGiveaways;
|
|
61
|
+
readonly publicDrops: APIPublicDrops;
|
|
62
|
+
readonly polls: APIPolls;
|
|
63
|
+
readonly announcements: APIAnnouncements;
|
|
64
|
+
readonly adminPolls: APIAdminPolls;
|
|
65
|
+
readonly adminAnnouncements: APIAdminAnnouncements;
|
|
53
66
|
readonly other: APIOther;
|
|
54
67
|
readonly guild: APIGuild;
|
|
55
68
|
readonly teams: APITeams;
|
|
@@ -63,6 +76,7 @@ export declare class WebDataManager {
|
|
|
63
76
|
readonly guildBadges: APIGuildBadges;
|
|
64
77
|
readonly guildBounties: APIGuildBounties;
|
|
65
78
|
readonly guildAutoRoles: APIGuildAutoRoles;
|
|
79
|
+
readonly guildInfluencerPanel: APIGuildInfluencerPanel;
|
|
66
80
|
readonly dropsGames: APIDropsGames;
|
|
67
81
|
readonly guildPlatform: APIGuildPlatform;
|
|
68
82
|
readonly guildGiveaway: APIGuildGiveaway;
|
package/dist/core/manager.js
CHANGED
|
@@ -18,6 +18,7 @@ const guildDrops_1 = require("../classes/guildDrops");
|
|
|
18
18
|
const guildBadges_1 = require("../classes/guildBadges");
|
|
19
19
|
const guildBounties_1 = require("../classes/guildBounties");
|
|
20
20
|
const guildAutoRoles_1 = require("../classes/guildAutoRoles");
|
|
21
|
+
const guildInfluencerPanel_1 = require("../classes/guildInfluencerPanel");
|
|
21
22
|
const dropsGames_1 = require("../classes/dropsGames");
|
|
22
23
|
const games_1 = require("../classes/games");
|
|
23
24
|
const axios_1 = __importDefault(require("axios"));
|
|
@@ -34,6 +35,12 @@ const emotes_1 = require("../classes/emotes");
|
|
|
34
35
|
const files_1 = require("../classes/files");
|
|
35
36
|
const minigamesFishing_1 = require("../classes/minigamesFishing");
|
|
36
37
|
const publicFishing_1 = require("../classes/publicFishing");
|
|
38
|
+
const publicGiveaways_1 = require("../classes/publicGiveaways");
|
|
39
|
+
const publicDrops_1 = require("../classes/publicDrops");
|
|
40
|
+
const polls_1 = require("../classes/polls");
|
|
41
|
+
const announcements_1 = require("../classes/announcements");
|
|
42
|
+
const adminPolls_1 = require("../classes/adminPolls");
|
|
43
|
+
const adminAnnouncements_1 = require("../classes/adminAnnouncements");
|
|
37
44
|
const guildFishing_1 = require("../classes/guildFishing");
|
|
38
45
|
const adminFishing_1 = require("../classes/adminFishing");
|
|
39
46
|
const admin_1 = require("../classes/admin");
|
|
@@ -54,6 +61,12 @@ class WebDataManager {
|
|
|
54
61
|
guildFishing = new guildFishing_1.APIGuildFishing(this);
|
|
55
62
|
minigamesFishing = new minigamesFishing_1.APIMinigamesFishing(this);
|
|
56
63
|
publicFishing = new publicFishing_1.APIPublicFishing(this);
|
|
64
|
+
publicGiveaways = new publicGiveaways_1.APIPublicGiveaways(this);
|
|
65
|
+
publicDrops = new publicDrops_1.APIPublicDrops(this);
|
|
66
|
+
polls = new polls_1.APIPolls(this);
|
|
67
|
+
announcements = new announcements_1.APIAnnouncements(this);
|
|
68
|
+
adminPolls = new adminPolls_1.APIAdminPolls(this);
|
|
69
|
+
adminAnnouncements = new adminAnnouncements_1.APIAdminAnnouncements(this);
|
|
57
70
|
other = new other_1.APIOther(this);
|
|
58
71
|
guild = new guild_1.APIGuild(this);
|
|
59
72
|
teams = new teams_1.APITeams(this);
|
|
@@ -67,6 +80,7 @@ class WebDataManager {
|
|
|
67
80
|
guildBadges = new guildBadges_1.APIGuildBadges(this);
|
|
68
81
|
guildBounties = new guildBounties_1.APIGuildBounties(this);
|
|
69
82
|
guildAutoRoles = new guildAutoRoles_1.APIGuildAutoRoles(this);
|
|
83
|
+
guildInfluencerPanel = new guildInfluencerPanel_1.APIGuildInfluencerPanel(this);
|
|
70
84
|
dropsGames = new dropsGames_1.APIDropsGames(this);
|
|
71
85
|
guildPlatform = new guildPlatform_1.APIGuildPlatform(this);
|
|
72
86
|
guildGiveaway = new guildGiveaway_1.APIGuildGiveaway(this);
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,12 @@ export * from './classes/adminFishing';
|
|
|
7
7
|
export * from './classes/guildFishing';
|
|
8
8
|
export * from './classes/minigamesFishing';
|
|
9
9
|
export * from './classes/publicFishing';
|
|
10
|
+
export * from './classes/publicGiveaways';
|
|
11
|
+
export * from './classes/publicDrops';
|
|
12
|
+
export * from './classes/polls';
|
|
13
|
+
export * from './classes/announcements';
|
|
14
|
+
export * from './classes/adminPolls';
|
|
15
|
+
export * from './classes/adminAnnouncements';
|
|
10
16
|
export * from './classes/emotes';
|
|
11
17
|
export * from './classes/files';
|
|
12
18
|
export * from './classes/other';
|
|
@@ -23,6 +29,7 @@ export * from './classes/guildDrops';
|
|
|
23
29
|
export * from './classes/guildBadges';
|
|
24
30
|
export * from './classes/guildBounties';
|
|
25
31
|
export * from './classes/guildAutoRoles';
|
|
32
|
+
export * from './classes/guildInfluencerPanel';
|
|
26
33
|
export * from './classes/dropsGames';
|
|
27
34
|
export * from './classes/guildPlatform';
|
|
28
35
|
export * from './classes/guildGiveaway';
|
|
@@ -39,6 +46,8 @@ export { GuildMessageTypeEnum, StreamerMessageTypeEnum, PlatformEnum, $Enums } f
|
|
|
39
46
|
export { FEATURE_NAMES, } from './other/features';
|
|
40
47
|
export { OFFLINE_GRACE_CHOICES, OFFLINE_GRACE_DEFAULT, OFFLINE_GRACE_PLATFORMS, } from './other/offlineGrace';
|
|
41
48
|
export type { OfflineGraceMinutes, OfflineGracePlatform } from './other/offlineGrace';
|
|
49
|
+
export { GIVEAWAY_CLAIM_WINDOWS, GIVEAWAY_CLAIM_WINDOW_LABELS, GIVEAWAY_MAX_CLAIM_ROUNDS, GIVEAWAY_WINNER_ROLE_MAX_DAYS, GIVEAWAY_MIN_ACCOUNT_AGE_MAX_DAYS, GIVEAWAY_WINNER_ROLE_FORBIDDEN_PERMISSIONS, } from './other/giveawayClaims';
|
|
50
|
+
export type { GiveawayClaimWindow, GiveawayWinnerStatus } from './other/giveawayClaims';
|
|
42
51
|
export type { FeatureName, FeatureStatus, ResolvedFeature, } from './other/features';
|
|
43
52
|
export type { Prisma, TSPrisma } from '@prisma/client';
|
|
44
53
|
export type { ClientChangelog, Guild, User, Team, Member, KickStreamer, TwitchStreamer, YoutubeStreamer, TiktokStreamer, RumbleStreamer, ClubStreamer, TwitterStreamer, GuildGiveaway, GuildRolePanel, GuildClipForward } from '@prisma/client';
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.OFFLINE_GRACE_PLATFORMS = exports.OFFLINE_GRACE_DEFAULT = exports.OFFLINE_GRACE_CHOICES = exports.FEATURE_NAMES = exports.$Enums = exports.PlatformEnum = exports.StreamerMessageTypeEnum = exports.GuildMessageTypeEnum = void 0;
|
|
17
|
+
exports.GIVEAWAY_WINNER_ROLE_FORBIDDEN_PERMISSIONS = exports.GIVEAWAY_MIN_ACCOUNT_AGE_MAX_DAYS = exports.GIVEAWAY_WINNER_ROLE_MAX_DAYS = exports.GIVEAWAY_MAX_CLAIM_ROUNDS = exports.GIVEAWAY_CLAIM_WINDOW_LABELS = exports.GIVEAWAY_CLAIM_WINDOWS = exports.OFFLINE_GRACE_PLATFORMS = exports.OFFLINE_GRACE_DEFAULT = exports.OFFLINE_GRACE_CHOICES = exports.FEATURE_NAMES = exports.$Enums = exports.PlatformEnum = exports.StreamerMessageTypeEnum = exports.GuildMessageTypeEnum = void 0;
|
|
18
18
|
__exportStar(require("./core/manager"), exports);
|
|
19
19
|
__exportStar(require("./types"), exports);
|
|
20
20
|
__exportStar(require("./classes/@me"), exports);
|
|
@@ -24,6 +24,12 @@ __exportStar(require("./classes/adminFishing"), exports);
|
|
|
24
24
|
__exportStar(require("./classes/guildFishing"), exports);
|
|
25
25
|
__exportStar(require("./classes/minigamesFishing"), exports);
|
|
26
26
|
__exportStar(require("./classes/publicFishing"), exports);
|
|
27
|
+
__exportStar(require("./classes/publicGiveaways"), exports);
|
|
28
|
+
__exportStar(require("./classes/publicDrops"), exports);
|
|
29
|
+
__exportStar(require("./classes/polls"), exports);
|
|
30
|
+
__exportStar(require("./classes/announcements"), exports);
|
|
31
|
+
__exportStar(require("./classes/adminPolls"), exports);
|
|
32
|
+
__exportStar(require("./classes/adminAnnouncements"), exports);
|
|
27
33
|
__exportStar(require("./classes/emotes"), exports);
|
|
28
34
|
__exportStar(require("./classes/files"), exports);
|
|
29
35
|
__exportStar(require("./classes/other"), exports);
|
|
@@ -40,6 +46,7 @@ __exportStar(require("./classes/guildDrops"), exports);
|
|
|
40
46
|
__exportStar(require("./classes/guildBadges"), exports);
|
|
41
47
|
__exportStar(require("./classes/guildBounties"), exports);
|
|
42
48
|
__exportStar(require("./classes/guildAutoRoles"), exports);
|
|
49
|
+
__exportStar(require("./classes/guildInfluencerPanel"), exports);
|
|
43
50
|
__exportStar(require("./classes/dropsGames"), exports);
|
|
44
51
|
__exportStar(require("./classes/guildPlatform"), exports);
|
|
45
52
|
__exportStar(require("./classes/guildGiveaway"), exports);
|
|
@@ -65,3 +72,10 @@ var offlineGrace_1 = require("./other/offlineGrace");
|
|
|
65
72
|
Object.defineProperty(exports, "OFFLINE_GRACE_CHOICES", { enumerable: true, get: function () { return offlineGrace_1.OFFLINE_GRACE_CHOICES; } });
|
|
66
73
|
Object.defineProperty(exports, "OFFLINE_GRACE_DEFAULT", { enumerable: true, get: function () { return offlineGrace_1.OFFLINE_GRACE_DEFAULT; } });
|
|
67
74
|
Object.defineProperty(exports, "OFFLINE_GRACE_PLATFORMS", { enumerable: true, get: function () { return offlineGrace_1.OFFLINE_GRACE_PLATFORMS; } });
|
|
75
|
+
var giveawayClaims_1 = require("./other/giveawayClaims");
|
|
76
|
+
Object.defineProperty(exports, "GIVEAWAY_CLAIM_WINDOWS", { enumerable: true, get: function () { return giveawayClaims_1.GIVEAWAY_CLAIM_WINDOWS; } });
|
|
77
|
+
Object.defineProperty(exports, "GIVEAWAY_CLAIM_WINDOW_LABELS", { enumerable: true, get: function () { return giveawayClaims_1.GIVEAWAY_CLAIM_WINDOW_LABELS; } });
|
|
78
|
+
Object.defineProperty(exports, "GIVEAWAY_MAX_CLAIM_ROUNDS", { enumerable: true, get: function () { return giveawayClaims_1.GIVEAWAY_MAX_CLAIM_ROUNDS; } });
|
|
79
|
+
Object.defineProperty(exports, "GIVEAWAY_WINNER_ROLE_MAX_DAYS", { enumerable: true, get: function () { return giveawayClaims_1.GIVEAWAY_WINNER_ROLE_MAX_DAYS; } });
|
|
80
|
+
Object.defineProperty(exports, "GIVEAWAY_MIN_ACCOUNT_AGE_MAX_DAYS", { enumerable: true, get: function () { return giveawayClaims_1.GIVEAWAY_MIN_ACCOUNT_AGE_MAX_DAYS; } });
|
|
81
|
+
Object.defineProperty(exports, "GIVEAWAY_WINNER_ROLE_FORBIDDEN_PERMISSIONS", { enumerable: true, get: function () { return giveawayClaims_1.GIVEAWAY_WINNER_ROLE_FORBIDDEN_PERMISSIONS; } });
|
|
@@ -121,6 +121,11 @@ export declare const GuildFeatures: {
|
|
|
121
121
|
AutoRoleTimers: bigint;
|
|
122
122
|
AutoRoleInvites: bigint;
|
|
123
123
|
StickyMessageRoleFilters: bigint;
|
|
124
|
+
GiveawayClaims: bigint;
|
|
125
|
+
GiveawayWinnerRole: bigint;
|
|
126
|
+
InfluencerPanel: bigint;
|
|
127
|
+
InfluencerPanelPremium: bigint;
|
|
128
|
+
InfluencerPanelPlus: bigint;
|
|
124
129
|
};
|
|
125
130
|
export declare const GuildFeaturesText: Record<keyof typeof GuildFeatures, string>;
|
|
126
131
|
export declare const UserFeatures: {
|
|
@@ -229,8 +234,13 @@ export declare class GuildFeaturesManager extends BitFieldManager<typeof GuildFe
|
|
|
229
234
|
AutoRoleTimers: bigint;
|
|
230
235
|
AutoRoleInvites: bigint;
|
|
231
236
|
StickyMessageRoleFilters: bigint;
|
|
237
|
+
GiveawayClaims: bigint;
|
|
238
|
+
GiveawayWinnerRole: bigint;
|
|
239
|
+
InfluencerPanel: bigint;
|
|
240
|
+
InfluencerPanelPremium: bigint;
|
|
241
|
+
InfluencerPanelPlus: bigint;
|
|
232
242
|
};
|
|
233
|
-
t: Record<"StickyMessages" | "LinkedRoles" | "StatusRoles" | "Starboards" | "KickClips" | "StatCounters" | "BaseSyncableRoles" | "FullSyncableRoles" | "LiveRole" | "VoteSkipping" | "KickAuditLogs" | "LeaderboardCommand" | "RefreshingLeaderboard" | "LeaderBoardSyncRoles" | "BetaAccess" | "PriorityNotifications" | "KickNotifications" | "TwitchNotifications" | "ImportEmojis" | "ImportEmojisWithSub" | "CustomWebhooks" | "AnyMessageEditor" | "SyncSocialUsernames" | "AutoDeleteNotifications" | "TestNotificationCommand" | "CustomCooldowns" | "WelcomeAndLeaveNotifications" | "NotificationPingRoleId" | "SwitchStreamerAndGuildEmbeds" | "BirthdayNotifications" | "AllowNotSendingOfflineNotifications" | "AutoStatusLiveRoles" | "RumbleNotifications" | "AllowAutoPublishNotifications" | "NotificationOverrides" | "UseCustomButtons" | "AllowVodFeatures" | "TikTokNotifications" | "ManageBranding" | "CustomStarboards" | "AutoThreadOnStarboard" | "StarboardRewardRole" | "Giveaways" | "GiveawayLogs" | "ModifyGiveawayWhileRunning" | "ScheduleGiveaways" | "GiveawayRequirements" | "GiveawayBonusEntries" | "GiveawayEntryLimit" | "DisableDoubleVoteEntry" | "YouTubeNotifications" | "RandomMessages" | "WeeklyBirthdayPanel" | "GameNotifications" | "GameCategoryRouting" | "GameAllTimeLowAlerts" | "GameChangelogs" | "GameRobloxTracking" | "FixUrlWebhook" | "FixUrlCustomRules" | "KickClipperSubscribe" | "WhatnotNotifications" | "ScheduledEventMessages" | "ScheduledMessageWebhooks" | "ReactionRoles" | "AdvancedRolePanels" | "KickClipForwarding" | "TwitchClipForwarding" | "ClubNotifications" | "RolePanelWebhooks" | "Fishing" | "FishingCustomization" | "FishingWebhooks" | "StreamRoles" | "RoleFilters" | "TwitterNotifications" | "TwitterLiveNotifications" | "BadgeAllGames" | "AutoRoles" | "AutoRoleTimers" | "AutoRoleInvites" | "StickyMessageRoleFilters", string>;
|
|
243
|
+
t: Record<"StickyMessages" | "LinkedRoles" | "StatusRoles" | "Starboards" | "KickClips" | "StatCounters" | "BaseSyncableRoles" | "FullSyncableRoles" | "LiveRole" | "VoteSkipping" | "KickAuditLogs" | "LeaderboardCommand" | "RefreshingLeaderboard" | "LeaderBoardSyncRoles" | "BetaAccess" | "PriorityNotifications" | "KickNotifications" | "TwitchNotifications" | "ImportEmojis" | "ImportEmojisWithSub" | "CustomWebhooks" | "AnyMessageEditor" | "SyncSocialUsernames" | "AutoDeleteNotifications" | "TestNotificationCommand" | "CustomCooldowns" | "WelcomeAndLeaveNotifications" | "NotificationPingRoleId" | "SwitchStreamerAndGuildEmbeds" | "BirthdayNotifications" | "AllowNotSendingOfflineNotifications" | "AutoStatusLiveRoles" | "RumbleNotifications" | "AllowAutoPublishNotifications" | "NotificationOverrides" | "UseCustomButtons" | "AllowVodFeatures" | "TikTokNotifications" | "ManageBranding" | "CustomStarboards" | "AutoThreadOnStarboard" | "StarboardRewardRole" | "Giveaways" | "GiveawayLogs" | "ModifyGiveawayWhileRunning" | "ScheduleGiveaways" | "GiveawayRequirements" | "GiveawayBonusEntries" | "GiveawayEntryLimit" | "DisableDoubleVoteEntry" | "YouTubeNotifications" | "RandomMessages" | "WeeklyBirthdayPanel" | "GameNotifications" | "GameCategoryRouting" | "GameAllTimeLowAlerts" | "GameChangelogs" | "GameRobloxTracking" | "FixUrlWebhook" | "FixUrlCustomRules" | "KickClipperSubscribe" | "WhatnotNotifications" | "ScheduledEventMessages" | "ScheduledMessageWebhooks" | "ReactionRoles" | "AdvancedRolePanels" | "KickClipForwarding" | "TwitchClipForwarding" | "ClubNotifications" | "RolePanelWebhooks" | "Fishing" | "FishingCustomization" | "FishingWebhooks" | "StreamRoles" | "RoleFilters" | "TwitterNotifications" | "TwitterLiveNotifications" | "BadgeAllGames" | "AutoRoles" | "AutoRoleTimers" | "AutoRoleInvites" | "StickyMessageRoleFilters" | "GiveawayClaims" | "GiveawayWinnerRole" | "InfluencerPanel" | "InfluencerPanelPremium" | "InfluencerPanelPlus", string>;
|
|
234
244
|
all: bigint;
|
|
235
245
|
static b: {
|
|
236
246
|
BaseSyncableRoles: bigint;
|
|
@@ -315,8 +325,13 @@ export declare class GuildFeaturesManager extends BitFieldManager<typeof GuildFe
|
|
|
315
325
|
AutoRoleTimers: bigint;
|
|
316
326
|
AutoRoleInvites: bigint;
|
|
317
327
|
StickyMessageRoleFilters: bigint;
|
|
328
|
+
GiveawayClaims: bigint;
|
|
329
|
+
GiveawayWinnerRole: bigint;
|
|
330
|
+
InfluencerPanel: bigint;
|
|
331
|
+
InfluencerPanelPremium: bigint;
|
|
332
|
+
InfluencerPanelPlus: bigint;
|
|
318
333
|
};
|
|
319
|
-
static t: Record<"StickyMessages" | "LinkedRoles" | "StatusRoles" | "Starboards" | "KickClips" | "StatCounters" | "BaseSyncableRoles" | "FullSyncableRoles" | "LiveRole" | "VoteSkipping" | "KickAuditLogs" | "LeaderboardCommand" | "RefreshingLeaderboard" | "LeaderBoardSyncRoles" | "BetaAccess" | "PriorityNotifications" | "KickNotifications" | "TwitchNotifications" | "ImportEmojis" | "ImportEmojisWithSub" | "CustomWebhooks" | "AnyMessageEditor" | "SyncSocialUsernames" | "AutoDeleteNotifications" | "TestNotificationCommand" | "CustomCooldowns" | "WelcomeAndLeaveNotifications" | "NotificationPingRoleId" | "SwitchStreamerAndGuildEmbeds" | "BirthdayNotifications" | "AllowNotSendingOfflineNotifications" | "AutoStatusLiveRoles" | "RumbleNotifications" | "AllowAutoPublishNotifications" | "NotificationOverrides" | "UseCustomButtons" | "AllowVodFeatures" | "TikTokNotifications" | "ManageBranding" | "CustomStarboards" | "AutoThreadOnStarboard" | "StarboardRewardRole" | "Giveaways" | "GiveawayLogs" | "ModifyGiveawayWhileRunning" | "ScheduleGiveaways" | "GiveawayRequirements" | "GiveawayBonusEntries" | "GiveawayEntryLimit" | "DisableDoubleVoteEntry" | "YouTubeNotifications" | "RandomMessages" | "WeeklyBirthdayPanel" | "GameNotifications" | "GameCategoryRouting" | "GameAllTimeLowAlerts" | "GameChangelogs" | "GameRobloxTracking" | "FixUrlWebhook" | "FixUrlCustomRules" | "KickClipperSubscribe" | "WhatnotNotifications" | "ScheduledEventMessages" | "ScheduledMessageWebhooks" | "ReactionRoles" | "AdvancedRolePanels" | "KickClipForwarding" | "TwitchClipForwarding" | "ClubNotifications" | "RolePanelWebhooks" | "Fishing" | "FishingCustomization" | "FishingWebhooks" | "StreamRoles" | "RoleFilters" | "TwitterNotifications" | "TwitterLiveNotifications" | "BadgeAllGames" | "AutoRoles" | "AutoRoleTimers" | "AutoRoleInvites" | "StickyMessageRoleFilters", string>;
|
|
334
|
+
static t: Record<"StickyMessages" | "LinkedRoles" | "StatusRoles" | "Starboards" | "KickClips" | "StatCounters" | "BaseSyncableRoles" | "FullSyncableRoles" | "LiveRole" | "VoteSkipping" | "KickAuditLogs" | "LeaderboardCommand" | "RefreshingLeaderboard" | "LeaderBoardSyncRoles" | "BetaAccess" | "PriorityNotifications" | "KickNotifications" | "TwitchNotifications" | "ImportEmojis" | "ImportEmojisWithSub" | "CustomWebhooks" | "AnyMessageEditor" | "SyncSocialUsernames" | "AutoDeleteNotifications" | "TestNotificationCommand" | "CustomCooldowns" | "WelcomeAndLeaveNotifications" | "NotificationPingRoleId" | "SwitchStreamerAndGuildEmbeds" | "BirthdayNotifications" | "AllowNotSendingOfflineNotifications" | "AutoStatusLiveRoles" | "RumbleNotifications" | "AllowAutoPublishNotifications" | "NotificationOverrides" | "UseCustomButtons" | "AllowVodFeatures" | "TikTokNotifications" | "ManageBranding" | "CustomStarboards" | "AutoThreadOnStarboard" | "StarboardRewardRole" | "Giveaways" | "GiveawayLogs" | "ModifyGiveawayWhileRunning" | "ScheduleGiveaways" | "GiveawayRequirements" | "GiveawayBonusEntries" | "GiveawayEntryLimit" | "DisableDoubleVoteEntry" | "YouTubeNotifications" | "RandomMessages" | "WeeklyBirthdayPanel" | "GameNotifications" | "GameCategoryRouting" | "GameAllTimeLowAlerts" | "GameChangelogs" | "GameRobloxTracking" | "FixUrlWebhook" | "FixUrlCustomRules" | "KickClipperSubscribe" | "WhatnotNotifications" | "ScheduledEventMessages" | "ScheduledMessageWebhooks" | "ReactionRoles" | "AdvancedRolePanels" | "KickClipForwarding" | "TwitchClipForwarding" | "ClubNotifications" | "RolePanelWebhooks" | "Fishing" | "FishingCustomization" | "FishingWebhooks" | "StreamRoles" | "RoleFilters" | "TwitterNotifications" | "TwitterLiveNotifications" | "BadgeAllGames" | "AutoRoles" | "AutoRoleTimers" | "AutoRoleInvites" | "StickyMessageRoleFilters" | "GiveawayClaims" | "GiveawayWinnerRole" | "InfluencerPanel" | "InfluencerPanelPremium" | "InfluencerPanelPlus", string>;
|
|
320
335
|
static all: bigint;
|
|
321
336
|
convertBitToField<T extends EnumValues<typeof GuildFeatures>>(bit: T): string | null;
|
|
322
337
|
}
|