diff --git a/README.MD b/README.MD index 66ef761..95c89ff 100644 --- a/README.MD +++ b/README.MD @@ -162,6 +162,13 @@ Message that is sent as broadcast to announce the winning layer. ```json "✯ MAPVOTE ✯\nThe winning layer is\n\n" ``` +#### showWinnerBroadcastMessage +###### Description +Enables the broadcast at the end of the voting. +###### Default +```json +true +``` #### allowedSameMapEntries ###### Description Allowed max NUMBER of times a map could appear in the vote list. @@ -241,6 +248,7 @@ Array of timeframes that allows to override options based on local time. See exa "showRerollOption": false, "voteBroadcastMessage": "✯ MAPVOTE ✯\nVote for the next map by writing in chat the corresponding number!", "voteWinnerBroadcastMessage": "✯ MAPVOTE ✯\nThe winning layer is\n\n", + "showWinnerBroadcastMessage": true, "allowedSameMapEntries": 1, "logToDiscord": true, "channelID": "112233445566778899", diff --git a/mapvote.js b/mapvote.js index 275f890..fc7df93 100644 --- a/mapvote.js +++ b/mapvote.js @@ -120,6 +120,11 @@ export default class MapVote extends DiscordBasePlugin { description: 'Message that is sent as broadcast to announce the winning layer', default: "✯ MAPVOTE ✯\nThe winning layer is\n\n" }, + showWinnerBroadcastMessage: { + required: false, + description: 'Enables the broadcast at the end of the voting.', + default: true + }, allowedSameMapEntries: { required: false, description: 'Allowed NUMBER of duplicate map entries in vote list', @@ -648,7 +653,7 @@ export default class MapVote extends DiscordBasePlugin { this.endVoting(); const winnerLayer = Layers.layers.find((l) => l.layerid == this.updateNextMap()); const fancyWinner = this.formatFancyLayer(winnerLayer); - await this.broadcast(this.options.voteWinnerBroadcastMessage + fancyWinner); + if (this.showWinnerBroadcastMessage) await this.broadcast(this.options.voteWinnerBroadcastMessage + fancyWinner); if (!this.options.logToDiscord) return return await this.sendDiscordMessage({