Skip to content

Commit

Permalink
hopefully fix gettime function
Browse files Browse the repository at this point in the history
  • Loading branch information
tgoins committed Apr 13, 2018
1 parent 9959d04 commit c662b29
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/lib/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const giveXp = async (user: NatsukiUser, message: Message) => {
const { api } = Module.config
const baseRoute = `${api.address}/users`

const timeDiff: number = Date.now() - user.level.timestamp.getTime()
const timeDiff: number = Date.now() - new Date(user.level.timestamp).getTime()

if (timeDiff < timeForExp) {
return
Expand Down

0 comments on commit c662b29

Please sign in to comment.