Skip to content

Commit

Permalink
Merge 9956982 into 9a23142
Browse files Browse the repository at this point in the history
  • Loading branch information
niekcandaele authored Jul 15, 2020
2 parents 9a23142 + 9956982 commit 9960dbb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion api/hooks/countryBan/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,8 @@ module.exports = function sdtdCountryBan(sails) {
async function handleCountryBan(connectedMessage) {
let country = connectedMessage.country;
let steamId = connectedMessage.steamId;
let serverId = this.server.id;
let serverId = connectedMessage.server.id;

try {
let server = await SdtdServer.findOne(serverId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ class CountrybanKick extends DiscordNotification {
super('countrybanKick');
}

async makeEmbed(event){
async makeEmbed(event) {
let client = sails.hooks.discordbot.getClient();
let embed = new client.customEmbed();

embed.setTitle(`:flag_${event.player.country.toLowerCase()}: Country ban kicked: ${event.player.playerName}`)
.setColor('ORANGE')
.addField('Steam ID', `[${event.player.steamID}](https://steamidfinder.com/lookup/${event.player.steamID}/)`, true)
.addField('Entity ID', `${event.player.entityID}`, true)
.addField('Steam ID', `[${event.player.steamId}](https://steamidfinder.com/lookup/${event.player.steamId}/)`, true)
.addField('Entity ID', `${event.player.entityId}`, true)
.setFooter(`${event.server.name}`)
.setURL(`${process.env.CSMM_HOSTNAME}/player/${event.player.id}/profile`);

Expand Down

0 comments on commit 9960dbb

Please sign in to comment.