-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 91beefb
Showing
16 changed files
with
2,400 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.vs/ | ||
**/bin/ | ||
**/obj/ | ||
ffmpeg.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.8.34309.116 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TecieDiscordRebuild", "TecieDiscordRebuild\TecieDiscordRebuild.csproj", "{41C3EC82-DE57-4BFB-8B93-5E4C921BCE5C}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{41C3EC82-DE57-4BFB-8B93-5E4C921BCE5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{41C3EC82-DE57-4BFB-8B93-5E4C921BCE5C}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{41C3EC82-DE57-4BFB-8B93-5E4C921BCE5C}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{41C3EC82-DE57-4BFB-8B93-5E4C921BCE5C}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {C3426CB1-ACE1-45B0-906A-646D5E0204AD} | ||
EndGlobalSection | ||
EndGlobal |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using TecieDiscordRebuild; | ||
|
||
namespace TecieDiscordRebuild.Commands | ||
{ | ||
public static class BotSettings | ||
{ | ||
public class Settings | ||
{ | ||
// handle bot settings | ||
public Dictionary<string, int> warnList = new Dictionary<string, int>(); | ||
public float setVolume = 0.5f; | ||
public List<string> ignoreChannels = new List<string>(); | ||
public List<string> badWords = new List<string>(); | ||
public int warnLimit = 5; | ||
public ulong timeoutChanIndex = 0; | ||
public List<string> announceChannels = new List<string>(); | ||
public List<string> clearIgnore = new List<string>(); | ||
public Dictionary<int, string> eventPings = new Dictionary<int, string>(); | ||
} | ||
|
||
public static Settings settings = new Settings(); | ||
|
||
public static void Load() | ||
{ | ||
//load settings from file, if it exists | ||
try | ||
{ | ||
string path = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\TecieDiscord\\SETTINGS.json"; | ||
string json = File.ReadAllText(path); | ||
settings = JsonConvert.DeserializeObject<Settings>(json)!; | ||
} | ||
catch (Exception e) | ||
{ | ||
Console.WriteLine($"No settings set, or {e.Message}"); | ||
} | ||
} | ||
|
||
public static void Save() | ||
{ | ||
string json = JsonConvert.SerializeObject(settings, Formatting.Indented); | ||
string path = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\TecieDiscord\\SETTINGS.json"; | ||
File.WriteAllText(path, json); | ||
} | ||
} | ||
} |
Oops, something went wrong.