A CounterStrikeSharp port of SourceCord. Two-way Discord ↔ CS2 chat integration for Source 2.
- CS2 chat messages appear in Discord via webhook
- Discord messages appear in CS2 chat with role colors and nicknames
- Player connect/disconnect and map change events posted to Discord
- Steam avatars as webhook profile pictures
- Emoji shortcode conversion in both directions (
:+1:↔👍, guild custom emoji)
- CounterStrikeSharp
- A Discord server where you have Manage Server permissions
- A Discord bot in your server with Read Message History and View Channel permissions for the target channel
- Drop
CS2Cord.dllintogame/csgo/addons/counterstrikesharp/plugins/CS2Cord/ - Start the server once.
credentials.jsonwill be created automatically - Fill in
credentials.json(see below) and restart
Located in the plugin directory alongside CS2Cord.dll.
| Field | Description |
|---|---|
BotToken |
Discord bot token |
ChannelId |
ID of the channel to read messages from |
GuildId |
ID of your Discord server |
WebhookUrl |
Webhook URL for the same channel |
SteamApiKey |
Steam Web API key (optional, enables player avatars) |
Auto-created by CounterStrikeSharp in configs/plugins/CS2Cord/.
| Field | Default | Description |
|---|---|---|
PollingIntervalSeconds |
1.0 |
How often to poll Discord for new messages (1-10s) |
LogConnections |
1 |
0 = off, 1 = name + SteamID, 2 = include IP |
LogMapChanges |
false |
Post map changes to Discord |
UseRoleColors |
true |
Color player names by their top Discord role color |
UseNicknames |
true |
Show Discord server nickname instead of username |
ShowSteamId |
1 |
0 = off, 1 = Steam3 [U:1:...], 2 = Steam2 STEAM_0:... |
ShowDiscordPrefix |
true |
Show [Discord] prefix on incoming messages |
DiscordColor |
5865F2 |
Hex color for Discord name when no role color is set |
AllowUserPings |
false |
Allow @username in CS2 chat to ping Discord users |
AllowRolePings |
false |
Allow @rolename in CS2 chat to ping Discord roles |
- Go to the Discord Developer Portal and create an application
- Under Bot, create a bot and copy the token →
BotToken - Enable Server Members Intent under Privileged Gateway Intents (required for nicknames and role colors)
- Invite the bot to your server with
botscope and Read Message History + View Channel permissions - In Discord, enable Developer Mode (User Settings → Advanced)
- Right-click your server icon → Copy Server ID →
GuildId - Right-click the target channel → Copy Channel ID →
ChannelId
- In your target channel, go to Edit Channel → Integrations → Webhooks → New Webhook
- Copy the webhook URL →
WebhookUrl
Get a key at steamcommunity.com/dev/apikey → SteamApiKey