using System.Threading.Tasks;
using System.Collections.Generic;
throw new System.FormatException("ID was not included");
public User(string Name, string ID)
public string name { get; set; }
public string id { get; set; }
public int timeSinceActive { get; set; }
public override string ToString()
static DiscordClient discord;
static async Task MainAsync()
discord = new DiscordClient(new DiscordConfiguration
Token = "NzA1Nzg5NDEwMzg1NDYxMjk4.XqwznA.8f8oiSbPjlU34htvjd2cWMMLyOA",
TokenType = TokenType.Bot
var userList = new List<User>();
var userIDList = new List<string>();
discord.MessageCreated += async e =>
userList.Add(new User{ name = e.Author.Username, timeSinceActive = 0, id = e.Author.Id.ToString()});
userIDList.Add(e.Author.Id.ToString());
await e.Message.RespondAsync(userList.Count.ToString());
await e.Message.RespondAsync("Name: \"" + userList[0].name + "\", Time since active: " + userList[0].timeSinceActive.ToString() + ", ID: " + userList[0].id);
await e.Message.RespondAsync(userIDList[0]);
await e.Message.RespondAsync(userIDList.Find(stringToCheck => stringToCheck.Contains(e.Author.Id.ToString())));
await discord.ConnectAsync();
public static void Main()
MainAsync().ConfigureAwait(false).GetAwaiter().GetResult();