secre
Explore posts from serversSIASapphire - Imagine a framework
•Created by secre on 6/13/2024 in #sapphire-support
Timezone option for Scheduled Tasks
What timezone format do I need to use for task when creating it?
For example I want to run task in ukranian timezone, (UTC+2) what am I supposed to put in?
A bit confused because all the time here like different types and kinds of timezones that you need to provide...
6 replies
SIASapphire - Imagine a framework
•Created by secre on 6/9/2024 in #sapphire-support
Attachment drop box
Is there a way to create a drop box for attachments like that one in slash commands?
I want to give users ability to change role icon, so they can click button then this "drop box" will appear and user can drop their local image and then we process it via code
7 replies
SIASapphire - Imagine a framework
•Created by secre on 5/15/2024 in #sapphire-support
Sapphire Scheduled Tasks | When do they launch after bot restarts?
I have a task that disables all message components. But this fails to run after bot restarts and trying to run it
Logs:
I setup it to load only on
postLogin
because in task I need to fetch channel & message, and obv I can't do that when bot is not ready.
Seems like ScheduledTaskPlugin
trying to run tasks that was on redis before postLogin step if you restart your bot
Is there a way to change that? :Hmm:
My custom plugin that loads this task to my bots:
12 replies
SIASapphire - Imagine a framework
•Created by secre on 4/15/2024 in #sapphire-support
Task was not found | plugin-scheduled-tasks
👋🏿 I'm getting "
[ScheduledTaskPlugin] There was no task found for "task_name"
" error for all my scheduled tasks. Sometimes they run successfully but mostly they giving me this error.
There is the code of how i'm declaring task:
And this is my configuration for "tasks"
Am I doing something wrong? :thinkPeepo:26 replies
SIASapphire - Imagine a framework
•Created by secre on 4/7/2024 in #sapphire-support
Share sapphire stuff with multiple bots & possible monorepo setup
The question is what the better way to share sapphire stuff like utilities, handlers, commands folders with multiple bots? I need to have different bots for each category for example: economy, moderation, tickets, events, bots. Right now my project structure looks like this:
I have utilities under lib folder, and I have some shared typings in it too. Using workspace I have this "package" in my bots. Also I got
node_modules
at this folder and all bots is using the same packages from it.
Also because of that I wanna ask how exactly sapphire works. Will it be the problem that all bots will use the same node_modules
? Because as I understood from container
thing you do your magic under the hood in package folder. So it might be a problem when different bots will try to use the same package.
Each bot is independent project with their tsconfig, etc.. and they only share same node_modules
from root folder as I said before.
Will appreciate any tips/links to topics about better structure to implement, first time doing something like that12 replies
DIAdiscord.js - Imagine an app
•Created by secre on 2/14/2024 in #djs-questions
Interactions overlapping? (I don't know what even happening anymore)
I have command that sends a ephemeral message with buttons, and then using message collector to get response from buttons.
I have a function that handles response:
In this function i'm getting options that user provide when executed
/command
, and creating some embeds with description
Problem is here:
And somehow if two users manage to click button on the same time initialInteraction.user.toString()
will be not what we expect.
For example:
I clicked button and should see in response my mention, but I see mention of my friend that manage to click it on the same time
If I use buttonInteraction
instead - all works fine. But i'm curious why initialInetraction
picking up different user51 replies