Javascript 如何从Github代表处自动更新和覆盖index.js文件
我正在开发一个selfbot,目前正在将其转换为.exe,我想知道(如果可能的话)如何检查github rep,如果index.js不同,覆盖现有的文件,我在想这一点Javascript 如何从Github代表处自动更新和覆盖index.js文件,javascript,node.js,github,Javascript,Node.js,Github,我正在开发一个selfbot,目前正在将其转换为.exe,我想知道(如果可能的话)如何检查github rep,如果index.js不同,覆盖现有的文件,我在想这一点 client.on('ready', async () => { fetch('https://github.com/StayWithMeSenpai/Delphinium/blob/master/index.js') .then(res => { res.text()
client.on('ready', async () => {
fetch('https://github.com/StayWithMeSenpai/Delphinium/blob/master/index.js')
.then(res => { res.text()
.then(body => {
body = body.replace("\n", "")
fs.writeFile('index.js', res)
})
})
})