Diggler



struct  Context;

Context for operations used by command methods.

diggler.command.CommandSet subtypes an instance of this type, allowing command methods to access the properties and methods of this type without any preceding qualification.

Some operations are synchronous, non-blocking operations; they may time a significant duration of time to complete, but they do not block the thread from handling other events, such as other command invocations.


this(Context ctx, string target);

Create a new context from an existing one, but with a different originating channel/user.

Parameters
Context ctx existing context to copy
string target channel name or user nick name

pure nothrow @property Bot  bot();

The current  bot.


pure nothrow @property ref const(IrcUser)  user();

The user that invoked the command.


@property IrcChannel  channel();

The channel the command was invoked in.

Throws an exception if the command originated from a private message.


pure nothrow @property bool  isPrivateMessage();

Boolean whether or not the command was invoked from a private message.


void  reply(FmtArgs...)(in char[] fmt, FmtArgs fmtArgs);

Reply to the channel in which the command was invoked. If there is more than one argument, the first argument is formatted with subsequent ones.

If the command originated in a private message, the reply is sent to the invoking user as a private message.

See Also
std.format.formattedWrite

void  wait(double time);

Wait the given length of time before returning.

This is a synchronous but non-blocking operation.


struct  WhoisResult;

Result of Context.whois.


IrcUser  user;

Nickname, username and hostname of the user.


string  realName;

Real name of the user.


string[]  channels;

Channels the user is currently a member of.


bool  operator;

Boolean whether or not the user is an IRC (server or network-wide) operator.


WhoisResult  whois(string nick);

Lookup more information about the user for the given nick name.

This is a synchronous but non-blocking operation.

Parameters
string nick nick name of user to lookup

void  quit(in char[] msg);

Disconnect from the current network with the given message.

Parameters
char[] msg comment sent in quit notification