Added toke counter to statistics schema
This commit is contained in:
parent
80f0c5435f
commit
dc01b8a15a
2 changed files with 28 additions and 1 deletions
|
|
@ -17,6 +17,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.*/
|
|||
//Local Imports
|
||||
const tokeCommandModel = require('../../schemas/tokebot/tokeCommandSchema');
|
||||
const {userModel} = require('../../schemas/userSchema');
|
||||
const statModel = require('../../schemas/statSchema');
|
||||
const statSchema = require('../../schemas/statSchema');
|
||||
|
||||
|
||||
module.exports = class tokebot{
|
||||
|
|
@ -117,6 +119,8 @@ module.exports = class tokebot{
|
|||
|
||||
//Asynchronously tattoo the toke into the users documents within the database so that tokebot doesn't have to wait or worry about DB transactions
|
||||
userModel.tattooToke(this.tokers);
|
||||
//Do the same for the global stat schema
|
||||
statSchema.tattooToke(this.tokers);
|
||||
|
||||
//Set the toke cooldown
|
||||
this.cooldownCounter = this.cooldownTime;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue