You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
980 B
40 lines
980 B
using Discord;
|
|
using Discord.WebSocket;
|
|
using stream_sniper.Misc;
|
|
using System;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
|
|
namespace stream_sniper
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for MainWindow.xaml
|
|
/// </summary>
|
|
public partial class MainWindow : Window
|
|
{
|
|
public DiscordSocketClient client = new DiscordSocketClient();
|
|
|
|
//this is only for testing
|
|
public MainWindow()
|
|
{
|
|
InitializeComponent();
|
|
Helper.AllocConsole();
|
|
}
|
|
|
|
|
|
//initialize Discord client on window load
|
|
private async void Window_Loaded(object sender, RoutedEventArgs e)
|
|
{
|
|
client = new DiscordSocketClient();
|
|
await client.LoginAsync(TokenType.User, Config.TOKEN, false);
|
|
|
|
client.Ready += new Func<Task>(ClientReady);
|
|
}
|
|
|
|
private async Task ClientReady()
|
|
{
|
|
Console.WriteLine("Client logged in and ready");
|
|
}
|
|
}
|
|
}
|