Skip to content

Instantly share code, notes, and snippets.

@spenhand
spenhand / comprehensive_testing_best_practices.md
Created August 18, 2025 21:59
Discord Testing Best Practices Analysis - Analysis of test changes by @night and @fozzle over the last 3 months, identifying comprehensive testing patterns and conventions used within Discord's API testing suite.

Discord Testing Best Practices Analysis

Analysis of Test Changes by @night and @fozzle (Last 3 Months)

Executive Summary

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.


Core Testing Philosophy

@spenhand
spenhand / discord_publisher_auth_spec.md
Last active November 13, 2025 21:00
Discord Publisher Authentication Technical Spec

Discord Publisher Authentication Technical Spec

Motivation

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.

@spenhand
spenhand / discord_publisher_auth_spec.md
Created August 15, 2025 16:37
Discord Publisher Authentication Technical Spec

Discord Publisher Authentication Technical Spec

Motivation

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.