#What am I supposed to trust, the basic slash command registering? Or the Wiki's Commands section?

1 messages · Page 1 of 1 (latest)

ornate sundial
#

erm... oops? haha.

#

You can use @sapphire/cli to generate a template

ornate sundial
#

that's intentional because we automatically convert TS samples to ESM and CJS and that would mess with decorators

#

but whatever goes in ApplyOptions maps 1:1 with command options

ornate sundial
#

you can also check out some of the public repos:

prisma graniteBOT
#

Discord Bots using @sapphire/framework

v5.x

Legend for the identifiers

: Uses ESM (if not specified then uses CJS)
: Advanced bot (if not specified it is a simple bot, or not graded)
: Uses Docker in production
ᴶˢ: Written in JavaScript. If not specified then the bot is written in TypeScript.

slate hearth
ornate sundial
#

that seems to be a completely separate question. Please create your own thread.

slate hearth
#

and the new one, which is withResponse is no where similar to be usable in isMessageInstance

ornate sundial
#

oh well

#

point still stands that I replied to afterglow though

slate hearth
#

ok.. but im trying to say is that the example bots are not helpful, cause they also have not been updated

ornate sundial
#

gemboard, skyra, dragonite, archangel, and sapphire application commands examples all have been

#

the others youll have to bugger their creators, not us

slate hearth
#

ok actually.. dont make sure of this

ornate sundial
#

huh?

slate hearth
#
-     const msg = await interaction.reply({ content: `Ping?`, fetchReply: true, flags: 'Ephemeral' });
+     const msg = await interaction.reply({ content: `Ping?`, withResponse: true, flags: 'Ephemeral' });

and then you run into the issue that the reply is no longer a Message type but a InteractionCallbackResponse type
utility func would that be, instead of using #isMessageInstance

ornate sundial
#

Look at it this way, this is a good learning experience of reading documentation and trial and error. You learn nothing from getting everything spoonfed on a silver platter.

const callbackResponse = await interaction.reply({ content: `Ping?`, withResponse: true, flags: 'Ephemeral' });
const msg = callbackResponse.resource?.message;
slate hearth
#

well thanks for the learning experience. but the code is from the guide..

ornate sundial
#

took me a whole 2 seconds to find that property because typescript autocompleted it for me though

#

and ive never used this bit of code before

#

i didnt even know that was put in between by djs

#

just did a very quick variable. to see what intellisense pops up as options for what is available as properties

#

anyway

slate hearth
ornate sundial
#

You have to understand that it's not like we get paid to keep everything up to date (as much as we wish we would) and it's extremely tiresome work that none of us (that is to say, the maintainers) really want to constantly do, let alone have time to do. We all have full time jobs and/or studies in IT as developers and generally after a full day of working we just want to relax and do our own things instead of even more coding. We don't have the advantage of youth anymore.

slate hearth
ornate sundial
#

which is why we recommend people to make pull requests

ornate sundial
slate hearth
#

understandable.. will be making one when i think I figured it out... tbh.. i never worked typescript in bigger ecosystems before so its new to me

slate hearth
ornate sundial
#

We only have 1 version of the guide though. As you can see on the website, there is no version picker. Does Docusaurus support versioning guides? yes. Does that also require a lot of configuration and careful file management? also yes

slate hearth
#

ok I get that it might be an overhead but i can tell you, as a first time user this is very frustrating... If i would have at least known that the guide is not for my version, I woulnd have lost so much time

ornate sundial
#

I would love it if I had the motivation to do this and so many other things but I just dont. I'm just 1 person and it's a massive project.

slate hearth
#

yea... i know that from somewhere

ornate sundial
#

to give another example, if you go through the help channel you will notice that a good 95% of the questions are answered by me and me alone. I've been clammoring for years for the other developers to take this channel more serious and also answer questions but nothing has ever come from it.

slate hearth
#

a project is finished, when you end it.. thats how I see it. never found anyone to help out with mine, help with support or take it over

ornate sundial
#

sadly sapphire is never finished because discord api always changes and therefore discordjs always changes

#

and yeah if there would be other people supporting it wouldnt be so bad but there arent

#

occassionally we've had a person do a few contributions but people never stick around

slate hearth
#

would love to help, but I'm not a good js/ts dev and maintain way too much myself already as well

ornate sundial
#

im confident if there would be a team of at least 2-3 others who are active on the development then we'd all motivate each other and sapphire would move forward much more efficiently. I need only look at the project I work on for work as evidence for that.

#

I mean that's how sapphire got where it is now, with Kyra, Vladdy and I doing a lot and quickly.

slate hearth
#

im gald you found someone ^^'
im still a one man show, really.. while its ntoht e most complex projects.. I do have a few of them

slate hearth
# slate hearth ```diff - const msg = await interaction.reply({ content: `Ping?`, fetchReply...

im using const msg = await interaction.fetchReply(); now.. seems more common also with your bots

    await interaction.reply({ content: `Ping?`, flags: 'Ephemeral' });
    const msg = await interaction.fetchReply();

    if (!isMessageInstance(msg)) return interaction.editReply('Failed to retrieve ping :(');

    const diff = msg.createdTimestamp - interaction.createdTimestamp;
    const ping = Math.round(this.container.client.ws.ping);
    return interaction.editReply(`Pong 🏓! (Round trip took: ${diff}ms. Heartbeat: ${ping}ms.)`);
ornate sundial
#

ah

#

btw just my 2 cents but I wouldnt add a /ping in your final bot once you're all done 😉 Just add a /info similar to the ones that bots here have. You can add more info in it and it's actually useful for users. Ping was nice with message based commands because you can kinda hide it but really it's primarily a developer facing command and not really useful to end users. Because users already have loads and slash commands on their server / user, adding a fairly useless one to that is just bloat.

slate hearth
ornate sundial
#

mhm yeah

#

that's why I said when you're all done

slate hearth
#

i actually dont recall ever making a ping command on a production bot 😄