{"repo":"ewohltman/discordgo-mock","free":true,"listed":false,"github":"https://github.com/ewohltman/discordgo-mock","clone":"git clone https://github.com/ewohltman/discordgo-mock.git","description":"Helper library to assist with writing unit tests for projects that use https://github.com/bwmarrin/discordgo","language":"Go","stars":22,"topics":["go","golang","discord","discordgo","discord-bot"],"license":"MIT","category":"chat-messaging","readme_excerpt":"discordgo-mock discordgo-mock is a helper library to assist with writing unit tests for projects that use discordgo. The library provides a custom http.RoundTripper to be injected into an http.Client.Transport before being injected into discordgo.Session . The custom http.RoundTripper maps the Discord REST API methods and paths to appropriate handler functions and returns expected data based upon what is in the provided discordgo.State cache. Discord API calls that involve creating new, updating, or deleting resources will also update the internal discordgo.State cache to maintain state changes. Example Usage Output:","default_branch":null,"files":null,"tree":[],"storefront":"/r/ewohltman","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ewohltman/discordgo-mock/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}