From 3e66a5659de35c9f523e01fb1a925a9be2f76264 Mon Sep 17 00:00:00 2001
From: Toastie <toastie@toastiet0ast.com>
Date: Tue, 29 Oct 2024 23:12:51 +1300
Subject: [PATCH] Switched RNG

---
 Database.cs | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/Database.cs b/Database.cs
index d4d53dc..517da9e 100644
--- a/Database.cs
+++ b/Database.cs
@@ -1,6 +1,7 @@
 using System;
 using System.Linq;
 using System.Collections.Generic;
+using System.Security.Cryptography;
 using DSharpPlus;
 using MySqlConnector;
 
@@ -10,8 +11,6 @@ public static class Database
 {
     private static string connectionString = "";
 
-    private static readonly Random random = new Random();
-
     public static void SetConnectionString(string host, int port, string database, string username, string password)
     {
         connectionString = "server=" + host +
@@ -455,7 +454,7 @@ public static class Database
     public static StaffMember GetRandomActiveStaff(params ulong[] ignoredUserIDs)
     {
         List<StaffMember> staffMembers = GetActiveStaff(ignoredUserIDs);
-        return staffMembers.Any() ? staffMembers[random.Next(staffMembers.Count)] : null;
+        return staffMembers.Any() ? staffMembers[RandomNumberGenerator.GetInt32(staffMembers.Count)] : null;
     }
 
     public static List<StaffMember> GetActiveStaff(params ulong[] ignoredUserIDs)