![]() |
D++ (DPP)
C++ Discord API Bot Library
|
Role collector. Collects guild roles during a set timeframe and returns them in a list via the completed() method. More...
#include <collector.h>
Public Member Functions | |
| role_collector (cluster *cl, uint64_t duration) | |
| Construct a new role collector object. | |
| virtual | ~role_collector ()=default |
| Destroy the role collector object. | |
| virtual void | cancel () |
| Immediately cancels the collector. | |
| virtual void | completed (const std::vector< dpp::role > &list)=0 |
| Return the completed collection. | |
| virtual const dpp::role * | filter (const dpp::guild_role_create_t &element) |
| Select and filter the items which are to appear in the list This is called every time a new event is fired, to filter the event and determine which of the items is sent to the list. Returning nullptr excludes the item from the list. | |
Protected Attributes | |
| class cluster * | owner |
| Owning cluster. | |
Role collector. Collects guild roles during a set timeframe and returns them in a list via the completed() method.
|
inline |
Construct a new role collector object.
| cl | cluster to associate the collector with |
| duration | Duration of time to run the collector for in seconds |
|
virtualdefault |
Destroy the role collector object.
|
inlinevirtualinherited |
Immediately cancels the collector.
Use this if you have met the conditions for which you are collecting objects early, e.g. you were watching for a message containing 'yes' or 'no' and have received it before the time is up.
|
pure virtual |
Return the completed collection.
| list | items collected during the timeframe specified |
Implements dpp::collector< dpp::guild_role_create_t, dpp::role >.
|
inlinevirtual |
Select and filter the items which are to appear in the list This is called every time a new event is fired, to filter the event and determine which of the items is sent to the list. Returning nullptr excludes the item from the list.
| element | element to filter |
Implements dpp::collector< dpp::guild_role_create_t, dpp::role >.
|
protectedinherited |
Owning cluster.