From 24a2392446b3baf00bf81ad48454b08b12e491ed Mon Sep 17 00:00:00 2001 From: Kalissaac Date: Mon, 24 Aug 2020 14:42:00 -0700 Subject: [PATCH] Verify player is registered when creating matches --- src/commands/match.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/commands/match.js b/src/commands/match.js index b6bc4d5..134d168 100644 --- a/src/commands/match.js +++ b/src/commands/match.js @@ -20,8 +20,7 @@ module.exports = exports = { const create = async (message, GLOBALS) => { if (!message.guild) return message.reply('This command can only be run in a server!') - const playerInformation = await GLOBALS.db.collection('users').doc(message.author.id).get() - if (!playerInformation.exists) { + if (await GLOBALS.userIsRegistered(message.author.id) === false) { message.reply('You are not registered with ScrimBot. Please type `v!register` before creating a match!') return }