Models

Models are classes that are constructed internally and are not meant to be constructed by users.

Note

Nearly all classes here have __slots__ defined which means that it is impossible to have dynamic attributes to the data classes.

MaxUsages

class discord_tools.MaxUsages(limit, bucket, **options)[source]

Represents a maximum usages object.

This is not meant to be constructed manually but rather built by max_usages().

limit

The usages limit that are allowed before raising MaxUsagesReached.

Type:

int

bucket

The bucket in which the usages are restricted by.

Type:

Union[discord.ext.commands.BucketType, BucketType]

hide_after_limit

Whether to set the discord.ext.commands.Command.hidden attribute to True when the limit is reached.

Type:

bool

disable_after_limit

Whether to set the discord.ext.commands.Command.enabled attribute to False when the limit is reached.

Type:

bool