CodeLogic.SocialConnect
4.5.2-preview.68
See the version list below for details.
dotnet add package CodeLogic.SocialConnect --version 4.5.2-preview.68
NuGet\Install-Package CodeLogic.SocialConnect -Version 4.5.2-preview.68
<PackageReference Include="CodeLogic.SocialConnect" Version="4.5.2-preview.68" />
<PackageVersion Include="CodeLogic.SocialConnect" Version="4.5.2-preview.68" />
<PackageReference Include="CodeLogic.SocialConnect" />
paket add CodeLogic.SocialConnect --version 4.5.2-preview.68
#r "nuget: CodeLogic.SocialConnect, 4.5.2-preview.68"
#:package CodeLogic.SocialConnect@4.5.2-preview.68
#addin nuget:?package=CodeLogic.SocialConnect&version=4.5.2-preview.68&prerelease
#tool nuget:?package=CodeLogic.SocialConnect&version=4.5.2-preview.68&prerelease
CodeLogic.SocialConnect
Discord webhook and Steam Web API integration for CodeLogic. Send Discord notifications and fetch Steam player profiles, bans, and game libraries.
Install
dotnet add package CodeLogic.SocialConnect
Quick Start
await Libraries.LoadAsync<SocialConnectLibrary>();
var social = Libraries.Get<SocialConnectLibrary>();
// Discord — send a webhook text message
await social.Discord.SendMessageAsync("Server restarted");
// Steam — fetch player profile
var player = await social.Steam.GetPlayerAsync("76561198012345678");
if (player.IsSuccess)
Console.WriteLine($"{player.Value.PersonaName} — {player.Value.ProfileUrl}");
// Steam — check bans
var bans = await social.Steam.GetPlayerBansAsync("76561198012345678");
Services throw InvalidOperationException if accessed while disabled. Guard with the
HasDiscord / HasSteam / HasSteamAuth properties when a service may be turned off.
Features
Discord
- Webhook Messages —
SendMessageAsync(text),SendEmbedAsync(rich embeds), orSendAsync(fullDiscordWebhookMessagepayload) - Rich Embeds — title, description, color, fields, author, footer, image, thumbnail, timestamp
- Mention Control —
DiscordAllowedMentions(with.None/.Allhelpers) to whitelist which roles/users/@everyonemay ping - TTS — opt-in text-to-speech messages via
DiscordWebhookMessage.Tts - Default Webhook URL — set once in config, override per call; default username + avatar applied automatically
DiscordUsermodel — username, avatar (withGetAvatarUrl()helper), bot/MFA/verified flags
Steam
- Player Profiles — persona name, avatar (3 sizes), profile URL, real name, country, online status, plus
IsPublic/IsInGame/AccountCreatedhelpers - Player Bans — VAC bans, game bans, economy/trade bans, community bans, plus
HasAnyBanhelper - Game Library — owned games with playtime (
TotalPlaytime/RecentPlaytime),LastPlayed, andGetIconUrl();includeAppInfotoggle onGetOwnedGamesAsync - Built-in Cache — configurable TTL (default 5 min) to reduce API calls; clear on demand with
Steam.ClearCache() - Steam Authentication — ticket-based auth for game server integration (per-call
appIdoverride)
Common
Result/Result<T>returns — every call returns a typed result; checkIsSuccessbefore reading.Value. Failure codes are categorized by theSocialErrorenum.- Event bus integration — publishes
WebhookSentEvent,SteamProfileFetchedEvent, andSteamAuthenticatedEventfor observability - Health check —
HealthCheckAsync()reports which services are active
Configuration
Auto-generated at data/codelogic/Libraries/CL.SocialConnect/config.socialconnect.json:
{
"Enabled": true,
"Discord": {
"Enabled": true,
"DefaultWebhookUrl": "https://discord.com/api/webhooks/xxx/yyy",
"DefaultUsername": "MyApp",
"DefaultAvatarUrl": "https://example.com/bot.png",
"TimeoutSeconds": 10
},
"Steam": {
"Enabled": true,
"ApiKey": "your-steam-web-api-key",
"AuthEnabled": false,
"AppId": "480",
"CacheTtlSeconds": 300,
"TimeoutSeconds": 15,
"ApiBaseUrl": "https://api.steampowered.com"
}
}
Steam.EnabledrequiresApiKey.Steam.AuthEnabledadditionally requiresAppId(your game's Steam App ID). Steam is disabled by default.
Get your Steam Web API key at steamcommunity.com/dev/apikey.
Documentation
Requirements
- CodeLogic 3.x or 4.x | .NET 10
License
MIT — see LICENSE
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- CodeLogic (>= 3.2.0 && < 5.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.6.72 | 183 | 6/20/2026 |
| 4.6.69-preview | 32 | 6/20/2026 |
| 4.5.2 | 104 | 5/24/2026 |
| 4.5.2-preview.68 | 59 | 6/20/2026 |
| 4.5.1 | 162 | 5/24/2026 |
| 4.5.1-preview.56 | 91 | 5/24/2026 |
| 4.4.2-preview.53 | 63 | 5/24/2026 |
| 4.4.1 | 105 | 5/24/2026 |
| 4.0.5 | 99 | 5/15/2026 |
| 4.0.4 | 112 | 5/9/2026 |
| 4.0.3 | 105 | 5/9/2026 |
| 3.3.1 | 621 | 4/18/2026 |
| 3.3.0 | 114 | 4/18/2026 |
| 3.2.11 | 123 | 4/18/2026 |
| 3.2.10 | 107 | 4/18/2026 |
| 3.2.9 | 111 | 4/18/2026 |
| 3.2.8 | 104 | 4/18/2026 |
| 3.2.7 | 101 | 4/18/2026 |
| 3.2.6 | 106 | 4/18/2026 |
| 3.2.5 | 114 | 4/18/2026 |
# CL.SocialConnect — Changelog
All notable changes to **CodeLogic.SocialConnect** are documented here. Versions follow
[Semantic Versioning](https://semver.org/).
## [4.5.2] — 2026-06-20
### Documentation
- Corrected the README Quick Start: the text-message helper is
`Discord.SendMessageAsync(...)`, not `SendAsync(string, username:)`.
- Fixed the README configuration example to use PascalCase JSON keys and added the
previously omitted `DefaultAvatarUrl`, `AuthEnabled`, `AppId`, and `ApiBaseUrl` fields.
- Documented previously undocumented user-facing API surface:
- Discord `SendAsync(DiscordWebhookMessage)`, `DiscordAllowedMentions`
(`.None` / `.All`), and the `Tts` flag.
- Steam `SteamProfileService.ClearCache()` and the `GetOwnedGamesAsync`
`includeAppInfo` parameter.
- Per-call `appId` override on `Auth.AuthenticateAsync`.
- `SteamPlayer` (`IsPublic`, `IsInGame`, `AccountCreated`), `SteamPlayerBans`
(`HasAnyBan`), and `SteamGame` (`TotalPlaytime`, `RecentPlaytime`, `LastPlayed`,
`GetIconUrl`) computed helpers; the `DiscordUser` model.
- `HasDiscord` / `HasSteam` / `HasSteamAuth` availability properties and the
`InvalidOperationException` thrown when a disabled service is accessed.
- Event-bus events `WebhookSentEvent`, `SteamProfileFetchedEvent`, and
`SteamAuthenticatedEvent`, and the `SocialError` failure-code enum.
## [4.5.0] — 2026-05-24
### Changed
- **Unified versioning.** All CodeLogic.Libs now share a single version line
controlled by `version.txt` in the repo root. This is a version alignment
release — no functional changes to this library.
## [4.0.4] — 2026-04-16
### Changed
- README + manifest refresh for the v4 baseline. No functional changes vs 4.0.3.
- `LibraryManifest.Version` now reads from assembly metadata.
## [4.0.2] — 2026-04-09
### Changed
- Annotated SocialConnect configuration with `[ConfigField]` for the admin UI surface.
- Aligned with the v4 baseline across all libraries.
### Fixed
- Closed resource leaks in the OAuth client + reworked the health check so
it no longer mutates internal state as a side-effect.
## [4.0.0] — 2026-04-09
Major rewrite. Republished as v4.0.0 to reset the version line under the
unified v4 baseline. OAuth/OIDC providers (Google, Discord, Steam,
generic OIDC) with a uniform abstraction.
### Notes
- Earlier history is retained in the
[git log](https://github.com/Media2A/CodeLogic.Libs/commits/main/CL.SocialConnect).