Maybe move the implementation of these commands to a separate file so it'll be easier to remove these commands later. I don't like having test commands in the actual bot, maybe wrap them in a if (process.env.NODE_ENV == "dev") to be safe. In the future we will be writing integration tests for this.
Maybe move the implementation of these commands to a separate file so it'll be easier to remove these commands later. I don't like having test commands in the actual bot, maybe wrap them in a `if (process.env.NODE_ENV == "dev")` to be safe. In the future we will be writing integration tests for this.
if you are using await, then you can do something like
const db = await openDB()
db.run('...')
One of the reasons to use async/await is to avoid a bunch of .thens
if you are using await, then you can do something like
```
const db = await openDB()
db.run('...')
```
One of the reasons to use async/await is to avoid a bunch of `.then`s
changed this line in [version 2 of the diff](/csc/discord-bot/-/merge_requests/4/diffs?diff_id=56136&start_sha=cd92da309fff2a333752d564af1bba4092ee5668#7030d0b2f71b999ff89a343de08c414af32fc93a_16_16)
changed this line in [version 2 of the diff](/csc/discord-bot/-/merge_requests/4/diffs?diff_id=56136&start_sha=cd92da309fff2a333752d564af1bba4092ee5668#a123abce010ea7d96fa76c6a9040950b5dac59bc_50_48)
changed this line in [version 2 of the diff](/csc/discord-bot/-/merge_requests/4/diffs?diff_id=56136&start_sha=cd92da309fff2a333752d564af1bba4092ee5668#a123abce010ea7d96fa76c6a9040950b5dac59bc_62_48)
changed this line in [version 2 of the diff](/csc/discord-bot/-/merge_requests/4/diffs?diff_id=56136&start_sha=cd92da309fff2a333752d564af1bba4092ee5668#a123abce010ea7d96fa76c6a9040950b5dac59bc_55_48)
added 1 commit
<ul><li>543689e4 - change line endings to crlf</li></ul>
[Compare with previous version](/csc/discord-bot/-/merge_requests/4/diffs?diff_id=56142&start_sha=3634c513953db6606bd818a97e84d12509831e5b)
changed this line in [version 6 of the diff](/csc/discord-bot/-/merge_requests/4/diffs?diff_id=56148&start_sha=9e55e5407c2094f372a6f031e2458217778797b0#a5cc2925ca8258af241be7e5b0381edf30266302_5_5)
database component exports a sqlite database with the openDb async function.
I think we should keep this file to automatically set up formatting on save within VS Code
forgot to remove?
what changed in this file?
maybe make this a dev dependency?
Maybe move the implementation of these commands to a separate file so it'll be easier to remove these commands later. I don't like having test commands in the actual bot, maybe wrap them in a
if (process.env.NODE_ENV == "dev")
to be safe. In the future we will be writing integration tests for this.what's
flag
for? it seems to be always trueif you are using await, then you can do something like
One of the reasons to use async/await is to avoid a bunch of
.then
schanged this line in version 2 of the diff
changed this line in version 2 of the diff
changed this line in version 2 of the diff
changed this line in version 2 of the diff
added 1 commit
65751723
- merge fixes and add gitattributesCompare with previous version
added 2 commits
35c3e23f
- fix line endings3634c513
- fix line changesCompare with previous version
added 1 commit
543689e4
- change line endings to crlfCompare with previous version
we probably want to gitignore the entire
/db
dir just to be safeadded 2 commits
278cd99c
- update gitattributes9e55e540
- update gitattributesCompare with previous version
changed this line in version 6 of the diff
added 1 commit
5acdd116
- update gitignoreCompare with previous version
added 1 commit
f0214b58
- restore vscode settingsCompare with previous version
maybe we want this outside of the switch statement, since there's one inside
testDb
nit: I prefer
openDB
since it's an acronymforgot to resolve conflict?