A bot library encapsulates the details of interacting with Discord’s WebSocket and REST APIs so that you can code at a higher level of abstraction. Many libraries also include higher-level features such as command frameworks.