Not so much an error but more of a reminder
If you're pretty sure that you will never use that velocity information you can ignore it.
In the script editor to the bottom right of the script window click the yellow caution icon and then ignore
# warning-ignore-:return_value_discarded
move_and_slide(motion)
Or
var _velocity = move_and_slide(motion)