diff --git a/MigrateDB.js b/MigrateDB.js index 989c3b5..727e706 100644 --- a/MigrateDB.js +++ b/MigrateDB.js @@ -9,7 +9,7 @@ const newDBUrl = process.env.NEWMONGO_DB; async function migrateUsers() { try { - await mongoose.connect(oldDBUrl, { useNewUrlParser: true }); + await mongoose.connect(oldDBUrl, { useNewUrlParser: true, useUnifiedTopology: true, }); console.log('Connected to old MongoDB'); const usersToMigrate = await UserOld.find({}).exec(); diff --git a/index.js b/index.js index 1c758f4..0a1dbe6 100644 --- a/index.js +++ b/index.js @@ -76,14 +76,7 @@ client.on(Events.InteractionCreate, async (interaction) => { ); return; } - if (!await staff.findOne({ _id: interaction.user.id }) - ) { - await interaction.reply({ - content: "You are not authorized to use this command!", - ephemeral: true, - }); - return; - } +