コード例 #1
0
 /// <summary>
 /// Gets the discord Keys object. This includes deserialization from
 /// </summary>
 /// <returns>The instance of the Discord Keys</returns>
 private static DiscordKeys GetInstance()
 {
     if (instance == null)
     {
         lock (padlock)
         {
             if (instance == null)
             {
                 instance = JsonConvert.DeserializeObject <DiscordKeys>(File.ReadAllText(keysFile));
             }
         }
     }
     return(instance);
 }
コード例 #2
0
 /// <summary>
 /// Gets the Rocket League Discord Key for the Rocket League Discord Bot
 /// </summary>
 /// <returns>The Rocket League Discord Bot Key</returns>
 public static string GetRocketLeagueKey()
 {
     return(DiscordKeys.GetInstance().RocketLeagueKey);
 }
コード例 #3
0
 /// <summary>
 /// Gets the Esports Key for the main Esports Bot
 /// </summary>
 /// <returns>The Esports Discord Key</returns>
 public static string GetEsportsKey()
 {
     return(DiscordKeys.GetInstance().EsportsKey);
 }