Class | ::Bot::Plugins::BotModule
In: | lib/rbot/core/utils/extends.rb
Parent: | Object

### Methods

fake_message

### Public Instance methods

fake_message(string, opts={})

Sometimes plugins need to create a new fake message based on an existing message: for example, this is done by alias, linkbot, reaction and remotectl.

This method simplifies the message creation, including a recursion depth check.

In the options you can specify the :bot, the :server, the :source, the :target, the message :class and whether or not to :delegate. To initialize these entries from an existing message, you can use :from

Additionally, if :from is given, the reply method of created message is overriden to reply to :from instead. The in_thread attribute for created mesage is also copied from :from

If you don‘t specify a :from you should specify a :source.

[Validate]