The error message states the code is missing an ending bracket to close the namespace. It also looks like you are missing using statements at the top of the file.
namespace DiscordBot
{
class Program
{
public static object TokenType { get; private set; }
static void Main()
{
MainAsync().GetAwaiter().GetResult();
}
static async Task MainAsync()
{
var discord = new DiscordClient(new DiscordConfiguration()
{
Token = "MTA0ODUxOTY0MTcyNDYxNjc0NA.GXGNNI.QU_O6qd1mwLksiBTx9jOO8tV3XieEj6w_1sOiE",
TokenType = TokenType.Bot,
Intents = DiscordIntents.AllUnprivileged,
});
new DiscordConfiguration()
{
MinimumLogLevel = Microsoft.Extensions.Logging.LogLevel.Debug,
};
await discord.ConnectAsync();
await Task.Delay(-1);
}
}
}