🐛 workTimeout should be credits.workTimeout

This commit is contained in:
Axel Olausson Holtenäs 2022-03-15 17:36:37 +01:00
parent 7a129b7ac0
commit 25a1739714
No known key found for this signature in database
GPG key ID: E3AE7E194AE017ED
2 changed files with 2 additions and 10 deletions

View file

@ -19,7 +19,7 @@ module.exports = async (interaction) => {
});
const guild = await guilds.findOne({
guildId: interaction.member.guild.id,
guildId: member.guild.id,
});
// If user is not on timeout
@ -85,7 +85,7 @@ module.exports = async (interaction) => {
const embed = {
title: 'Work',
description: `You have worked within the last ${
guild.workTimeout / 1000
guild.credits.workTimeout / 1000
} seconds, you can not work now!`,
timestamp: new Date(),
color: config.colors.error,

View file

@ -71,14 +71,6 @@ const guildSchema = new mongoose.Schema(
type: mongoose.SchemaTypes.Number,
default: 5000,
},
workRate: {
type: mongoose.SchemaTypes.Number,
default: 15,
},
workTimeout: {
type: mongoose.SchemaTypes.Number,
default: 900000,
},
},
},
{ timestamps: true }