-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.ts
100 lines (95 loc) · 3.06 KB
/
types.ts
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
import { ThreadAutoArchiveDuration } from 'discord.js';
export type ThreadConfig = {
enabled: boolean;
/**
* The name of the thread, the following placeholders are available:
*
* - `{name}`: The name of the media module
* - `{date}`: The date of the submission
* - `{time}`: The time of the submission
* - `{author}`: The author of the submission
* - `{id}`: The ID of the submission
* - `{channel}`: The channel of the submission
* - `{link}`: The link to the submission
* - `{upvotes}`: The upvotes of the submission
* - `{downvotes}`: The downvotes of the submission
*/
name: string;
autoArchiveDuration: ThreadAutoArchiveDuration | null;
/** The rate limit per user (slowmode) for the thread in seconds */
rateLimitPerUser: number | null;
};
export type AppConfig = {
// /**
// * The Discord client information
// * @see https://discord.com/developers/applications
// */
// client: {
// id: string;
// token: string;
// };
/**
* The media modules to use
*/
mediaModules: MediaModule[];
};
export type MediaType = 'image' | 'video' | 'either';
export type MediaSource = {
name: string;
validationURLs: (string | 'attachment')[];
}
export type MediaModule = {
/**
* The unique identifier of this media module - changing this
* will cause the module to be treated as a new module
* and not retain any previous data
*/
id: string;
/** The name of this media module */
name: string;
/** The type of media this module supports */
type: MediaType;
/** The channel ID to listen for submissions in */
submissionsChannelId: string;
/** The channel ID to send submissions to */
submissionsOutputChannelId: string;
/**
* The cron schedule for when to output submissions
* @see https://crontab.guru/
*/
cronOutputSubmission: string;
/**
* The timezone for the cron schedule, e.g. 'America/New_York'
* @see https://momentjs.com/timezone/
*/
cronTimezone: string;
/** The emojis to indicate upvote and downvote */
votingEmojis: {
upvote: string;
downvote: string;
};
/** Should non-submission messages, like user feedback, be deleted? */
deleteNonSubmissions: boolean;
/**
* Allowed media sources
* @see src/media-sources.ts
*/
allowedSources: MediaSource[];
/** The amount of seconds a user should be on cooldown before submitting again */
submissionCooldown: number | null;
/** Quantities for submissions */
quantities: {
/** The maximum amount of submissions allowed */
maxSubmissions: number | null;
/** The maximum amount of submissions allowed per user */
maxSubmissionsPerUser: number | null;
/** The maximum amount of attachments allowed per submission */
attachmentsPerSubmission: number | null;
}
/** Should a public thread be created for organized feedback? */
submissionThread: ThreadConfig;
/** Should a public thread be created for the winning submission? */
winningSubmissionThread: ThreadConfig;
/** Should other reactions be automatically removed on submissions? */
blockOtherReactions: boolean;
};