mirror of
https://github.com/AsgardEternal/squad-js-map-vote.git
synced 2025-01-23 20:43:52 -06:00
added voteBroadcastMessage
This commit is contained in:
parent
09bae31e41
commit
4b0131a8e8
10
README.MD
10
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!"
|
||||
}
|
||||
```
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user