sapphire-support
discordjs-support
old-sapphire-support
old-discordjs-support
old-application-commands-and-interactions
TypeError: Cannot convert undefined or null to object
Complete Temlate Error
Discordjs and TypeScript typescript error
serialize a bigint Plugins
Overriding message command listeners
Fetch not calling JSON.stringify for body objects.
@sapphire/fetch
and trying to send a POST request for a API with a object on the body. The thing is: the object is not being stringified and the API is receiving [object Object]
.
I went through the @sapphire/fetch
source code and, apparently, the function that determines if a body should be stringified or not (shouldJsonStringify
) is returning false
for my object. (https://github.com/sapphiredev/utilities/blob/main/packages/fetch/src/lib/fetch.ts#L191-L208)
And just to make it clear, the object that i'm trying to send is in fact...a object, because using typeof theObject
returns object
lol, but its doesn't have a toJSON
function or a Object constructor, in fact it has a [Function: Object]
constructor, which is not included in the shouldJsonStringify
function....preconditions implementation
File Names
name
property in the options in the constructor / ApplyOptions. Furthermore, you will either have to use bulk overwrite or be very sure that you're tracking idHints otherwise you'll get name clashes when Sapphire attempts to do a comparison analysis to check for new dataCoodown
How do I make my bot "greet" a new member?
build version not working
typescript
to make the bot and after building it using tsc
, it said 0 commands found, like no commands available to use. so i just need the dist folder for production, right? do i need .sapphirerc.json too? or anything else am i missing?Why is ActivityType.Custom excluded from the presence ActivityOptions[]?
Using sapphire paginator is it possible to customize the pages names ?
APIInteractionGuildMember missing properties
member
has to have to properties like nickname, but they're not accessible. I haven't beed using discord.js
in a while as well as @sapphire/framework
, were there changes that could cause that? If not, please, do enlighten me on the matter, thanks.interaction.member
is DJS code, see https://discord.js.org/docs/packages/discord.js/14.15.3/CommandInteraction:Class#member
If you hover over member
you will see that intellisense tells you it's a union of GuildMember|APIInteractionGuildMember
and you need to specify that the guild is cached, or cast the type. This has been a thing since....... idk djs v14? I cant quite recall but a long long time anyway...Will the custom path in a store apply also when using cogs (or modules)?
this.stores.get('arguments').registerPath(join(this.rootData.root, 'options'));
this.stores.get('interaction-handlers').registerPath(join(this.rootData.root, 'interactions'));
this.stores.get('arguments').registerPath(join(this.rootData.root, 'options'));
this.stores.get('interaction-handlers').registerPath(join(this.rootData.root, 'interactions'));
events not firing
cli question
__dirname
, __filename
and some other globals anymore. See https://nodejs.org/api/esm.html...Weird string argument behaviour