The current plugin's IRCPluginState, via which to send messages to the server.
Original event, to which we're replying.
Message body content to send.
Custom message properties, such as Message.Property.quiet and Message.Property.forced.
String name of the calling function, or something else that gives context.
IRCPluginState state; state.server.daemon = IRCServer.Daemon.twitch; IRCEvent event; event.type = IRCEvent.Type.CHAN; event.sender.nickname = "kameloso"; event.channel = "#channel"; event.content = "content"; event.id = "some-reply-id"; reply(state, event, "reply content"); immutable m = state.outgoingMessages.data[0]; 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)); }
Replies to a message in a Twitch channel. Requires version TwitchSupport, without which it will just pass on to chan.
If an IRCEvent of type QUERY is passed *and* we're connected to a Twitch server *and* the TwitchPlugin is compiled in, it will send a bus message to have the reply be sent as a whisper instead.