MeguminSama / discord-slash-commands

Node.JS Slash Commands for Discord
MIT License
100 stars 15 forks source link

fix package.json error #17

Closed Hector6704 closed 3 years ago

Hector6704 commented 3 years ago

Error when installing the module, the main script was wrong

MeguminSama commented 3 years ago

The structures are exported out to dist/index.js and dist/index.ts

you can import structures with

import {StructureName} from 'discord-slash-commands'

MeguminSama commented 3 years ago

Please provide me with the error you were getting so I can diagnose your problem

Hector6704 commented 3 years ago

Hi, yeah actually my PR didn't fix it. When starting my bot with npm, it's saying that it cannot find the index.js file (in the slash-commands module), and that the main script of your package.json is wrong

MeguminSama commented 3 years ago

did you install via npm or clone the package

Hector6704 commented 3 years ago

I'm using yarn

MeguminSama commented 3 years ago

yarn installs from the npm repository.

can you show me what's inside node_modules/discord-slash-commands ?

Hector6704 commented 3 years ago

Oh wait, does it only work for TS bots? Mine is JS

MeguminSama commented 3 years ago

The dist folder contains compiled JS code. it works for JS bots.