McDefault - Hello y'all Im trying to follow the c...
Hello y'all> Im trying to follow the create basic slash cmd guide, but the example code is giving an error on
isMessageInstance(msg)
Type not assignable
https://www.sapphirejs.dev/docs/Guide/getting-started/creating-a-basic-app-command
Sapphire Framework
Creating a basic slash command | Sapphire
This section covers the absolute minimum for setting up a slash command. We have an entire "Application Commands"
23 Replies
deduplicate your dependencies. You have conflicting versions of discord-api-types
also good lord man clean up those scripts.
all that
prettier-format:win32
is completely unnecessary
prettier \"./src/**/*.ts\" --write
works on all platforms and automatically loads .prettierrc
Thank you for your reply. What duplicates are you referring to exactly? I'm not sure which one your mean
these?
those arent the same so no
im referring to running https://docs.npmjs.com/cli/v9/commands/npm-dedupe?v=true or the yarn equivalent
npm-dedupe | npm Docs
Reduce duplication in the package tree
Right. Thank you for the suggestion. I have run it now and still seem to have issues
uh
update your deps
most of them are outdated
sapphire is on 3.1.4, djs is 13.12.0, etc.
npx npm-upgrade
when using npm
pretty sure djs 13.9 just has a different discord-api-types transient dep than sapphire 3.1.3 doesyeah was about to ask that thx
not v14 right
no
13.12.0
I guess npm-upgrade might not list that... common npm L compared to yarn
ill just do it myself lol
apart from that
npx npm-upgrade
is pretty handyjust use https://marketplace.visualstudio.com/items?itemName=pflannery.vscode-versionlens otherwise, it offers a similar but offers different options for semver scoping
Version Lens - Visual Studio Marketplace
Extension for Visual Studio Code - Shows the latest version for each package using code lens
(gif in the readme)
Im on webstorm
oh webstorm has it integrated lol
still same error lol
idk man. dump code on gh or something,.
Ehh ima ditch this framework 🚀 Ill check back in few months to see if it will improve
ty for the help anyways
this issue is not even related to the framework
but sure
bye i guess
._.
I hate to say it but this isn't an issue in the framework... Without a reproduction sample we cannot help. When in doubt, if you have clashing versions, nuke package-lock and node_modules and reinstall deps
I doubt thats the case, I did all the updates and dedupe
If you want, you can toss a package.json to me
Docs should def. be updated for new people not known to the fw
we have a guide, we have a cli to generate a production ready example bot, we have many examples, we have many other bots using the fw. What more do you want. Did you even read the guide for starters.
that sounds promising
using CLI helped thanks for the tip
awesome docker implementation too, kudos