-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbot.js
More file actions
36 lines (30 loc) · 1.26 KB
/
bot.js
File metadata and controls
36 lines (30 loc) · 1.26 KB
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
const { Client, PermissionLevels } = require("klasa");
const config = require("./config.json");
const permissionLevels = new PermissionLevels()
.add(0, () => true)
.add(1, (m) => {
//m.member.roles.has(config.dvr) I tried, I failed. Here have some restoration
config.devs.includes(m.author.id);
}, { fetch: true })
.add(2, (m) => m.author.id === '478675118332051466' || m.author.id === '338600456383234058' || m.author.id === '292690616285134850' || m.author.id === '304737539846045696', { break: true, fetch: true })
.add(10, (m) => m.author.id === "277981712989028353" || m.author.id === "302604426781261824" || m.author.id === "292690616285134850" || m.author.id === "304737539846045696", { break: true, fetch: true });
class BananAPIClient extends Client {
constructor(app) {
super({
prefix: "b.",
regexPrefix: /^((hey,?\s*)?bananapi),?\s*/i,
commandEditing: true,
typing: false,
readyMessage: (client) => `${client.user.tag}, Ready to serve ${client.guilds.size} guilds and ${client.users.size} users`,
permissionLevels,
fetchAllMembers: true
});
this.app = app;
this.db = app.db;
this.config = config;
}
login() {
return super.login(this.config.token);
}
}
module.exports = BananAPIClient;