Message constraints

AntiSpamMessageConstraint

class daf.message.constraints.AntiSpamMessageConstraint(per_channel: bool = True)

Prevents a new message to be sent if the last message in the same channel was sent by us, thus preventing spam on inactivate channels.

Added in version 4.1.

check(channels: list[TextChannel | AutoCHANNEL]) list[TextChannel]

Checks if the message can be sent based on the configured check.