Update main.js

This commit is contained in:
Wizzard 2024-11-15 13:14:15 -05:00
parent eeaf817f56
commit 97527e461c
1 changed files with 8 additions and 0 deletions

View File

@ -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() {
try {
const fetch = (await import('node-fetch')).default;