From 4b0131a8e81ce9ccc41db801c7f2c07ba494b069 Mon Sep 17 00:00:00 2001 From: Davide Fantino <80767709+fantinodavide@users.noreply.github.com> Date: Fri, 16 Sep 2022 22:41:55 +0200 Subject: [PATCH] added voteBroadcastMessage --- README.MD | 10 +++++++++- mapvote.js | 7 ++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/README.MD b/README.MD index eca8b5b..92dc45b 100644 --- a/README.MD +++ b/README.MD @@ -97,6 +97,13 @@ vote option to restart the vote with random entries. ```json false ``` +#### voteBroadcastMessage +###### Description +Message that is sent as broadcast to announce a vote. +###### Default +``` +✯ MAPVOTE ✯ Vote for the next map by writing in chat the corresponding number! +``` ### Example configuration ```json { @@ -110,6 +117,7 @@ false "gamemodeWhitelist": [ "AAS", "RAAS", "Invasion" ], "layerLevelBlacklist": [ "BlackCoast_Seed" ], "hideVotesCount": false, - "showRerollOption": false + "showRerollOption": false, + "voteBroadcastMessage": "✯ MAPVOTE ✯ Vote for the next map by writing in chat the corresponding number!" } ``` diff --git a/mapvote.js b/mapvote.js index d70742c..0f28b74 100644 --- a/mapvote.js +++ b/mapvote.js @@ -89,6 +89,11 @@ export default class MapVote extends BasePlugin { required: false, description: 'vote option to restart the vote with random entries', default: false + }, + voteBroadcastMessage: { + required: false, + description: 'Message that is sent as broadcast to announce a vote', + default: "✯ MAPVOTE ✯ Vote for the next map by writing in chat the corresponding number!" } }; } @@ -576,7 +581,7 @@ export default class MapVote extends BasePlugin { //Note: broadcast strings with multi lines are very strange async broadcastNominations() { if (this.nominations.length > 0 && this.votingEnabled) { - await this.broadcast("✯ MAPVOTE ✯ Vote for the next map by writing in chat the corresponding number!\n"); + await this.broadcast(this.options.voteBroadcastMessage); let nominationStrings = []; for (let choice = 1; choice < this.nominations.length; choice++) { choice = Number(choice);