mirror of
https://github.com/AsgardEternal/squad-js-map-vote.git
synced 2025-01-23 23:03:51 -06:00
chore: added showWinnerBroadcastMessage
This commit is contained in:
parent
4c3b2ee895
commit
8b73967b96
@ -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",
|
||||
|
@ -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({
|
||||
|
Loading…
x
Reference in New Issue
Block a user