diff --git a/Kehyeedra3/AIMLbot.dll b/Kehyeedra3/AIMLbot.dll deleted file mode 100644 index ef06d82..0000000 Binary files a/Kehyeedra3/AIMLbot.dll and /dev/null differ diff --git a/Kehyeedra3/Bot.cs b/Kehyeedra3/Bot.cs index c05c22f..c3aceb6 100644 --- a/Kehyeedra3/Bot.cs +++ b/Kehyeedra3/Bot.cs @@ -4,7 +4,6 @@ using Discord; using Discord.Commands; using Discord.WebSocket; using System.IO; -using AIMLbot; using Microsoft.Extensions.DependencyInjection; using System.Timers; using System.Net; @@ -21,14 +20,12 @@ namespace Kehyeedra3 /// Star Vars public static bool IsReady { get; private set; } public static DiscordSocketClient _bot; - public static System.Timers.Timer Clockboy; + //public static System.Timers.Timer Clockboy; public static AudioService AudioService; public static CommandService _cmds; public static IServiceProvider _dmap; public static CommandServiceConfig _cmdsconfig; public static Random _rnd = new Random(); - public static AIMLbot.Bot ChatService; - public static AIMLbot.User ChatUser; public static string PathToUserData; public static WebClient WeebClient; public static ReminderService RmService; @@ -38,8 +35,6 @@ namespace Kehyeedra3 // Environment.CurrentDirectory + @"Audio\cough1.wav", // Environment.CurrentDirectory + @"Audio\cough2.wav", // Environment.CurrentDirectory + @"Audio\wilhelmcough.wav", - // Environment.CurrentDirectory + @"Audio\trapcough1.wav", - // Environment.CurrentDirectory + @"Audio\trapcough2.wav", // Environment.CurrentDirectory + @"Audio\h3h3cough1.wav", // Environment.CurrentDirectory + @"Audio\h3h3cough2.wav", // Environment.CurrentDirectory + @"Audio\h3h3cough3.wav", @@ -58,7 +53,7 @@ namespace Kehyeedra3 DotEnv.Config(filePath: Path.Combine(AppContext.BaseDirectory, ".env")); var Config = Configuration.Load(); - Clockboy = new System.Timers.Timer(); + //Clockboy = new System.Timers.Timer(); WeebClient = new WebClient(); @@ -89,7 +84,6 @@ namespace Kehyeedra3 await CommandHandler.InstallCommands(); EventHandlers.InstallEventHandlers(); - InstallChatService(); //Clockboy.Elapsed += Clockboy_Elapsed; //Clockboy.Interval = SRandom.Next(3600000, 14400000); @@ -146,7 +140,7 @@ namespace Kehyeedra3 _bot.Ready += _bot_Ready; await _bot.LoginAsync(TokenType.Bot, Configuration.Load().Token); await _bot.StartAsync(); - Clockboy.Start(); + //Clockboy.Start(); //new Thread(async x => //{ // await Bot.RmService.Tick(); @@ -188,28 +182,6 @@ namespace Kehyeedra3 Environment.Exit(0); } } - public static void InstallChatService() - { - try - { - string path = Path.Combine(Environment.CurrentDirectory, "config", - "Settings.xml"); - if (File.Exists(path)) - { - ChatService = new AIMLbot.Bot(); - ChatService.loadSettings(path); - ChatService.isAcceptingUserInput = false; - ChatService.loadAIMLFromFiles(); - ChatService.isAcceptingUserInput = true; - PathToUserData = Path.Combine(Environment.CurrentDirectory, "aimlusers"); - Console.WriteLine("Loaded: Chat Service"); - } - else { } - } - catch(Exception ex) - { - Console.WriteLine (ex); - } - } + } } \ No newline at end of file diff --git a/Kehyeedra3/Command handler.cs b/Kehyeedra3/Command handler.cs index 3fe2d97..efcf9a5 100644 --- a/Kehyeedra3/Command handler.cs +++ b/Kehyeedra3/Command handler.cs @@ -6,7 +6,6 @@ using System.Threading.Tasks; using Discord.WebSocket; using Discord.Commands; using System.Reflection; -using AIMLbot; using System.IO; using System.Data; using Discord; @@ -16,59 +15,6 @@ namespace Kehyeedra3 //Set CommandHandler as partial class of Bot class CommandHandler : Bot { - public static async Task KizunaAi(ICommandContext Context, String Message) - { - try - { - if (Message.Contains($"{Context.Client.CurrentUser.Id}")) - { - var messagearr = Message.Split(' '); - Message = String.Join(" ", messagearr.Skip(1).ToArray()); - } - if (Message.ToLowerInvariant().Contains("what is ")) - { - string fiNum = Message.Substring(8); - string result = new DataTable().Compute(fiNum, null).ToString(); - await Context.Channel.SendMessageAsync($"{Context.User.Mention}, {fiNum} = {result}"); - } - else - { - bool triggeredphrase = false; - KeyValuePair trigger = new KeyValuePair("", ""); - foreach (var phrase in Configuration.Load().TriggerPhrases) - { - if (Message.ToLowerInvariant().Contains(phrase.Key)) - { - triggeredphrase = true; - trigger = phrase; - break; - } - } - if (!triggeredphrase) - { - ChatUser = new AIMLbot.User(Convert.ToString(Context.User.Id + ".dat"), ChatService); - if (!File.Exists(PathToUserData + "\\" + Context.User.Id + ".dat")) - ChatUser.Predicates.DictionaryAsXML.Save(PathToUserData + "\\" + Context.User.Id + ".dat"); - ChatUser = new AIMLbot.User(Convert.ToString(Context.User.Id), ChatService); - ChatUser.Predicates.loadSettings(PathToUserData + "\\" + Context.User.Id + ".dat"); - var r = new AIMLbot.Request(Message, ChatUser, ChatService); - var userresp = ChatService.Chat(r); - var response = userresp.Output; - ChatUser.Predicates.DictionaryAsXML.Save(PathToUserData + "\\" + Context.User.Id + ".dat"); - await Context.Channel.SendMessageAsync($"{Context.User.Mention}, {response}"); - } - else - { - await Context.Channel.SendMessageAsync($"{Context.User.Mention}, {trigger.Value}"); - } - } - } - catch(Exception ex) - { - Console.WriteLine(ex); - } - - } public static async Task InstallCommands() { //adds HandleCommand to handle the commands from message received @@ -108,10 +54,6 @@ namespace Kehyeedra3 int argPos = 0; - if (message.HasMentionPrefix(_bot.CurrentUser, ref argPos)) - { - await KizunaAi(Context, message.Content); - } if (message.Content.Contains("\uD83C\uDD71")) //B emoji detector { await Context.Channel.SendMessageAsync($"B emoji detected. Proceed to kill yourself, {Context.User.Mention}"); diff --git a/Kehyeedra3/Commands/Economy.cs b/Kehyeedra3/Commands/Economy.cs index 9ff40e3..550daac 100644 --- a/Kehyeedra3/Commands/Economy.cs +++ b/Kehyeedra3/Commands/Economy.cs @@ -742,7 +742,7 @@ namespace Kehyeedra3.Commands outputStream.Position = 0; - await Context.Channel.SendFileAsync(outputStream, $"fish.{outFormat}"); + await Context.Channel.SendFileAsync(outputStream, $"fish.{outFormat}", $"{Context.User.Mention}"); } else @@ -1006,6 +1006,7 @@ namespace Kehyeedra3.Commands } if (inv.Any()) { + Dictionary small = new Dictionary(); Dictionary med = new Dictionary(); Dictionary large = new Dictionary(); @@ -1062,6 +1063,12 @@ namespace Kehyeedra3.Commands foreach (var entry in inv) { + if (!fishes.Any(x => x.Id == entry.Key)) + { + inv.Remove(entry.Key); + continue; + } + fishmote = fishes.FirstOrDefault(x => x.Id == entry.Key).Emote; if (!fishmote.Contains("><")) @@ -1546,9 +1553,14 @@ namespace Kehyeedra3.Commands { inv = feeshUser.GetInventory(); } - + List fishes = Fishing.GetFishList(); foreach (var entry in inv) { + if (!fishes.Any(x => x.Id == entry.Key)) + { + inv.Remove(entry.Key); + continue; + } if (entry.Value.Count() > 0) { if (entry.Value[0] > 0) diff --git a/Kehyeedra3/Commands/Help.cs b/Kehyeedra3/Commands/Help.cs index eeceb3a..64c5b5d 100644 --- a/Kehyeedra3/Commands/Help.cs +++ b/Kehyeedra3/Commands/Help.cs @@ -39,7 +39,7 @@ namespace Kehyeedra3.Commands } embed.AddField(module.Name, coommands.ToString()); } - await ReplyAsync("Here's a list of commands search for the command to find what it be and what it do", false, embed.Build()); + await ReplyAsync("Here's a list of commands, search for a command to find what it be and what it do", false, embed.Build()); } else { diff --git a/Kehyeedra3/Commands/Interactive.cs b/Kehyeedra3/Commands/Interactive.cs index c172764..1c98687 100644 --- a/Kehyeedra3/Commands/Interactive.cs +++ b/Kehyeedra3/Commands/Interactive.cs @@ -882,7 +882,7 @@ namespace Kehyeedra3.Commands } } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - else if (input == "bulksell") + else if (input == "bulksell" || input == "bs") { int value = 0; int count = 0; diff --git a/Kehyeedra3/Commands/Stuff.cs b/Kehyeedra3/Commands/Stuff.cs index 4833ac5..e90175f 100644 --- a/Kehyeedra3/Commands/Stuff.cs +++ b/Kehyeedra3/Commands/Stuff.cs @@ -141,7 +141,8 @@ namespace Kehyeedra3.Commands "I think so", "Mayhaps", "Yeah but you're still gay", - "No kys" + "No kys", + "Not today", }; int randomIndex = rando.Next(predictions.Length); string text = predictions[randomIndex]; diff --git a/Kehyeedra3/Kehyeedra3.csproj b/Kehyeedra3/Kehyeedra3.csproj index 9a68c46..08a6e2e 100644 --- a/Kehyeedra3/Kehyeedra3.csproj +++ b/Kehyeedra3/Kehyeedra3.csproj @@ -19,12 +19,6 @@ - - - AIMLbot.dll - - - Always diff --git a/Kehyeedra3/RatelimitAttribute.cs b/Kehyeedra3/RatelimitAttribute.cs index dcca716..c3ad353 100644 --- a/Kehyeedra3/RatelimitAttribute.cs +++ b/Kehyeedra3/RatelimitAttribute.cs @@ -97,7 +97,7 @@ namespace Kehyeedra3 } else { - return Task.FromResult(PreconditionResult.FromError("BRRROOOooooO WGHAT THE TFUCUKL YOU ARE SttuPPIIIIDDDD jas fapped in public pa po pe")); + return Task.FromResult(PreconditionResult.FromError("Ok retard calm down")); } }