Example #1
0
        private void OnConnected(object sender, OnConnectedArgs e)
        {
            EvtConnectedArgs connectedArgs = new EvtConnectedArgs()
            {
                BotUsername     = e.BotUsername,
                AutoJoinChannel = e.AutoJoinChannel
            };

            OnConnectedEvent?.Invoke(connectedArgs);
        }
        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);
        }
Example #4
0
 private void OnConnected(EvtConnectedArgs e)
 {
     Console.WriteLine($"{LoginInformation.BotName} connected!");
 }
Example #5
0
 private void OnConnected(EvtConnectedArgs e)
 {
     TRBotLogger.Logger.Information($"Bot connected!");
 }
Example #6
0
 private void OnConnected(EvtConnectedArgs e)
 {
     Console.WriteLine($"Bot connected!");
 }