The command first creates a loading embed and sends it as a reply to the interaction. It then checks if there is a music player currently playing and sends an error message if not. If no song name is provided as an option, it gets the current song title from the music player and removes some common keywords using a regular expression. It then uses the "lyrics-finder" library to search for the lyrics of the song. If no lyrics are found, it sends an error message to the user with a tips button. If lyrics are found, it creates a MessageEmbed object with the lyrics and sends it to the user with a tips button. If the lyrics are too long, it truncates them to fit within Discord's character limit. The command also sets up a collector to handle button clicks on the tips button, which sends a message with tips on how to find lyrics for songs.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The command first creates a loading embed and sends it as a reply to the interaction. It then checks if there is a music player currently playing and sends an error message if not. If no song name is provided as an option, it gets the current song title from the music player and removes some common keywords using a regular expression. It then uses the "lyrics-finder" library to search for the lyrics of the song. If no lyrics are found, it sends an error message to the user with a tips button. If lyrics are found, it creates a MessageEmbed object with the lyrics and sends it to the user with a tips button. If the lyrics are too long, it truncates them to fit within Discord's character limit. The command also sets up a collector to handle button clicks on the tips button, which sends a message with tips on how to find lyrics for songs.