Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
TheUnifox committed Dec 27, 2023
0 parents commit 91beefb
Show file tree
Hide file tree
Showing 16 changed files with 2,400 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.vs/
**/bin/
**/obj/
ffmpeg.exe
25 changes: 25 additions & 0 deletions TecieDiscordRebuild.sln
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
326 changes: 326 additions & 0 deletions TecieDiscordRebuild/Commands/Admin.cs

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions TecieDiscordRebuild/Commands/BotSettings.cs
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);
}
}
}
Loading

0 comments on commit 91beefb

Please sign in to comment.