added voteBroadcastMessage

This commit is contained in:
Davide Fantino 2022-09-16 22:41:55 +02:00
parent 09bae31e41
commit 4b0131a8e8
2 changed files with 15 additions and 2 deletions

View File

@ -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!"
}
```

View File

@ -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);