Sapphire - Imagine a framework

SIA

Sapphire - Imagine a framework

Welcome to the Sapphire Discord server! The next-gen object-oriented Discord.js bot framework can be found here.

Join

sapphire-support

discordjs-support

old-sapphire-support

old-discordjs-support

old-application-commands-and-interactions

Problem with ChannelSelectMenuBuilder

THis are my options for it: ```js new ChannelSelectMenuBuilder() .setCustomId('select-ticket-category-dropdown')...

Detect when new message is a reply to another one

Hey! Is it possible to detect when a message is a reply? I have a schedules system that automatically replies to you when you tag a member that's not currently available. I'd like the bot to differentiate between explicit mentions (i.e. @member) and message replies, which technically include a mention too. ...
Solution:
get the referenced message (if one exists), then check the message type to check whether its a reply

Making multi-line embed descriptions cleaner

Currently using backticks ( ` ) for embeds but I have to keep them all the way to the left for them to format properly If I put them normally in-line in the code then they look weird and indented on mobile Is there a way to fix this?...
Solution:
``js .setDescription([ Message Link: ${targetMessage.ur}, Message Content: "${targetMessage.content}"`, '',...
No description

Just like there's Member Exit Audit Log, is there Member Join Audit log?

Basically the question. I didn't find any such relevant Audit log type. The closest I could find is MEMBER_UPDATE...

Autocomplete api error on vps but not locally

What I'm responding with:
2|Massive-Moderation | [ { name: '@acierdev', value: '234018417043046400' } ]
2|Massive-Moderation | [ { name: '@acierdev', value: '234018417043046400' } ]
Error: ```2|Massive-Moderation | [ERROR] Encountered error while handling an autocomplete run method on command "ban" at path "/root/Massive/Moderation/src/commands/ban.js" DiscordAPIError: Invalid Form Body 2|Massive-Moderation | data.choices[0]: Expected an object/dictionary. 2|Massive-Moderation | at RequestHandler.execute (/root/Massive/Moderation/node_modules/discord.js/src/rest/RequestHandler.js:350:13)...

Command not registering

I've worked on this command about 3 days ago hoping it'd register and it's not registering but all of my other command are: https://sourceb.in/IOy0a5ZSIX Could someone please try and see what I am doing wrong?...
Solution:
Update your Sapphire dependency. ```ts chatInputCommand: { register: true, behaviorWhenNotIdentical: RegisterBehavior.Overwrite...

Discord dashboard

https://sourceb.in/D3ZeMpa8n6 https://sourceb.in/lwjX82jY39 Anyone know how to fix this? make it to where my bot will update its counts when it joines servers Just having trouble with this...

Does ChannelType.GuildText includes categories?

I have a slash command with channel input that I filter to ChannelType.GuildText, but if you search for a category name it will come up in the pop up. Leads to weird behavior since a category is invalid input for the command. I can check for this explicitly in my logic but it seems weird categories show up at all since I would add ChannelType.GuildCategory if I wanted that

Any examples of a table format for an embed?

Looking for a better way to show a table in an embed. I do a hacky way with the code comments but just looking for a better way that's more reproducible. ```md #Rd Pick Team Player 1 1 CHI Connor Bedard​...

help needed regarding prefix handler

hey i have (tried) to make a prefix command handler for my bot, down is my code for it, the bot boots up normally but idk why it doesn't react to the commands messageCreate.js handlePrefixes.js pingPrefix.js...

i dont get my code working

i am already struggeling for 3 hours

Authenticated Attachment URLs

Hi guys, For many areas of my bot, embeds access images that are posted into an #assets channel either by me or by select others in my community. The CDN links for these are stored in mongo and referenced again and again, as the embed is sent. ...

Channel.messages.fetch getting different values

My bot uses the embed fields to match an Array from the embed to their character stats. On Desktop this issue doesn't seem to happen. When testing the submit command from mobile the statRoll message is giving me 2 different values. Sometimes the embeds are there and sometimes they are gone. Everything else looks to be the same. Correct response (no errors): ```ts {...

problems submitting modals

``js const { ModalBuilder, TextInputBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, PermissionsBitField, TextInputStyle } = require("discord.js"); const Fighter = require(../../schemas/users`); const mongoose = require('mongoose'); ...

Automod System

So yesterday I had a problem with my automod system, which I fixed, however I want to make it so if the user has 6 auto warnings it will do something else, however my code doesn't seem to work. utils.js https://pastebin.com/ANVk3A9E (Line 105) Pastebin Password: H61sH6dHJ0...

Automod System

I realized if I say 3 bad words fast enough it won't trigger the automod, why could this happend? Code: https://pastebin.com/cy6T1Re2...

Automod System

I've got an issue with my automod system, since the code is too long and it's closed source, I prefer to send it though a pastebin link in DMs, if you have any of these roles and can help, say it here (I don't want to give the code to random people) Helpers, Developers, Outside Collaborators, Moderators or Collaborators...

How do you handle incompatible null/undefined from discord.js typings?

Note: This is not a typescript problem, I know how to solve it from different ways. I'm just looking for feedbacks or djs-specific answers/workarounds There are a lot of places where discord.js uses a mix of null/undefined and sometimes it gets really frustrating. For example this is a very common occurence in my codebase : ```ts new EmbedBuilder()...

Categories cannot have subcategories api error

Got this error:
DiscordAPIError[50035]: Invalid Form Body
parent_id[CHANNEL_PARENT_INVALID_PARENT]: Categories cannot have subcategories
DiscordAPIError[50035]: Invalid Form Body
parent_id[CHANNEL_PARENT_INVALID_PARENT]: Categories cannot have subcategories
the other day with a command that moves a channel to another category. Really confused what it means by subcategories here or how this error could come about so seeking advice. Or what could constitute an invalid channel parent? In my slash command I filter the category option with ChannelType.GuildCategory...