Skip to content

Update CommandHandler.ts#23

Open
Peter-MJ-Parker wants to merge 1 commit into
AlexzanderFlores:mainfrom
Peter-MJ-Parker:patch-1
Open

Update CommandHandler.ts#23
Peter-MJ-Parker wants to merge 1 commit into
AlexzanderFlores:mainfrom
Peter-MJ-Parker:patch-1

Conversation

@Peter-MJ-Parker
Copy link
Copy Markdown

This change fixes a bug with the cooldowns map. I have only ran into it once but I tried to throw the error where the cooldown type is used outside of a guild with the user attached. It threw the error and tried to attach the expiry time of 7 minutes. When I have the dbRequired set to 5 minutes, it will try to input the info to mongo. Since it sent "ERROR" to the db, it also tried to input the time but it failed and sent a mongo error stating it could not insert a string to Date property.

This change fixes a bug with the cooldowns map. I have only ran into it once but I tried to throw the error where the cooldown type is used outside of a guild with the user attached. It threw the error and tried to attach the expiry time of 7 minutes. When I have the dbRequired set to 5 minutes, it will try to input the info to mongo. Since it sent "ERROR" to the db, it also tried to input the time but it failed and sent a mongo error stating it could not insert a string to Date property.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant