KillLogsDiscordBot

A powerful SCP: Secret Laboratory plugin to log kill events to your Discord server.

Download Now

Features

Kill Logging

Logs detailed kill events (attacker, victim, weapon, timestamp) from SCP:SL rounds.

Discord Integration

Sends logs as clean Discord Embeds to a specified channel via a bot token.

Configurable

Customize logging options, such as SCP kills or suicides, via Config.yml.

About

KillLogsDiscordBot is an EXILED plugin for SCP: Secret Laboratory (v14.1.1) that enhances server monitoring by sending kill logs to a Discord channel. Built with Discord.Net and compatible with EXILED 9.6.1, it integrates seamlessly.

Installation Guide

1. Create a Discord Bot

Visit the Discord Developer Portal. Create a new application (e.g., "KillLogsBot"), add a bot, and copy the Bot Token. Keep it secure. In OAuth2 > URL Generator, select bot scope, grant Send Messages and Embed Links permissions, and invite the bot to your server. Enable Developer Mode in Discord and copy the Channel ID of your target channel (e.g., #kill-logs).

2. Set Up the Plugin

Create a new Class Library project in Visual Studio named KillLogsDiscordBot. Add the provided files: Plugin.cs, Config.cs, KillLogsDiscordBot.csproj. Install dependencies: Exiled.API, Exiled.Events, Assembly-CSharp, Newtonsoft.Json, and Discord.Net (v3.15.3) via NuGet.

3. Build and Deploy

Build the project in Visual Studio (Build > Build Solution). Copy KillLogsDiscordBot.dll from [project_path]\bin\Debug\net472 to %appdata%\EXILED\Plugins.

4. Configure Config.yml

Create or edit Config.yml in %appdata%\EXILED\Configs. Add your bot token and channel ID:


kill_logs_discord_bot:
  is_enabled: true
  debug: true
  discord_bot_token: "YOUR_BOT_TOKEN_HERE"
  discord_channel_id: 123456789012345678
  log_scp_kills: false
  log_suicides: true
                    

5. Run the Server

Restart your SCP:SL server. Check %appdata%\EXILED\Logs for:


KillLogsDiscordBot enabled.
Discord bot connected successfully.
                        

Configuration

Config.yml Options

The plugin is configured via Config.yml located in %appdata%\EXILED\Configs. Below are the available options:

Option Description Default
is_enabled Enables or disables the plugin. true
debug Enables debug logging for troubleshooting. true
discord_bot_token Your Discord bot token (required). ""
discord_channel_id The ID of the Discord channel to send logs to (required). 0
log_scp_kills Log kills performed by SCPs. false
log_suicides Log suicides or deaths without an attacker. true

Example Config.yml


kill_logs_discord_bot:
  is_enabled: true
  debug: true
  discord_bot_token: "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjMuWUNlZmxvdy5yYW5kb21zdHJpbmc="
  discord_channel_id: 123456789012345678
  log_scp_kills: false
  log_suicides: true
                    

Replace discord_bot_token and discord_channel_id with your values.

Troubleshooting

Common Issues and Solutions

Error: "Failed to connect Discord bot: Invalid token" in logs.

Solution:

  • Verify discord_bot_token in Config.yml matches the token from Discord Developer Portal.
  • Regenerate the token if invalid: Go to Bot > Reset Token.
  • Ensure the bot is invited to the server with Send Messages and Embed Links permissions.
  • Check server internet connection.

Error: "Failed to find Discord channel with ID: ..." in logs.

Solution:

  • Verify discord_channel_id in Config.yml matches the target channel ID.
  • Enable Developer Mode in Discord and copy the channel ID again.
  • Ensure the bot has permissions to send messages in the channel.
  • Check logs with debug: true for detailed errors.

Error: Plugin not listed in RA> plugins list.

Solution:

  • Ensure KillLogsDiscordBot.dll is in %appdata%\EXILED\Plugins.
  • Verify dependencies (Exiled.API.dll, Discord.Net.dll, etc.) are in %appdata%\EXILED\Plugins\dependencies.
  • Check %appdata%\EXILED\Logs for errors.
  • Restart the server after adding the plugin.

Error: No messages sent despite kills occurring.

Solution:

  • Ensure is_enabled: true in Config.yml.
  • Verify the round is active (Round.IsStarted).
  • Test with a non-SCP kill (e.g., MTF vs. Class-D).
  • Enable debug: true and check logs for "Sending kill log: ...".
  • Spawn a test player: RA> spawn player ClassD.

Contact Us