feat: add ability to format strings like text channel names
Summary
Adds format_as_channel_name, a function to convert text to a text-channel compatible name, same as Discord does in the background when creating channels via the API.
Example: "Joey's Cool Channel" -> "joeys-cool-channel"
This is my first PR, I've looked at the contributing guidelines but I'm unsure about what to do regarding docs. Please could someone take a look? Thanks! 😅
Checklist
- [x] If code changes were made then they have been tested.
- [ ] I have updated the documentation to reflect the changes.
- [x] I have run
task pyrightand fixed the relevant issues.
- [ ] This PR fixes an issue.
- [x] This PR adds something new (e.g. new method or parameters).
- [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
- [ ] This PR is not a code change (e.g. documentation, README, ...)
@passivity I added this in the docs for you in dca3857.
Hi @squeakerdev, just following up on this. How are you feeling on the PR regarding the review changes?
I'm closing this for now as there has been no activity for a year. I am not sure about the need for this either, as Discord formats them API-side themselves, so there is no error from the API to mitigate.