-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
executable file
·152 lines (139 loc) · 4.33 KB
/
config.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
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
// config.js : sets the default bot configuration
// sets the required dependencies
const { GatewayIntentBits, Partials } = require('discord.js');
// default configuration for the bot
const config = {
bot: {
name: "stoopid",
version: "0.2-alpha",
description: ""
},
// array of user IDs that sets the user as the bot admin
admins: [],
// array of user IDs that sets the user as the bot support staff
support: [],
//idk lol
intents: [
GatewayIntentBits.DirectMessages,
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildEmojisAndStickers,
GatewayIntentBits.GuildInvites,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.GuildPresences,
GatewayIntentBits.MessageContent
],
partials: [
Partials.Channel,
Partials.GuildMember,
Partials.GuildScheduledEvent,
Partials.Message,
Partials.Reaction,
Partials.ThreadMember,
Partials.User
],
// default settings for the bot
defaultSettings: {
prefix: '.dev ',
gptprefix: 'gpt',
systemNotice: 'true',
commandReply: 'true',
welcomeMessage: [
'{{user}} has joined this server! Welcome!',
'Say hello to our new member {{user}}!',
'{{user}} just hopped into our server!'
],
welcomeEnabled: 'false',
NSFWEnabled: 'false'
},
// Permission Levelling System
// It is a useful system that categorises the bot users into levels depending on
// which permissions they have or user type. You can use this to limit which command users can use
permLevels: [
{
level: 0,
name: 'User',
check: () => true,
exception: []
},
{
level: 2,
name: 'Moderator',
check: message => {
try {
const perms = [
'MANAGE_ROLES',
'MANAGE_NICKNAMES',
'MANAGE_CHANNELS',
'MANAGE_MESSAGES',
'MANAGE_THREADS',
'MUTE_MEMBERS',
'KICK_MEMBERS',
'BAN_MEMBERS',
'READ_MESSAGES',
'SEND_MESSAGES'
];
if (
message.member.permissions.has(perms) ||
message.member.permissions.has('ADMINISTRATOR')
)
return true;
} catch (e) {
return false;
}
},
exception: []
},
{
level: 3,
name: 'Administrator',
check: message => {
try {
const perms = ['ADMINISTRATOR'];
if (message.member.permissions.has(perms)) return true;
} catch (e) {
return false;
}
},
exception: []
},
{
level: 4,
name: 'Server Owner',
check: message => {
const serverOwner = message.author ?? message.user;
return message.guild?.ownerId === serverOwner.id;
},
exception: []
},
{
level: 8,
name: 'Bot Support',
check: message => {
const botSupport = message.author ?? message.user;
return config.support.includes(botSupport.id);
},
exception: []
},
{
level: 9,
name: 'Bot Admin',
check: message => {
const botAdmin = message.author ?? message.user;
return config.admins.includes(botAdmin.id);
},
exception: []
},
{
level: 10,
name: 'Bot Owner',
check: message => {
const owner = message.author ?? message.user;
return owner.id === process.env.owner;
},
exception: []
}
]
};
// exports functions and variables from this file as a module to use anywhere in the client
module.exports = config;