Example #1
0
        private async void B_VerifyReward_Click(object sender, EventArgs e)
        {
            IRC.KrakenConnections apiConnection = new IRC.KrakenConnections(programSettings.TwitchUsername, programSettings.TwitchPassword);

            await apiConnection.GetBroadcasterIDAsync();

            await apiConnection.VerifyChannelRewardsAsync(mainFormReference, TB_SoundRewardID.Text, null);

            MessageBox.Show("Results should be displayed in main chat window (Sorry, that was an afterthought)", "Notification", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Example #2
0
        private async void B_CreateReward_Click(object sender, EventArgs e)
        {
            var dialogResult = MessageBox.Show("Are you sure you want to create a new Reward?", "Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);

            if (dialogResult == DialogResult.Yes)
            {
                IRC.KrakenConnections apiConnection = new IRC.KrakenConnections(SettingsReference.TwitchUsername, SettingsReference.TwitchPassword);
                var broadcasterTask = apiConnection.GetBroadcasterIDAsync();
                var result          = await apiConnection.CreateRewardAsync(IRC.KrakenConnections.RewardType.TTS);

                if (result != null)
                {
                    TB_CustomRewardID.Text = result.id;
                    MessageBox.Show("Successfully created a new reward!", "Notification", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }