Dynamic available help channels message#1396
Conversation
HassanAbouelela
left a comment
There was a problem hiding this comment.
Everything is looking solid so far. I have a few functionality concerns, but everything works as expected in general.
HassanAbouelela
left a comment
There was a problem hiding this comment.
Clean, and works as expected. LGTM
Shivansh-007
left a comment
There was a problem hiding this comment.
Thanks! Looks Good To Me!
HassanAbouelela
left a comment
There was a problem hiding this comment.
Anyone using the server template will need to update their config to move the how-to-get-help channel out of the help available category, but it shouldn't be a big deal. This is not important for the test server, as it uses the same channel for cooldown and how-to-get-help.
gustavwilliam
left a comment
There was a problem hiding this comment.
Thanks! Works like a charm — unless we go into some edge cases.
When lowering the maximim amount of help channels (restarting bot in-between), the higher number of help channels will be listed in the available help channels message. Let me show you an example, where we go from 3 to 2 channels. After restarting the bot with the new config, the following will happen:
- The bot keeps updating the message with 3 help channels. One of them will be there statically (and incorrectly), while the other two are correctly and continuously updated
- When deleting the original "these channels are available" message, the bot will resend the same three-channel message
One workaround for this is deleting the message and then restarting the bot.
The other edge case comes into play when we increase the number of help channels that should be available, like going from 2 to 3. This simply sends a second message with two channels and keeps updating that. Just delete the first message manually and things will work just fine.
However, both of these scenarios are uncommon enough that I'll still approve this PR. If you want to fix the mentioned bugs, that would be fantastic, but I really don't mind leaving it at this point. It works flawlessly, unless we get into some uncommon and strange scenarios.
|
Thank you for your approval! I think that any of these edge cases will have to include a bot redeploy, as rules would probably have to be changed in order for them to take effect. If we encounter these edge cases, I'll be sure to put it into high/critical priority. |
|
Bot can fetch a message that was previously deleted, which causes a On the actual server, no message has been deleted. The bot this time finds the webhook message, then tries to edit it. I will make a change to check if the last message was sent by the bot. If not, it will send a dynamic message (or something similar to this). |
|
Where are we at on this? Should we open a new PR? |
|
I will be opening a new PR for this, I'm still working out the logic. |


Closes #1320
Rewrite of #1325
Users sometimes get confused on which channels are available for them to claim.
With this PR, a message in the #how-to-get-help channel will be edited to reflect which channels are currently available.
If the bot cannot edit the most recent message in the #how-to-get-help channel, then it knows it's trying to edit the webhook message that contains the guide for claiming a channel. It will send the dynamic message if this occurs.
If we do decide to remove or add more channels in the
help: availablecategory, then the bot will be able to pick up on them.