-Carlosđź‘‘
Explore posts from serversSIASapphire - Imagine a framework
•Created by -Carlos👑 on 11/2/2024 in #sapphire-support
Context Menu not working
I was changing a command so both the message and context menu version of the command were in the same file, however the context menu part doesn't work, and instead returns the "The application did not respond" error. The message version of the command works fine.
Relevant Code: https://pastebin.com/Ciqk03at
25 replies
DIAdiscord.js - Imagine an app
•Created by -Carlos👑 on 10/13/2024 in #djs-questions
Automod triggering twice
I made a Automod system, which relies on Discord's built-in automod, however, I got a very weird issue, the link automod, triggers twice, by "triggering twice" I mean the following:
- Sends the moderation DM to the user twice
- Logs the punishment in a channels twice
This only happens with the link automod, I have tested with the other type of automod and they work correctly.
Relevant Code
https://pastebin.com/bFMfaeWS - where the automodPunish function gets triggered, which at the same time sends the DM, logs the punishment, etc
https://pastebin.com/PfhJmYh1 - code for the automodPunish function
31 replies
DIAdiscord.js - Imagine an app
•Created by -Carlos👑 on 9/18/2024 in #djs-questions
Send multiple attachments with spoilers at the same time
.
I'm trying to send multiple attachments with a spoiler at the same time, this is what I have currently, but on the webhook it only send the first attachment only
5 replies
DIAdiscord.js - Imagine an app
•Created by -Carlos👑 on 4/11/2024 in #djs-questions
TypeError: Cannot read properties of undefined (reading 'members')
This is inside a Raw event
40 replies
SIASapphire - Imagine a framework
•Created by -Carlos👑 on 3/30/2024 in #sapphire-support
Prevent commands from being ran on DMs and prevent bots from using commands by default
did Sapphire recently add this behavior stated in the title? I recently removed Preconditions that prevented this and looks like it's still blocking commands from being ran on DMs or prevent bots from using commands, which is what I want
5 replies
DIAdiscord.js - Imagine an app
•Created by -Carlos👑 on 2/29/2024 in #djs-questions
Rare Error
i entered into my main bot's console and this error was logged, I tried reproducing the error but I couldn't, everything was working fine, my best guess is that for some reason
<Message>.member
went undefined, any ideas?32 replies
SIASapphire - Imagine a framework
•Created by -Carlos👑 on 2/24/2024 in #sapphire-support
this.error()
Is there any way of using
this.error()
but not trigger messageCommandDenied
? This is because on the messageCommandDenied
event I made it so it deletes the message if there's no error message, but in some cases I don't want to delete the message and instead do nothing3 replies
SIASapphire - Imagine a framework
•Created by -Carlos👑 on 2/3/2024 in #sapphire-support
Delete Message Instantly
https://github.com/skyra-project/skyra/blob/main/src/lib/util/functions/messages.ts
does the
deleteMessageImmediately
function in the file above actually delete the message instantly? Faster than doing <Message>.delete()
?10 replies
SIASapphire - Imagine a framework
•Created by -Carlos👑 on 1/26/2024 in #sapphire-support
ChatInputCommand
How to know if a interaction comes from a slash command?
3 replies
SIASapphire - Imagine a framework
•Created by -Carlos👑 on 1/26/2024 in #sapphire-support
Error Handling
[ERROR] Encountered error on message command "test" at path "C:\Users\cmart\Desktop\Discord Bots\Sapphire\src\commands\Developer\test.js"
Anyway of removing these error messages if the type of the error is a string? I don't want this error showing up on console when I do stuff like, for example:
9 replies
DIAdiscord.js - Imagine an app
•Created by -Carlos👑 on 1/17/2024 in #djs-questions
Better way of checking if a channel is locked or not
.
The codes above do work, but I feel they're not performant and there are probably better ways of doing this, any ideas?
4 replies
SIASapphire - Imagine a framework
•Created by -Carlos👑 on 1/17/2024 in #sapphire-support
check if message starts with the prefix
how can I check if a message starts with the bot's prefix? Including the bot's mention
7 replies
SIASapphire - Imagine a framework
•Created by -Carlos👑 on 1/16/2024 in #sapphire-support
Get command used with a message object
Is there any way to know which command was used only by having a message object?
13 replies
SIASapphire - Imagine a framework
•Created by -Carlos👑 on 1/6/2024 in #sapphire-support
Fuzzy Search
So I'm trying to prevent the bot from finding users if in the command only 1 character of their name was provided
I tried with the code above but it still finds the member even if I only provided 1 character of their username
4 replies
DIAdiscord.js - Imagine an app
•Created by -Carlos👑 on 1/6/2024 in #djs-questions
Removing messages from cache after a certain time
Could the code above that removes messages from cache after an hour affect events like
messageCreate
, messageDelete
, messageUpdate
or messageBulkDelete
?10 replies
SIASapphire - Imagine a framework
•Created by -Carlos👑 on 1/3/2024 in #sapphire-support
Memory Leak
MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 interactionCreate listeners added to [Client]. Use emitter.setMaxListeners() to increase limit
I recently got this error, my bot only has 2 slash commands and 4 context menus, which are not used much, I already asked in the djs server and they said to go ask here instead13 replies
SIASapphire - Imagine a framework
•Created by -Carlos👑 on 1/2/2024 in #sapphire-support
Certain amount of infractions per page
This is how I get a list of warnings of the provided user, my question is, how can I make it so there's pages with certain amount of infractions shown in each page? I'm using PaginatedMessages from
@sapphire/discord.js-utilities
44 replies
SIASapphire - Imagine a framework
•Created by -Carlos👑 on 12/9/2023 in #sapphire-support
Sapphire Snowflake
how is this working if I don't even have
@sapphire/snowflake
installed?
utils.js
.
package.json
.6 replies
DIAdiscord.js - Imagine an app
•Created by -Carlos👑 on 12/2/2023 in #djs-questions
[ERROR] Encountered error on event listener "moderationLog"
Full Error: https://pastebin.com/GnkxtJqe
moderationLog Listener: https://pastebin.com/DLgksCHN
I'm calling the moderationLog Listener on the automodBan function:
No idea why it saying something about Line 17, the DM embed is sent without problems, the problem must be at the webhookEmbed since the webhook is not being sent, I have another function which does the same as automodBan except instead of banning it just adds a warn to the user's record, in this function both dm and webhook are sent without problems
Part of the error i'm talking about:
at ModerationLogListener.run (C:\Users\cmart\Desktop\Discord Bots\Sapphire\src\listeners\moderationLog.js:17:8)
7 replies
SIASapphire - Imagine a framework
•Created by -Carlos👑 on 12/1/2023 in #sapphire-support
[ERROR] Encountered error on event listener "moderationLog"
31 replies