alexemanuelol / rustplusplus

A NodeJS Discord Bot that uses the rustplus.js library to utilize the power of the Rust+ Companion App with additional Quality-of-Life features.
GNU General Public License v3.0
198 stars 99 forks source link

Error: Cannot find module 'node:events' #14

Closed Owned67 closed 2 years ago

Owned67 commented 2 years ago

`npm install npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@discordjs/collection@0.2.4', npm WARN EBADENGINE required: { node: '>=16.0.0', npm: '>=7.0.0' }, npm WARN EBADENGINE current: { node: 'v14.16.0', npm: '8.5.0' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@discordjs/rest@0.1.1-canary.0', npm WARN EBADENGINE required: { node: '>=16.0.0' }, npm WARN EBADENGINE current: { node: 'v14.16.0', npm: '8.5.0' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'discord.js@13.6.0', npm WARN EBADENGINE required: { node: '>=16.6.0', npm: '>=7.0.0' }, npm WARN EBADENGINE current: { node: 'v14.16.0', npm: '8.5.0' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@discordjs/builders@0.11.0', npm WARN EBADENGINE required: { node: '>=16.0.0', npm: '>=7.0.0' }, npm WARN EBADENGINE current: { node: 'v14.16.0', npm: '8.5.0' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@discordjs/collection@0.4.0', npm WARN EBADENGINE required: { node: '>=16.0.0', npm: '>=7.0.0' }, npm WARN EBADENGINE current: { node: 'v14.16.0', npm: '8.5.0' } npm WARN EBADENGINE }

up to date, audited 210 packages in 2s

12 packages are looking for funding run npm fund for details

found 0 vulnerabilities `

`F:\rust\rustPlusPlus>node index.js internal/modules/cjs/loader.js:883 throw err; ^

Error: Cannot find module 'node:events' Require stack:

edit: updating nodejs in progress..

Owned67 commented 2 years ago

so okay, sometinh wrong:

node index.js
2022-2-11 18:05:09 INFO: LOGGED IN AS: RustPlus#3143
2022-2-11 18:05:09 INFO: Waiting 5 seconds to make sure all text channels are created
2022-2-11 18:05:10 ERROR: {"rawError":{"message":"Missing Access","code":50001},"code":50001,"status":403,"method":"put","url":"https://discord.com/api/v9/applications/XXXXXXXXXXXXXXXXXX/guilds/268XXXXXXXXXXXXXXX/commands"}

RustPlusPlus channel is created with a lot settings... so idk what is wrong with this message above

alexemanuelol commented 2 years ago

By the looks of it you didn't create the bot invitation with the correct options. Check the README in the section 'Create a discord bot'.

Click on OAuth2 tab on the website. Scroll down to OAuth2 URL Generator. Check the following boxes: bot and applications.commands Scroll down to Bot permissions and select the following: Administrator Copy the URL (This is used to invite you discord bot to discord servers (guilds))

Owned67 commented 2 years ago

Bot have administrator privileges, i can't make better and ive follow the readme

alexemanuelol commented 2 years ago

Have you selected bot and applications.commands?

alexemanuelol commented 2 years ago

Because I think it's the applications.commands that might be missing

Owned67 commented 2 years ago

Have you selected bot and applications.commands?

ye rustplus s

alexemanuelol commented 2 years ago

Is it possible that its the same bot you used for the other bot? Try to Create a completely new discord bot.

Owned67 commented 2 years ago

no it's a new bot

alexemanuelol commented 2 years ago

What nodejs version are you running?

alexemanuelol commented 2 years ago

https://flutterq.com/solved-discordapierror50001-missing-access/ Test solution 2

alexemanuelol commented 2 years ago

Oh nevermind, that was for another problem. Your problem is solution 1...

Owned67 commented 2 years ago

What nodejs version are you running?

v16.14.0

Owned67 commented 2 years ago

i can't make better sorry, ive follow your readme...

alexemanuelol commented 2 years ago

https://stackoverflow.com/questions/68886388/trying-to-register-commands-discordapierror50001-missing-access

Same problem, same solution...

Owned67 commented 2 years ago

https://stackoverflow.com/questions/68886388/trying-to-register-commands-discordapierror50001-missing-access

Same problem, same solution...

Ive re created and same.. have you see my gif??? i can't make better guy...

alexemanuelol commented 2 years ago

I saw the GIF, did you re-invite the bot to your discord server?

alexemanuelol commented 2 years ago

Or did you just click the copy button?

Owned67 commented 2 years ago

Ive re created and same.

Ive re created and same.

alexemanuelol commented 2 years ago

Did you remove it from your server and re-invite:ed?

Owned67 commented 2 years ago

It's again a new bot and other was kicked and all channel removed before invit him

alexemanuelol commented 2 years ago

https://discordjs.guide/preparations/adding-your-bot-to-servers.html#creating-and-using-your-invite-link

Hit me up on Discord instead: Alexemanuelol#8259

Owned67 commented 2 years ago

I know how to invite a bot thanks ^^ Im off for tonight, tomorrow im up ;)

alexemanuelol commented 2 years ago

Okioki, then Im afraid I can't really help you 😕

Owned67 commented 2 years ago

that weird really, im checking in files, open 268426701401227264.json and found:


 "channelId": {
    "category": "941782038401409034",
    "information": "941782039412215828",
    "servers": "941782040146219039",
    "settings": "941782040846671874",
    "events": "941782042318876763"
  },
``` all is created so why it give this error? :x
alexemanuelol commented 2 years ago

It's when it's trying to register the Slash Commands for your guild. And usually it is solved by adding the 'applications.commands' to the invitation URL.

Owned67 commented 2 years ago

Solved