private void OnJoinedChannel(EvtJoinedChannelArgs e) { Console.WriteLine($"Joined channel \"{e.Channel}\""); MsgHandler.SetChannelName(e.Channel); string connectMessage = DataHelper.GetSettingString(SettingsConstants.CONNECT_MESSAGE, "Connected!"); MsgHandler.QueueMessage(connectMessage); }
private void OnJoinedChannel(object sender, OnJoinedChannelArgs e) { EvtJoinedChannelArgs jcArgs = new EvtJoinedChannelArgs() { BotUsername = e.BotUsername, Channel = e.Channel }; OnJoinedChannelEvent?.Invoke(jcArgs); }
private void OnClientJoinedChannel(EvtJoinedChannelArgs e) { //When joining a channel, set the joined channels list if (JoinedChannels == null) { JoinedChannels = new List <string>(1); } JoinedChannels.Clear(); JoinedChannels.Add(e.Channel); }
private void OnJoinedChannel(EvtJoinedChannelArgs e) { if (string.IsNullOrEmpty(BotSettings.ConnectMessage) == false) { string finalMsg = BotSettings.ConnectMessage.Replace("{0}", LoginInformation.BotName).Replace("{1}", Globals.CommandIdentifier.ToString()); MsgHandler.QueueMessage(finalMsg); } Console.WriteLine($"Joined channel \"{e.Channel}\""); if (CommandHandler == null) { CommandHandler = new CommandHandler(); } }
private void SetupStart() { EvtConnectedArgs conArgs = new EvtConnectedArgs { BotUsername = BotProgram.BotName, AutoJoinChannel = string.Empty }; OnConnectedEvent?.Invoke(conArgs); EvtJoinedChannelArgs joinedChannelArgs = new EvtJoinedChannelArgs { BotUsername = BotProgram.BotName, Channel = string.Empty }; OnJoinedChannelEvent?.Invoke(joinedChannelArgs); }
private void SetupStart() { TRBotLogger.Logger.Information($"\nPlease enter a name to use (no spaces)! This can be an existing name in the database. Skip to use \"{DEFAULT_TERMINAL_USERNAME}\" as the name."); string newName = Console.ReadLine(); Console.WriteLine(); if (string.IsNullOrEmpty(newName) == true) { newName = DEFAULT_TERMINAL_USERNAME; } else { //Remove all spaces newName = Helpers.RemoveAllWhitespace(newName); } //Set the name TerminalUsername = newName; EvtConnectedArgs conArgs = new EvtConnectedArgs { BotUsername = TerminalUsername, AutoJoinChannel = string.Empty }; OnConnectedEvent?.Invoke(conArgs); EvtJoinedChannelArgs joinedChannelArgs = new EvtJoinedChannelArgs { BotUsername = TerminalUsername, Channel = string.Empty }; OnJoinedChannelEvent?.Invoke(joinedChannelArgs); }