Ошибка в дискорд-боте client.user.setStatus('idle')?
Запускаю программу с ботом дискорда
client.user.setStatus('idle')
А выдаёт это:
TypeError: Cannot read property 'setStatus' of null
at Object. (D:\bot\index.js:81:13)
?[90m at Module._compile (node:internal/modules/cjs/loader:1102:14)?[39m
?[90m at Object.Module._extensions..js (node:internal/modules/cjs/loader:1131:10)?[39m
?[90m at Module.load (node:internal/modules/cjs/loader:967:32)?[39m
?[90m at Function.Module._load (node:internal/modules/cjs/loader:807:14)?[39m
?[90m at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)?[39m
?[90m at node:internal/main/run_main_module:17:47?[39m