Update main.js
This commit is contained in:
parent
eeaf817f56
commit
97527e461c
8
main.js
8
main.js
|
@ -33,6 +33,14 @@ function initializeDatabase() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
db.run('INSERT OR REPLACE INTO bot_state (key, value) VALUES (?, ?)',
|
||||||
|
['lastAnnouncedPrice', '195'],
|
||||||
|
(err) => {
|
||||||
|
if (err) console.error('Error setting initial price:', err);
|
||||||
|
else console.log('Initial price set successfully');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
async function fetchSolanaPrice() {
|
async function fetchSolanaPrice() {
|
||||||
try {
|
try {
|
||||||
const fetch = (await import('node-fetch')).default;
|
const fetch = (await import('node-fetch')).default;
|
||||||
|
|
Loading…
Reference in New Issue