aiko-chan-ai / Discord-video-selfbot

for djs-selfbot-v13
https://github.com/dank074/Discord-video-stream
33 stars 8 forks source link

SyntaxError: await is only valid in async functions and the top level bodies of modules #6

Closed BurAndBY closed 1 year ago

BurAndBY commented 1 year ago

const voiceConnection = await StreamClient.joinVoiceChannel( ^^^^^

SyntaxError: await is only valid in async functions and the top level bodies of modules at Object.compileFunction (node:vm:352:18) at wrapSafe (node:internal/modules/cjs/loader:1033:15) at Module._compile (node:internal/modules/cjs/loader:1069:27) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) at node:internal/main/run_main_module:17:47

aiko-chan-ai commented 1 year ago

https://blog.saeloun.com/2021/11/25/ecmascript-top-level-await/