Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Isabella Skořepová
travian
Commits
64b8ce12
Commit
64b8ce12
authored
Sep 15, 2017
by
Isabella Skořepová
Browse files
Add safety timeout
⏰
parent
b1ea8b25
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bot.js
View file @
64b8ce12
...
...
@@ -13,6 +13,7 @@ async function bot(travian) {
const
time
=
await
travian
.
getTimeWhenUpgradePossible
(
building
.
id
)
if
(
!
time
)
{
console
.
log
(
'
adding lowest level resource building
'
)
await
timeout
(
5000
)
await
travian
.
upgradeBuilding
(
building
.
id
)
}
else
{
const
ms
=
time
.
getTime
()
-
Date
.
now
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment