class Tourmaline::CommandFilter

Overview

Filters messages that include a specific command or commands.

Options:

Context additions:

Example:

filter = CommandFilter.new("echo")

Defined in:

tourmaline/filters/command_filter.cr

Constructors

Instance Method Summary

Instance methods inherited from class Tourmaline::Filter

&(other : Filter | FilterGroup) &, |(other : Filter | FilterGroup) |, exec(client : Client, update : Update) : Bool exec

Constructor Detail

def self.new(commands : String | Array(String), prefix = nil, private_only : Bool = false, group_only : Bool = false, admin_only : Bool = false) #

[View source]

Instance Method Detail

def admin_only : Bool #

[View source]
def admin_only=(admin_only : Bool) #

[View source]
def commands : Array(String) #

[View source]
def commands=(commands : Array(String)) #

[View source]
def exec(client : Client, update : Update) : Bool #

[View source]
def group_only : Bool #

[View source]
def group_only=(group_only : Bool) #

[View source]
def prefix : String #

[View source]
def prefix=(prefix : String) #

[View source]
def private_only : Bool #

[View source]
def private_only=(private_only : Bool) #

[View source]