Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Collector

Collect messages and component interactions.


textable.createMessageCollector(options)

Create a new message collector and start it

Parameter Description
options Object (optional)
The options of the collector
options.maxReceived Boolean (optional)
Whether deleted messages will be counted to end the collector
options.filter Function (optional)
The filter that will be applied to the collector
options.onRun Function (optional)
Emitted after an object is saved
options.onEnd Function (optional)
Emitted after collector ends
options.timeout Number (optional)
Collector duration in milliseconds.
options.idle Boolean (optional)
Whether the collector timeout will be restarted after saving an element
options.max Number (optional)
The limit of objects in the collector

Returns Collector<'messageCreate'>

client.createChannelMessageCollector(channelID, options)

Create a new message collector and start it

Parameter Description
channelID String
The ID of the channel
options Object (optional)
The options of the collector
options.maxReceived Boolean (optional)
Whether deleted messages will be counted to end the collector
options.filter Function (optional)
The filter that will be applied to the collector
options.onRun Function (optional)
Emitted after an object is saved
options.onEnd Function (optional)
Emitted after collector ends
options.timeout Number (optional)
Collector duration in milliseconds.
options.idle Boolean (optional)
Whether the collector timeout will be restarted after saving an element
options.max Number (optional)
The limit of objects in the collector

Returns Collector<'messageCreate'>

message.createComponentCollector(options)

Create a new component interaction collector and start it

Parameter Description
options Object (optional)
The options of the collector
options.maxReceived Boolean (optional)
Whether deleted messages will be counted to end the collector
options.filter Function (optional)
The filter that will be applied to the collector
options.onRun Function (optional)
Emitted after an object is saved
options.onEnd Function (optional)
Emitted after collector ends
options.timeout Number (optional)
Collector duration in milliseconds.
options.idle Boolean (optional)
Whether the collector timeout will be restarted after saving an element
options.max Number (optional)
The limit of objects in the collector

Returns Collector<'interactionCreate'>