DPB2Class · Bots, plugins and tasks

BotManager

Discover installed bots, inspect the selected bot and observe or control its lifecycle.

Namespace: DreamPoeBot.Loki.Bot

public static class BotManagerView DPB1 version →

Examples

Imports used by these examples
using System;
using System.Linq;
using DreamPoeBot.Loki.Game;
using DreamPoeBot.Loki.Game.Objects;
using DreamPoeBot.Loki.Bot;
using DreamPoeBot.Loki.Bot.Pathfinding;
using DreamPoeBot.Loki.Common;

Check the selected bot

var bot = BotManager.Current;
if (bot == null || !BotManager.IsRunning)
    return;

var botName = bot.Name;

Observe the current selection without starting or stopping it.

Members and overloads

28 results

OnBotChanged

EventLink ↗
public static EventHandler<BotChangedEventArgs> BotManager.OnBotChanged

Raised for on bot changed. Subscribe with the callback type shown in the signature.

OnBotTickException

EventLink ↗
public static EventHandler<BotTickExceptionEventArgs> BotManager.OnBotTickException

Raised for on bot tick exception. Subscribe with the callback type shown in the signature.

OnClientFrozen

EventLink ↗
public static EventHandler<ClientFrozenEventArgs> BotManager.OnClientFrozen

Raised for on client frozen. Subscribe with the callback type shown in the signature.

PostStart

EventLink ↗
public static BotManager.BotEvent BotManager.PostStart

Raised for post start. Subscribe with the callback type shown in the signature.

PostStop

EventLink ↗
public static BotManager.BotEvent BotManager.PostStop

Raised for post stop. Subscribe with the callback type shown in the signature.

PostTick

EventLink ↗
public static BotManager.BotEvent BotManager.PostTick

Raised for post tick. Subscribe with the callback type shown in the signature.

PreStart

EventLink ↗
public static BotManager.BotEvent BotManager.PreStart

Raised for pre start. Subscribe with the callback type shown in the signature.

PreStop

EventLink ↗
public static BotManager.BotEvent BotManager.PreStop

Raised for pre stop. Subscribe with the callback type shown in the signature.

PreTick

EventLink ↗
public static BotManager.BotEvent BotManager.PreTick

Raised for pre tick. Subscribe with the callback type shown in the signature.

LogVariableChange

FieldLink ↗
public static bool BotManager.LogVariableChange

Set it to true to log Ticks delay variations.

TotalExceptionRuntime

FieldLink ↗
public static int BotManager.TotalExceptionRuntime

Return the Total number of exceptions the botmanager registered since the botmanager was created.

_bots

FieldLink ↗
public static List<IBot> BotManager._bots

Return a list of loaded IBots

Start

MethodLink ↗
public static bool BotManager.Start()

Starts this component's lifecycle.

Returns: A Boolean result. The member description explains the condition being checked.

Stop

MethodLink ↗
public static bool BotManager.Stop(StopReasonData reason, bool force = false)

Stops this component's lifecycle.

reasonStopReasonData
Specifies reason.
forcebool
Specifies force. Optional; the default is shown in the signature.

Returns: A Boolean result. The member description explains the condition being checked.

Stop

MethodLink ↗
public static bool BotManager.Stop(bool force = false)

Stops this component's lifecycle.

forcebool
Specifies force. Optional; the default is shown in the signature.

Returns: A Boolean result. The member description explains the condition being checked.

BotThread

PropertyLink ↗
public static Thread BotManager.BotThread { get; private set; }

Gets bot thread for BotManager.

Bots

PropertyLink ↗
public static IReadOnlyList<IBot> BotManager.Bots { get; }

Gets the bots collection. Its element types are linked below.

ClientFrozen

PropertyLink ↗
public static bool BotManager.ClientFrozen { get; }

Gets client frozen for BotManager.

Current

PropertyLink ↗
public static IBot BotManager.Current { get; set; }

Gets or sets current for BotManager.

ExceptionCount

PropertyLink ↗
public static int BotManager.ExceptionCount { get; }

Gets exception count for BotManager.

Exceptions

PropertyLink ↗
public static IReadOnlyList<Tuple<Exception, DateTime>> BotManager.Exceptions { get; }

Gets the exceptions collection. Its element types are linked below.

IsRunning

PropertyLink ↗
public static bool BotManager.IsRunning { get; }

Whether this bot manager is running.

IsStopping

PropertyLink ↗
public static bool BotManager.IsStopping { get; }

Whether this bot manager is stopping.

MsBeforeNextTick

PropertyLink ↗
public static int BotManager.MsBeforeNextTick { get; set; }

Gets the residual wait calculated for the current cycle, or zero when no cadence wait is pending. Setting this property configures the same cycle minimum as MsBetweenTicks; it does not enqueue an additional delay.

MsBetweenTicks

PropertyLink ↗
public static int BotManager.MsBetweenTicks { get; set; }

Gets or sets the minimum duration of the complete synchronous tick cycle, including PreTick and PostTick. Work already performed is subtracted from the single wait; slow cycles do not cause catch-up. Compatibility alias for the minimum configured through MsBeforeNextTick. Zero disables cadence throttling; only a nonblocking stop check remains.

StopBotAfterXExceptionsBeforeTickCompletes

PropertyLink ↗
public static int BotManager.StopBotAfterXExceptionsBeforeTickCompletes { get; set; }

Gets or sets stop bot after x exceptions before tick completes for BotManager.

StopReason

PropertyLink ↗
public static StopReasonData BotManager.StopReason { get; }

Gets stop reason for BotManager.

TimeOfLastTick

PropertyLink ↗
public static DateTime BotManager.TimeOfLastTick { get; }

Gets time of last tick for BotManager.

Related types

DPB2 0.4.5.88 · Reference reviewed 2026-10-02. Descriptions use source summaries where available, otherwise concise signature-based descriptions. Examples illustrate usage; they are not a live-game test.