reply

Replies to a message in a Twitch channel. Requires version TwitchSupport, without which it will just pass on to chan.

void
reply
(,
const ref IRCEvent event
,
const string content
,,
const string caller = __FUNCTION__
)

Parameters

state IRCPluginState

The current plugin's IRCPluginState, via which to send messages to the server.

event IRCEvent

Original event, to which we're replying.

content string

Message body content to send.

properties Message.Property

Custom message properties, such as Message.Property.quiet and Message.Property.forced.

caller string

String name of the calling function, or something else that gives context.

Examples

IRCPluginState state;
state.server.daemon = IRCServer.Daemon.twitch;
state.mainThread = thisTid;

IRCEvent event;
event.sender.nickname = "kameloso";
event.channel = "#channel";
event.content = "content";
event.id = "some-reply-id";

reply(state, event, "reply content");

receive(
    (Message m)
    {
        with (m.event)
        {
            assert((type == IRCEvent.Type.CHAN), Enum!(IRCEvent.Type).toString(type));
            assert((content == "reply content"), content);
            assert((tags == "reply-parent-msg-id=some-reply-id"), tags);
            assert((m.properties == Message.Property.init));
        }
    }
);

Meta