on ready messages

is there any chance to disable "commands initialized" message on startup ?
38 Replies
Favna
Favna2y ago
Other than setting a higher logging level there isnt. Can you explain why they bother you? Also sidenote, wolf/death is amazing
fenish
fenishOP2y ago
i just wanted to send my own messages instead of built in messages its not bothering me its not a bad thing i just asked if there is config file about that . also side answer: best villain in animation world ever
Favna
Favna2y ago
I mean you can still listen on the ready event and send something... In fact those built in messages aren't even the ready event
fenish
fenishOP2y ago
yea but i just asked if is there a config about that
Favna
Favna2y ago
not for the built in messages, no, but as I said, those are not ready event message and they do not block you to send your own ready event messages
fenish
fenishOP2y ago
@Favna just talking about this
Favna
Favna2y ago
I am well aware I already answered it
fenish
fenishOP2y ago
ah yea ik its not blocking its just for visual not any particular reasons if there is option it would be great if there is not there is no problem
Favna
Favna2y ago
@Vladdy should we add an option for that...?
fenish
fenishOP2y ago
it was just optional
vladdy
vladdy2y ago
shrug opposed to it
fenish
fenishOP2y ago
i can use it like this but let me give u example
Favna
Favna2y ago
are you using application commands (aka slash commands) Fenish?
fenish
fenishOP2y ago
if i use console commands it becomes like this at first command
fenish
fenishOP2y ago
yea
Favna
Favna2y ago
then you kinda really need those logs because they tell you when they're ready
fenish
fenishOP2y ago
yea yea or maybe you can add event for that like onCommandsRegistered or client.isCommandsRegistered after that users can send their messages
vladdy
vladdy2y ago
i mean not really we can provide options to disable it i'm not against it
fenish
fenishOP2y ago
its not super necessary, but maybe that option would be great option or condition
fenish
fenishOP2y ago
fenish
fenishOP2y ago
like this
vladdy
vladdy2y ago
i dont think we emit an event for it we probably should
fenish
fenishOP2y ago
you know the business
Favna
Favna2y ago
to achieve this change the ready listener to Events.ApplicationCommandRegistriesRegistered and you're already finished as the chain is ready -> register commands -> Events.ApplicationCommandRegistriesRegistered ezpz
fenish
fenishOP2y ago
let me update
fenish
fenishOP2y ago
first message gone but seconds still exists xd
fenish
fenishOP2y ago
code this
Favna
Favna2y ago
Dear god please make use of Sapphire listeners dont manually do client.on
fenish
fenishOP2y ago
ahh
Favna
Favna2y ago
Sapphire Framework
What are listeners and how do they work? | Sapphire
Listeners are classes that contain logic that will be ran whenever a given event occurs.
Favna
Favna2y ago
not that it will fix your issue but why use sapphire if you're not gonna use sapphire omegalul
fenish
fenishOP2y ago
yea yea that makes sense overlooked im kinda new to sapphire, djs switched from python
export class ReadyListener extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) {
super(context, {
...options,
once: true,
event: Events.ApplicationCommandRegistriesRegistered,
});
}
public run(client: SapphireClient) {
this.container.logger.info(`Successfully logged`);
}
}
export class ReadyListener extends Listener {
public constructor(context: Listener.Context, options: Listener.Options) {
super(context, {
...options,
once: true,
event: Events.ApplicationCommandRegistriesRegistered,
});
}
public run(client: SapphireClient) {
this.container.logger.info(`Successfully logged`);
}
}
is this right way ? @Favna xd
Favna
Favna2y ago
yes
fenish
fenishOP2y ago
fenish
fenishOP2y ago
"@sapphire/framework": "^4.3.1",
"@sapphire/framework": "^4.3.1",
Thonkang
fenish
fenishOP2y ago
i thought it will become this
Favna
Favna2y ago
#framework-development never said that changing the event would fix the issue
fenish
fenishOP2y ago
ah wait oh then i didn't get it ah you added options okay
Want results from more Discord servers?
Add your server