discordbot.js hatası

xMaster25

Femtopat
Katılım
2 Eylül 2020
Mesajlar
2
Merhabalar kendi Discord sunucum için bir Discord botu yapmaya karar verdim fakat botu ne yapsam bir türlü çalıştıramadım terminali açtığımda Node discordbot.js yazıyorum fakat karşıma söyle bir hata çıkıyor;

==============================================================================================================(Node: 6236) unhandledpromiserejectionwarning: Error [TOKEN_INVALID]: An invalid token was provided.
At websocketmanager. Connect (C:\Users\ensar\Desktop\dcbot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:133:26)
At Client. Login (C:\Users\ensar\Desktop\dcbot\node_modules\discord.js\src\client\Client.js:222:21)
(Use 'Node --trace-warnings ...' To show where the warning was created)
(Node: 6236) unhandledpromiserejectionwarning: Unhandled promise rejection. This error originated either by throwing Inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see Command line options | Node.js v14.9.0 Documentation). (rejection id: 1)
(Node: 6236) [DEP0018] deprecationwarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-Zero exit code.
==============================================================================================================

Bu hatayı nasıl çözeceğim yardımcı olur musunuz şimdiden yardımcı olacak kişilere teşekkür ederim.
 
Hortlatıyorum ama

C:\Users\mhmed\OneDrive\Masaüstü\app>node swea.js
(Node: 15744) unhandledpromiserejectionwarning: Error [TOKEN_INVALID]: An invalid token was provided.
At Client. Login (C:\Users\mhmed\OneDrive\Masaüstü\app\node_modules\discord.js\src\client\Client.js:206:52)
At object.<anonymous> (C:\Users\mhmed\OneDrive\Masaüstü\app\swea.js:61:8)
At module. _compile (internal/modules/cjs/loader.js:1085:14)
At Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
At module. Load (internal/modules/cjs/loader.js:950:32)
At function. Module. _load (internal/modules/cjs/loader.js:790:12)
At function. Executeuserentrypoint [as runMain] (internal/modules/run_main.js:76:12)
At internal/main/run_main_module.js:17:47
(Use 'Node --trace-warnings...' to show where the warning was created)
(Node: 15744) unhandledpromiserejectionwarning: Unhandled promise rejection. This error originated either by throwing Inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see Command-line options | Node.js v17.3.0 Documentation). (rejection id: 1)
(Node: 15744) [DEP0018] deprecationwarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-Zero exit code.
Hatası alıyorum masaüstünden kodluyorum bir denemek için tokeni env ye aldım glitchden geçmiştim glitch zaten kötü ama denemek için geçirmiştim.
 
Merhabalar kendi Discord sunucum için bir Discord botu yapmaya karar verdim fakat botu ne yapsam bir türlü çalıştıramadım terminali açtığımda Node discordbot.js yazıyorum fakat karşıma söyle bir hata çıkıyor;

==============================================================================================================(Node: 6236) unhandledpromiserejectionwarning: Error [TOKEN_INVALID]: An invalid token was provided.
At websocketmanager. Connect (C:\Users\ensar\Desktop\dcbot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:133:26)
At Client. Login (C:\Users\ensar\Desktop\dcbot\node_modules\discord.js\src\client\Client.js:222:21)
(Use 'Node --trace-warnings ...' To show where the warning was created)
(Node: 6236) unhandledpromiserejectionwarning: Unhandled promise rejection. This error originated either by throwing Inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see Command line options | Node.js v14.9.0 Documentation). (rejection id: 1)
(Node: 6236) [DEP0018] deprecationwarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-Zero exit code.
==============================================================================================================

Bu hatayı nasıl çözeceğim yardımcı olur musunuz şimdiden yardımcı olacak kişilere teşekkür ederim.
Bu hata, geçersiz bir Discord API tokeninin sağlandığını gösterir. Doğru tokeni sağladığınıza emin olun veya tekrar denemek için tokeni yeniden alın.
 
Hortlatıyorum ama

C:\Users\mhmed\OneDrive\Masaüstü\app>node swea.js
(Node: 15744) unhandledpromiserejectionwarning: Error [TOKEN_INVALID]: An invalid token was provided.
At Client. Login (C:\Users\mhmed\OneDrive\Masaüstü\app\node_modules\discord.js\src\client\Client.js:206:52)
At object.<anonymous> (C:\Users\mhmed\OneDrive\Masaüstü\app\swea.js:61:8)
At module. _compile (internal/modules/cjs/loader.js:1085:14)
At Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
At module. Load (internal/modules/cjs/loader.js:950:32)
At function. Module. _load (internal/modules/cjs/loader.js:790:12)
At function. Executeuserentrypoint [as runMain] (internal/modules/run_main.js:76:12)
At internal/main/run_main_module.js:17:47
(Use 'Node --trace-warnings...' to show where the warning was created)
(Node: 15744) unhandledpromiserejectionwarning: Unhandled promise rejection. This error originated either by throwing Inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see Command-line options | Node.js v17.3.0 Documentation). (rejection id: 1)
(Node: 15744) [DEP0018] deprecationwarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-Zero exit code.
Hatası alıyorum masaüstünden kodluyorum bir denemek için tokeni env ye aldım glitchden geçmiştim glitch zaten kötü ama denemek için geçirmiştim.
Glitchin kötü olduğu kanaatine nasıl vardınız?
 

Geri
Yukarı