Example #1
0
 public async Task AddUserToDatabase(AntsBaseDataModel data)
 {
     try
     {
         if (!Database.Exists(x => x.DiscordId == data.DiscordId))
         {
             Database.Add(data);
         }
         else
         {
             Console.WriteLine("oops");
         }
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
         throw;
     }
 }
Example #2
0
 public async Task UpdateUserData(ulong discordId, AntsBaseDataModel data)
 {
     Database[Database.FindIndex(x => x.DiscordId == discordId)] = data;
 }