コード例 #1
0
        public MainWindow()
        {
            // Load the Keys
            SecretKeys keys = SecretKeys.Load("Secret.txt");

            // Create the Bot
            Bot = new KellyHoshiraBot(keys);
            Bot.OnMessageReceived += Bot_OnMessageReceived;
            Bot.OnLogReceived     += Bot_OnLogReceived;
            Bot.NetworkChanged    += Bot_NetworkChanged;

            // Initialize the Program
            InitializeComponent();
        }
コード例 #2
0
        public async Task MainAsync()
        {
            // Load the Secret Keys
            SecretKeys keys = SecretKeys.Load("Secret.txt");

            // Create the Bot
            Bot = new KellyHoshiraBot(keys);
            await Bot.InitializeAsync();

            Bot.OnMessageReceived += Bot_OnMessageReceived;
            Bot.OnLogReceived     += Bot_OnLogReceived;
            await Bot.ConnectAsync();

            await Task.Delay(-1);
        }