corrects not setup fully errors
This commit is contained in:
parent
74f362ddf7
commit
53645ec6ea
2 changed files with 26 additions and 11 deletions
|
|
@ -148,17 +148,26 @@ namespace BetterSecondBot.BetterRelayService
|
||||||
|
|
||||||
public void unattach_events()
|
public void unattach_events()
|
||||||
{
|
{
|
||||||
controler.getBot().MessageEvent -= SLMessageHandler;
|
if (superV != null)
|
||||||
superV.MessageEvent -= DiscordMessageHandler;
|
{
|
||||||
|
superV.MessageEvent -= DiscordMessageHandler;
|
||||||
|
}
|
||||||
|
if (controler.getBot() != null)
|
||||||
|
{
|
||||||
|
controler.getBot().MessageEvent -= SLMessageHandler;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void attach_events()
|
protected void attach_events()
|
||||||
{
|
{
|
||||||
controler.getBot().MessageEvent += SLMessageHandler;
|
|
||||||
if (superV != null)
|
if (superV != null)
|
||||||
{
|
{
|
||||||
superV.MessageEvent += DiscordMessageHandler;
|
superV.MessageEvent += DiscordMessageHandler;
|
||||||
}
|
}
|
||||||
|
if (controler.getBot() != null)
|
||||||
|
{
|
||||||
|
controler.getBot().MessageEvent += SLMessageHandler;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected HttpClient HTTPclient = new HttpClient();
|
protected HttpClient HTTPclient = new HttpClient();
|
||||||
|
|
|
||||||
|
|
@ -10,18 +10,24 @@ namespace BetterSecondBot.DiscordSupervisor
|
||||||
protected StatusMessageEvent LastNetworkEventArgs = null;
|
protected StatusMessageEvent LastNetworkEventArgs = null;
|
||||||
protected void attach_events()
|
protected void attach_events()
|
||||||
{
|
{
|
||||||
controler.getBot().MessageEvent += BotChatControlerHandler;
|
if (controler.getBot() != null)
|
||||||
controler.getBot().StatusMessageEvent += StatusMessageHandler;
|
{
|
||||||
controler.getBot().GroupsReadyEvent += GroupsReadyHandler;
|
controler.getBot().MessageEvent += BotChatControlerHandler;
|
||||||
controler.getBot().SendImEvent += SendImHandler;
|
controler.getBot().StatusMessageEvent += StatusMessageHandler;
|
||||||
|
controler.getBot().GroupsReadyEvent += GroupsReadyHandler;
|
||||||
|
controler.getBot().SendImEvent += SendImHandler;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void unattach_events()
|
protected void unattach_events()
|
||||||
{
|
{
|
||||||
controler.getBot().MessageEvent -= BotChatControlerHandler;
|
if (controler.getBot() != null)
|
||||||
controler.getBot().StatusMessageEvent -= StatusMessageHandler;
|
{
|
||||||
controler.getBot().GroupsReadyEvent -= GroupsReadyHandler;
|
controler.getBot().MessageEvent -= BotChatControlerHandler;
|
||||||
controler.getBot().SendImEvent -= SendImHandler;
|
controler.getBot().StatusMessageEvent -= StatusMessageHandler;
|
||||||
|
controler.getBot().GroupsReadyEvent -= GroupsReadyHandler;
|
||||||
|
controler.getBot().SendImEvent -= SendImHandler;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void SendImHandler(object sender, ImSendArgs e)
|
protected void SendImHandler(object sender, ImSendArgs e)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue