Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface GiveawayOptions

Hierarchy

  • GiveawayOptions

Index

Properties

Optional commands

commands: undefined | { create?: CommandOptions; delete?: CommandOptions; end?: CommandOptions; list?: CommandOptions; reroll?: CommandOptions; start?: CommandOptions }

Configure command options for default commands

Optional enableCommands

enableCommands: undefined | false | true

Toggle enabling default commands

default

true

Optional finishMessage

finishMessage: ((giveaway: Giveaway, winners: GuildMember[], msg: KlasaMessage) => Promise<any> | null) | Promise<any> | any

This function is called when the giveaway finishes. Here you can send a message listing the winners if any.

param

The giveaway instance

param

An array of randomly selected members who have won the giveaway

param

The giveaway message that was sent

see

this for a sample implementation

Optional maxGiveaways

maxGiveaways: undefined | number

Total number of giveaways allowed in a guild (used in default commands)

default

Infinite

Optional nextRefresh

nextRefresh: undefined | ((giveaway: Giveaway) => number)

Determines the time for the next giveaway refresh

param

The giveaway instance

see

this for a sample usage

Optional provider

provider: undefined | string

The provider to use for the giveaways

default

""

Optional requiredPermission

requiredPermission: undefined | number

Required permission level to start and manage giveaways (used in default commands)

default

5

Optional runMessage

runMessage: ((giveaway: Giveaway, language: Language) => string | MessageEmbed | MessageOptions) | string | MessageEmbed | MessageOptions

This function is called on creating and editing the giveaway message. You can customize your giveaway message with this. Make sure to return a value that can be used on .send()

param

The giveaway instance

param

Language setting of the guild

see

this for a sample implementation

Optional updateInterval

updateInterval: undefined | number

Time in milliseconds in which the manager updates each giveaway

default

5000

Optional winnersFilter

winnersFilter: undefined | ((member: GuildMember) => boolean)

Filters out certain users who reacted to the giveaway, use this if you would like to add additional filters before selecting a winner

param

A guild member who reacted to the giveaway

Generated using TypeDoc