State

The State class is used to track and maintain client state.

Constructors

this
this(Client client)

Undocumented in source.

Members

Variables

api
APIClient api;

APIClient instance

channels
ChannelMap channels;

All currently loaded channels

client
Client client;

Client instance

directMessages
ChannelMap directMessages;

All currently loaded DMs

guilds
GuildMap guilds;

All currently loaded guilds

gw
GatewayClient gw;

GatewayClient instance

me
User me;

Currently logged in user, recieved from READY payload.

ready
LocalManualEvent ready;

Event triggered when all guilds are synced

requestOfflineMembers
bool requestOfflineMembers;

Undocumented in source.

users
UserMap users;

All users that the bot sees

voiceStates
VoiceStateMap voiceStates;

All voice states

Inherited Members

From Emitter

listeners
BoundEmitter[][string][EmitterOrder] listeners;

Undocumented in source.

on
EventListener on(string event, void delegate() f, EmitterOrder order)

Listen to an event by string, ignoring the actual event in the callback.

listen
EventListener listen(void delegate(T) f, EmitterOrder order)

Listen to an event based on its type.

listenRaw
EventListener listenRaw(string event, void delegate(Variant) f, EmitterOrder order)

Listen to an event based on its name.

listenAll
AllEventListener listenAll(void delegate(string, Variant) f, EmitterOrder order)

Listen to all events.

emit
void emit(T obj)

Emit an event.

Meta