class DiscordMiddleware::Conditional

Overview

The Conditional middleware is useful when you want to check one or more conditions from the context or elsewhere, but don't want to write your own middleware to do it.

Defined in:

discordcr-middleware/middleware/conditional.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(condition : Proc(Discord::Message, Discord::Context, Bool)) #

[View source]

Instance Method Detail

def call(payload : Discord::Message, context : Discord::Context, &block) #

[View source]