diff --git a/src/rustplusEvents/connected.js b/src/rustplusEvents/connected.js index a521bb7e..fe795150 100644 --- a/src/rustplusEvents/connected.js +++ b/src/rustplusEvents/connected.js @@ -22,6 +22,7 @@ const DiscordMessages = require('../discordTools/discordMessages.js'); const Info = require('../structures/Info'); const Map = require('../structures/Map'); const PollingHandler = require('../handlers/pollingHandler.js'); +const discordVoice = require('../discordTools/discordVoice.js'); module.exports = { name: 'connected', @@ -68,6 +69,8 @@ module.exports = { await rustplus.map.writeMap(false, true); await DiscordMessages.sendServerWipeDetectedMessage(guildId, serverId); + await discordVoice.sendDiscordVoiceMessage(guildId, + client.intlGet(guildId, 'wipeDetected')); await DiscordMessages.sendInformationMapMessage(guildId); } else { @@ -93,6 +96,8 @@ module.exports = { } await DiscordMessages.sendServerChangeStateMessage(guildId, serverId, 0); + await discordVoice.sendDiscordVoiceMessage(guildId, + client.intlGet(guildId, 'serverJustOnline')) } await DiscordMessages.sendServerMessage(guildId, serverId, null); diff --git a/src/rustplusEvents/disconnected.js b/src/rustplusEvents/disconnected.js index 0a4d02a2..c461b650 100644 --- a/src/rustplusEvents/disconnected.js +++ b/src/rustplusEvents/disconnected.js @@ -21,6 +21,7 @@ const DiscordMessages = require('../discordTools/discordMessages.js'); const Config = require('../../config'); +const discordVoice = require('../discordTools/discordVoice.js'); module.exports = { name: 'disconnected', @@ -61,6 +62,8 @@ module.exports = { if (client.activeRustplusInstances[guildId]) { if (!client.rustplusReconnecting[guildId]) { await DiscordMessages.sendServerChangeStateMessage(guildId, serverId, 1); + await discordVoice.sendDiscordVoiceMessage(guildId, + client.intlGet(guildId, 'serverJustOffline')) await DiscordMessages.sendServerMessage(guildId, serverId, 2); }