Exemplo n.º 1
0
        internal async Task RaiseTwitchOnBeingHosted(HostedEventArguments args)
        {
            BotChannel bchan = await Program.Channels.GetTwitchChannelByName(args.HostedChannel);

            if (bchan != null)
            {
                OnTwitchHostEvent?.Invoke(bchan, args);
            }
        }
Exemplo n.º 2
0
        internal void RaiseHostEvent(BotChannel bChan, HostedEventArguments e)
        {
            if (bChan == null || e == null)
            {
                Core.LOG(new LogEntry(LOGSEVERITY.ERROR, "Events", "RaiseHostEvent fed NULL parameter."));
                return;
            }
            if (Program.Debugmode)
            {
                Core.LOG(new LogEntry(LOGSEVERITY.INFO, "EVENTS", $"Twitch channel {e.HostedChannel} hosted by {e.HostChannel}"));
            }

            OnTwitchHostEvent?.Invoke(bChan, e);
        }