-
Notifications
You must be signed in to change notification settings - Fork 9
/
config.example.js
119 lines (105 loc) · 3.46 KB
/
config.example.js
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
const cluster_id = "dev-env"
const config = {
// tokens
current_token: "",
live_token: "",
donor_status_manager_token: "",
chewey_token: "",
weeb_token: "",
discord_app_public_key: "",
lastfm_key: "",
lastfm_sec: "",
// usernames/identifiers
sql_user: "",
redis_user: "",
weeb_identifier: "",
client_id: "",
// The ID of the user Amanda loves and should send messages to every interval (inspirational is what's used in Amanda official. Amanda loves you, Troy <3)
amandas_lover_id: "",
// passwords
sql_password: "",
redis_password: "",
lavalink_password: "youshallnotpass",
// service connections
sql_domain: "",
redis_domain: "",
website_protocol: "http",
website_domain: "localhost:10400",
chewey_api_url: "https://api.chewey-bot.top",
ipc_protocol: "ws",
ipc_bind: "localhost:10400",
// this gateway cluster
cluster_id,
shards: [0],
is_dev: true,
// settings/global (not synced)
total_shards: 1,
dash_enabled: true,
music_enabled: true,
db_enabled: true,
redis_enabled: true,
add_url_for_web_redirect: "",
lavalink_default_search_prefix: "scsearch:",
search_extra_source_options: [{
name: "Soundcloud",
value: "sc"
}],
website_port: 10400,
lavalink_nodes: [{
host: "localhost",
port: 10402,
invidious_origin: "",
enabled: 1,
search_with_invidious: 0,
name: "DEV",
password: "youshallnotpass",
id: "dev"
}],
standard_embed_color: 0x2f3136,
error_log_channel_id: "",
donor_payments_enabled_on_this_cluster: false,
// How often Amanda should send messages to the one she loves. Starts the Interval when the website process starts or when the lover file is reloaded
amandas_lover_send_timeout: 1000 * 60 * 60 * 24,
lover_messages_enabled_on_this_cluster: false,
lover_messages: [
"I love you <3"
],
second_matcher_regex: /(^matcher$)|(^somethingelse2$)/,
second_matcher_group_precedence: [1, 2], // 1 based indexing
second_matcher_map: { // values can be "search" or "id". The key is the index of the group of the regex
1: "search",
2: "id"
},
second_id_to_uri: (id) => `https://example.com/${id}`,
// constants
patreon_url: "",
paypal_url: "",
twitch_url: "",
server_url: "",
invite_link_for_help: "",
stats_url: "",
privacy_url: "",
terms_url: "",
todo_url: "",
add_url: "",
// image placeholders
unknown_placeholder: "",
local_placeholder: ""
}
// Auto populate some of the config options
if (!config.live_token.length) config.live_token = config.current_token
if (!config.client_id.length && config.current_token.length) config.client_id = Buffer.from(config.current_token.split(".")[0] || "dW5rbm93bg==", "base64").toString("utf8")
if (!config.add_url_for_web_redirect.length && config.current_token.length) config.add_url_for_web_redirect = `https://discord.com/api/oauth2/authorize?client_id=${config.client_id}&permissions=0&scope=bot%20applications.commands`
if (!config.weeb_identifier.length) config.weeb_identifier = `Amanda/1.0.0/${config.is_dev ? "dev" : "prod"}`
const baseURL = `${config.website_protocol}://${config.website_domain}`
config.patreon_url = `${baseURL}/to/patreon`
config.paypal_url = `${baseURL}/to/paypal`
config.server_url = `${baseURL}/to/server`
config.stats_url = `${baseURL}/to/stats`
config.privacy_url = `${baseURL}/to/privacy`
config.terms_url = `${baseURL}/to/terms`
config.todo_url = `${baseURL}/to/todo`
config.add_url = `${baseURL}/to/add`
config.local_placeholder = `${baseURL}/images/local.webp`
config.unknown_placeholder = `${baseURL}/images/unknown.webp`
module.exports = config