# Play command

Events

This command will emit playSong, addSong, and addList events.

Built-in search handling

If searchSongs option is enabled and a user send a not-url string, it will emit searchResult, searchCancel, searchDone, searchInvalidAnswer, and searchNoResult event

With distube.play() (opens new window) method, your bot will join a voice channel and play song from the url or YouTube based on the top match for the string given.

Now your bot can play music when you are in a voice channel and send !play a random song name message. To reply the command, you should listen to DisTube events to know exactly the song and queue properties.