Skip to content

Commit

Permalink
Merge pull request #240 from ect0s/killfeed-fix
Browse files Browse the repository at this point in the history
Add default value for victim's name in the DiscordKillFeed plugin
  • Loading branch information
Thomas-Smyth authored May 27, 2022
2 parents 6769cf7 + 382563e commit 053e100
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="center">

<img src="assets/squadjs-logo-white.png#gh-dark-mode-only" alt="Logo" width="500"/>
<img src="assets/squadjs-logo-white.png#gh-dark-mode-only" alt="Logo" width="500"/>
<img src="assets/squadjs-logo.png#gh-light-mode-only" alt="Logo" width="500"/>

#### SquadJS
Expand Down
6 changes: 4 additions & 2 deletions squad-server/plugins/discord-killfeed.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,14 @@ export default class DiscordKillFeed extends DiscordBasePlugin {
},
{
name: "Victim's Name",
value: info.victim.name,
value: info.victim ? info.victim.name : 'Unknown',
inline: true
},
{
name: "Victim's SteamID",
value: `[${info.victim.steamID}](https://steamcommunity.com/profiles/${info.victim.steamID})`,
value: info.victim
? `[${info.victim.steamID}](https://steamcommunity.com/profiles/${info.victim.steamID})`
: 'Unknown',
inline: true
}
];
Expand Down

0 comments on commit 053e100

Please sign in to comment.