nextcord icon indicating copy to clipboard operation
nextcord copied to clipboard

feat: add ability to format strings like text channel names

Open squeakerdev opened this issue 3 years ago • 2 comments

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 pyright and 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, ...)

squeakerdev avatar Dec 24 '22 19:12 squeakerdev

@passivity I added this in the docs for you in dca3857.

EmmmaTech avatar Dec 24 '22 19:12 EmmmaTech

Hi @squeakerdev, just following up on this. How are you feeling on the PR regarding the review changes?

Skelmis avatar Apr 09 '23 12:04 Skelmis

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.

ooliver1 avatar Mar 23 '24 19:03 ooliver1