Warnings are a way to create formal record of wrongdoing and serve as a way to keep track of long-standing or historic bad behavior. You can view the reasons and the dates for any warning given.
You can find the infraction id by running the
!infractions command on the user you warned.
!warn @User <Reason>
!warn @User Spamming and trolling!