Search
Star
Feedback
Setup for Free
ยฉ 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Extending Listener base class - Sapphire - Imagine a Framework
S-IaF
Sapphire - Imagine a Framework
โข
2y ago
โข
21 replies
BigBrainAFK
Extending Listener base class
So I wanted to extend the Listener base class by running some code for every listener before the actual
run
run
handler is invoked
. Ideally I
'd like to shim it somehow so existing listeners still just implement
run
run
so removing or adding more shims like this is easily possible without renaming methods implemented in the listener itself
.
Sapphire - Imagine a Framework
Join
Sapphire is a next-gen object-oriented Discord.js bot framework.
2,261
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
extending Command class
S-IaF
Sapphire - Imagine a Framework / sapphire-support
3y ago
Class constructor _Listener cannot be invoked without 'new'
S-IaF
Sapphire - Imagine a Framework / sapphire-support
3y ago
Accessing a public method in a listener's class
S-IaF
Sapphire - Imagine a Framework / sapphire-support
13mo ago
interactionCreate listener
S-IaF
Sapphire - Imagine a Framework / sapphire-support
11mo ago