Changed the Mongodb structure to include what's in the database, added the 'r' and 'reactionrole' commands

This commit is contained in:
ION606
2022-05-14 20:40:58 +03:00
parent 44d65fce98
commit a69d50ce9f
5 changed files with 48 additions and 8 deletions
+2 -1
View File
@@ -211,7 +211,7 @@ module.exports = {
const client = new MongoClient(mongouri, { useNewUrlParser: true, useUnifiedTopology: true, serverApi: ServerApiVersion.v1 });
client.connect(err => {
const db = client.db(server);
const db = client.db(String(server) + "[ECON]");
const dbo = db.collection(id);
if (err) { return console.log(err); }
//Initialize if necessary
@@ -225,6 +225,7 @@ module.exports = {
//test area
if (command == 'xp' || command == 'adbal') {
//Selmer Dev only command
if (message.member.roles.cache.has('944048889038774302')) {
if (command == 'xp') {
return addxp(message, dbo, Number(args[0]), xp_list);
+9
View File
@@ -0,0 +1,9 @@
module.exports = {
name: 'reactionrole',
description: 'Creates an embed that will give a role when reacted to',
async execute(message, args, Discord, bot) {
if (bot.commands.get('verify').checkRole(message, args)) {
console.log("IS ADMNIN");
}
}
}