This repository was archived by the owner on Dec 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdatabase.js
131 lines (125 loc) · 4.79 KB
/
database.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
const { connect, Schema, model } = require("mongoose");
connect(
process.env.db,
{ useNewUrlParser: true, useUnifiedTopology: true }
)
.then(() => console.log("[MongoDB Gateway] | Online."))
.catch(() =>
console.log("[ERRO] | Não foi possível se conectar ao banco de dados.")
);
const UserSchema = new Schema({
_id: { type: String, required: true },
punishments: {
mutes: { type: Array, default: [] },
autobot: { type: Array, default: [] }
},
biografia: {
type: String,
default: "Olhe para mim, sou uma linda borbuleta! Use a?biografia <bio> para definir uma biografia nova."
},
casado: { type: Array, default: "Solteiro" },
animecoins: { type: Number, default: 0 },
dinsujo: { type: Number, default: 0 },
dailyCooldown: { type: Number, default: 0 },
repCooldown: { type: Number, default: 0 },
roubarCooldown: { type: Number, default: 0 },
trabalharCooldown: { type: Number, default: 0 },
crimeCooldown: { type: Number, default: 0 },
clonaCooldown: { type: Number, default: 0 },
rep: { type: Number, default: 0 },
cor: { type: String, default: "#69cf65" },
medalhas: {
natalv1: { type: Boolean, default: false }
},
loja: {
cidadenoite: { type: String, default: "Comprado." },
garotamascara: { type: String, default: "Não comprado." },
bellcraner: { type: String, default: "Não comprado." },
tanjironezuko: { type: String, default: "Não comprado." },
nakiriayame: { type: String, default: "Não comprado." },
kanna: { type: String, default: "Não comprado." },
megumin: { type: String, default: "Não comprado." },
shinobu: { type: String, default: "Não comprado." },
gokublack: { type: String, default: "Não comprado." },
satorugojo: { type: String, default: "Não comprado." },
space: { type: String, default: "Não comprado." },
akaza: { type: String, default: "Não comprado." },
akazoficial: { type: String, default: "Não comprado." },
douma1: { type: String, default: "Não comprado." },
cybergirl: { type: String, default: "Não comprado." },
koalas: { type: String, default: "Não comprado."},
keitaro: { type: String, default: "Não comprado."},
saokirito: { type: String, default: "Não comprado."},
hantengu: { type: String, default: "Não comprado."},
makisan: { type: String, default: "Não comprado."},
floresta: { type: String, default: "Não comprado."},
rengoku: { type: String, default: "Não comprado."},
bartsimpson: { type: String, default: "Não comprado."},
supersaiyajin: { type: String, default: "Não comprado."},
raiden: { type: String, default: "Não comprado."},
nossoamor: { type: String, default: "Não comprado."},
arcane: { type: String, default: "Não comprado." }
},
equipado: { type: String, default: "cidadenoite" },
config: {
protecaoroleta: { type: String, default: "ON" },
protecaoraspadinha: { type: String, default: "ON" },
notificarep: { type: Boolean, default: false },
notificarob: { type: Boolean, default: false },
notificarwork: { type: Boolean, default: false },
notificardaily: { type: Boolean, default: false },
notificarcrime: { type: Boolean, default: false }
},
});
const BaninfoSchema = new Schema({
_id: { type: String, required: true },
motivo: { type: String, default: "Sem motivo informado." },
data: { type: String, required: true },
autor: { type: String, default: "Equipe AnimesOnline.Games" },
banido: { type: String, required: true },
provas: { type: Array, default: [] }
});
const LevelSchema = new Schema({
userID: { type: String },
guildID: { type: String },
xp: { type: Number, default: 0 },
level: { type: Number, default: 0 },
lastUpdated: { type: Date, default: new Date() }
});
const guildSchema = new Schema({
_id: { type: String, required: true },
diadocalendario: { type: String, default: "sabádo" },
manutencao: { type: Boolean, default: false },
ytdata: { type: String, default: "" },
newsdata: { type: String, default: "" },
lancadata: { type: String, default: "" },
repschedule: [{
_id: { type: String },
schedule: { type: Date }
}],
dailyschedule: [{
_id: { type: String },
schedule: { type: Date }
}],
workschedule: [{
_id: { type: String },
schedule: { type: Date }
}],
robschedule: [{
_id: { type: String },
schedule: { type: Date }
}],
crimeschedule: [{
_id: { type: String },
schedule: { type: Date }
}]
})
const HalloweenSchema = new Schema({
_id: { type: String, required: true },
candy: { type: Number, default: 0 }
});
module.exports.BanInfo = model("BanInfo", BaninfoSchema);
module.exports.Halloween = model("Halloween", HalloweenSchema);
module.exports.Users = model("Users", UserSchema);
module.exports.Levels = model("Levels", LevelSchema);
module.exports.Guilds = model("Guilds", guildSchema);