Skip to content

Commit

Permalink
Verify player is registered when creating matches
Browse files Browse the repository at this point in the history
  • Loading branch information
Kalissaac committed Aug 24, 2020
1 parent cc7d7ef commit 24a2392
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/commands/match.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 24a2392

Please sign in to comment.