I've coded a discord bot in c#, but my bot doesn't goes online, and I don't know what could be the problem... When I try to execute it, it shows me a cmd panel (I've suposed that is normal), but there is nothing writed in, and in my server (my bot is in too), the bot doesn't goes online. The program compiles perfectly and is not showing errors at the terminal. I'm using Discord.Net v1.0.2
Here is the code
using System;
using Discord;
using Discord.WebSocket;
using System.Threading.Tasks;
namespace testApp
{
class Program
{
static void Main(string[] args)
=> new Program().StartAsync().GetAwaiter().GetResult();
private DiscordSocketClient _client;
private CommandHandler _handler;
private string _token = "XXXXXXXXXXXXXXXX";
public async Task StartAsync()
{
_client = new DiscordSocketClient();
await _client.LoginAsync(TokenType.Bot, _token);
await _client.StartAsync();
_handler = new CommandHandler(_client);
await Task.Delay(-1);
}
}
}