Custom listener name not applying
Hey, I'm looking to put multiple listeners into the same file and I'm running into an issue where the name option isn't applying
As a quick reference, I am on the v14 PR although I believe it's unrelated
Debugging steps I've tried:
1. Initializing the name field in the constructor
2. Initializing the name field in a decorator
3. After the constructor, ignoring the read only warning and attempting to set name to a custom name
None of those have yielded successful results, when looking at it in a debugger and attempting to find the listener, it's using the file name
Looking at the source code for
https://github.com/sapphiredev/framework/blob/main/src/lib/structures/Listener.ts
and
https://github.com/sapphiredev/pieces/blob/main/src/lib/structures/Piece.ts
it seems like there's nothing that should be preventing this custom name from being applied but it isn't, any ideas on what might be causing this / further debugging steps?
Code:
Debugger screenshot:
Solution:Jump to solution
Looks like this was a caching issue with old files sticking around, not a bug
5 Replies
Solution
Looks like this was a caching issue with old files sticking around, not a bug
Out of curiosity and a bit off topic, why didn’t AO post the how to accept answers embed when this post was created?
It’s afraid of me and stays away
You better keep working or you’re going offline
In actuality I’m not sure, I’ll have to debug that but it should have been created
Rough guess is there may have been a long period of inactivity and some issue with the SQL connection so it didn’t get to check the server settings correctly - but nothing in the logs point to that
Ah that makes sense. I wasn’t sure if there was a way to opt out of getting those embeds if you already know how it works
I’m going to put a “Dismiss” button on them so if the thread owner presses that it’ll go away