Based on analysis of 31 test file changes made by Discord developers @night (Zack) and @fozzle (Kyle Petrovich) over the past 3 months, this report identifies comprehensive testing patterns and best practices used within Discord's API testing suite. The analysis focused on specific code changes (diffs) rather than entire files to understand the testing conventions being actively adopted and refined.
The Discord Social SDK requires a Discord application configured for your game. Users grant this application permission to access their Discord data. The SDK then uses OAuth2 access tokens, obtained through this user authorization, to interact with Discord on the user's behalf.
Applications used for the SDK in this way map 1:1 with games. The title and art for the application is that of the game, and a lot of UX in the Discord app and SDK reflects this.
This means that publishers with many games require users to authorize potentially many times - one for each game they have integrated. This is cumbersome for both publisher and user, and we solve it with publisher authentication.
The Discord Social SDK requires a Discord application configured for your game. Users grant this application permission to access their Discord data. The SDK then uses OAuth2 access tokens, obtained through this user authorization, to interact with Discord on the user's behalf.
Applications used for the SDK in this way map 1:1 with games. The title and art for the application is that of the game, and a lot of UX in the Discord app and SDK reflects this.
This means that publishers with many games require users to authorize potentially many times - one for each game they have integrated. This is cumbersome for both publisher and user, and we solve it with publisher authentication.