Stev
Explore posts from serversSIASapphire - Imagine a framework
•Created by Stev on 6/21/2023 in #sapphire-support
Sapphire-like Listeners for other Emitters, such as ShardManager?
Probably a stupid question, but I've looked and haven't found any.
Does Sapphire support listeners for other emitters? For example, if I want to listen for the
shardCreate
event of ShardManager
.
Sapphire makes event handling so simple, so I figured I'd hope that there is, instead of going manual.
Thanks!5 replies
SIASapphire - Imagine a framework
•Created by Stev on 5/11/2023 in #sapphire-support
Custom Events not Creating Listeners
I'm having issues using Sapphire with custom events. For example, I have an event for when a member subscribes to a role:
Then, in another Sapphire listener:
My issue is that with custom named events, Sapphire doesn't seem to register all of them. For example, I'll have
guildMemberDemoted
, guildMemberPromoted
, guildMemberSubscribed
, and guildMemberUnsubscribed
.
guildMemberDemoted
will fire off, but guildMemberPromoted
does not. If I check the client for a guildMemberPromoted
listener, none exists.
I thought maybe I'd have to increase the max listeners for the client, but that also doesn't work.
Any ideas?7 replies
SIASapphire - Imagine a framework
•Created by Stev on 2/16/2023 in #sapphire-support
Registering commands and other paths
Hi guys! I'm having some troubles.
When I use
sapphire new
, everything works as intended. The commands in the commands
directory are registered properly.
However, if I do not use sapphire new
and try to add it to an existing project, without sapphire init
, it doesn't register the commands. After looking into it, and logging the stores, I see that the paths should be C:/.../myProject/bin/commands
, but the path is showing C:/.../myProject/commands
. Even if I copy the .sapphirerc.json
from the other working one.
Why does this happen? I've tried using sapphire init
with the same problem - it looks a directory up.
I cannot see anywhere in the working project, using sapphire new
, where any additional configuration is added.
Thanks!5 replies