SecondBot/BetterSecondbot/DiscordSupervisor/Values.cs
Madpeterz 186263c20e New stuff,Fixs and API changes
Fixed wiki make I hope
HTTP api "ParcelEstate" split into Parcel, Estate ready for more later
Datastorage event class for stuff (currently only Estate bans)
Class renamed from CliExitOnLogout to Cli.
Events moved from athome to Events, and the old Athome renamed attachable
2021-02-15 06:12:43 +00:00

64 lines
1.7 KiB
C#

using BetterSecondBotShared.Json;
using Discord;
using Discord.WebSocket;
using System.Collections.Generic;
namespace BetterSecondBot.DiscordSupervisor
{
public abstract class DiscordValues
{
protected JsonConfig myconfig;
protected bool exit_super = false;
protected Cli controler;
protected bool running_as_docker = false;
protected bool discord_group_relay;
protected DiscordSocketClient DiscordClient;
protected bool DiscordClientConnected;
protected IGuild DiscordServer;
protected string LastSendDiscordStatus = "";
protected long DiscordUnixTimeOnine;
protected bool DiscordLock;
protected string LastStatusMessage = "";
protected Dictionary<string, ICategoryChannel> catmap = new Dictionary<string, ICategoryChannel>();
protected virtual void login_bot(bool self_keepalive)
{
}
protected virtual void keep_alive()
{
}
protected bool HasBot()
{
if (HasBasicBot() == true)
{
return controler.Bot.GetClient.Network.Connected;
}
return false;
}
protected bool HasBasicBot()
{
if (controler != null)
{
if (controler.Bot != null)
{
if (controler.Bot.GetClient != null)
{
if (controler.Bot.GetClient.Network != null)
{
return true;
}
}
}
}
return false;
}
}
}