BigBrainAFK
BigBrainAFK
SIASapphire - Imagine a framework
Created by BigBrainAFK on 4/5/2024 in #sapphire-support
Extending Listener base class
So I wanted to extend the Listener base class by running some code for every listener before the actual run handler is invoked. Ideally I'd like to shim it somehow so existing listeners still just implement run so removing or adding more shims like this is easily possible without renaming methods implemented in the listener itself.
22 replies
SIASapphire - Imagine a framework
Created by BigBrainAFK on 3/27/2024 in #sapphire-support
Any way to add a sort of "middleware" to all listeners
Is there any way to have something like a middleware or precondition for all events? I want to delay all eventlisteners by a certain number of milliseconds in my Bot so audit logs can catch up. The bot only does logging and nothing else. no commands or anything.
40 replies