can i edit the frame work to apply custom commands or not.
So i want to edit the frame work to make it able to handle custom commands i am using mongo db for the data storing of custom commands. Is it possible if yes how can i do it
16 Replies
Sapphire is literally meant to allow you to build custom commands. It ships with no premade commands.
oh nice where is the specfic file that i can write code for it so it can find the data and run custom commands
i am pretty new to it so sorry i am being dumb
You might want to read https://www.sapphirejs.dev/docs/Guide/getting-started/getting-started-with-sapphire then
If you're just getting started with sapphire for the first time I recommend you read the guide: https://www.sapphirejs.dev/docs/Guide/getting-started/getting-started-with-sapphire
As far as your database goes, you can implement it however you want, sapphire has no build in database and lets you do whatever you want (including not having a db at all). Personally I have my DB assessable on the container which you can also find out about by reading the guide.
Sapphire Framework
Getting started with Sapphire | Sapphire
To install Sapphire, you need to install both discord.js and @sapphire/framework. You can do this by running the
If you are new to coding, it is advised to learn JS first then a bot,
lol beat you
I think hes trying to do where you do
>command create name
and then when you run >name
it executes it as thatyeah
thats what i want
Yeah but I answered both their questions
apparently not
^^
Ohh
In that case you'll probably want to create a command (or a few) to manage creating/editing/deleting the custom "commands" and a listener to listen to the unknown command event and the look to see if its a valid custom "command" to reply to.
Again you can implement the db however you want and I still recommend putting it in the container.
alr ty for the help one last question how can i do the listers part like what event should i put
There should be an unknown
message command event
or something like that
That gets triggered when the bot sees a message with the prefix but cant map it to a message commandcant find that in my case i will do some digging and see if i can make that
Solution
ty