diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8c7f0e8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,133 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +[Bb]in/ +[Oo]bj/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.svclog +*.scc + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml +*.pubxml +*.azurePubxml + +# NuGet Packages Directory +## TODO: If you have NuGet Package Restore enabled, uncomment the next line +packages/ +## TODO: If the tool you use requires repositories.config, also uncomment the next line +!packages/repositories.config + +# Windows Azure Build Output +csx/ +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +![Ss]tyle[Cc]op.targets +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml + +*.publishsettings + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + +# ========================= +# Windows detritus +# ========================= + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac desktop service store files +.DS_Store + +_NCrunch* diff --git a/.idea/.idea.Robert/.idea/riderPublish.xml b/.idea/.idea.Robert/.idea/riderPublish.xml new file mode 100644 index 0000000..943ae86 --- /dev/null +++ b/.idea/.idea.Robert/.idea/riderPublish.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/.idea/.idea.Robert/.idea/vcs.xml b/.idea/.idea.Robert/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/.idea.Robert/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Bot/Bot.csproj b/Bot/Bot.csproj index f2783dc..0ab5be3 100644 --- a/Bot/Bot.csproj +++ b/Bot/Bot.csproj @@ -20,4 +20,8 @@ + + + + diff --git a/Bot/Program.cs b/Bot/Program.cs index b724bc7..0880416 100644 --- a/Bot/Program.cs +++ b/Bot/Program.cs @@ -1,5 +1,6 @@ using Bot.modules; using DSharpPlus; +using DSharpPlus.Entities; using DSharpPlus.EventArgs; using IniParser; @@ -38,15 +39,27 @@ namespace Bot var politico = new Politico(politicoChannelList, openAiKey); messageHandlers.Add(politico.MessageCreatedHandler); } - + // Bot client setup var builder = DiscordClientBuilder.CreateDefault(botToken, DiscordIntents.AllUnprivileged | DiscordIntents.MessageContents); - builder.ConfigureEventHandlers(b => - { - foreach (var h in messageHandlers) {b.HandleMessageCreated(h);} - }); + builder.ConfigureEventHandlers(b => + { + foreach (var h in messageHandlers) {b.HandleMessageCreated(h);} + }); - await builder.ConnectAsync(); + DiscordActivity status = new("You.", DiscordActivityType.Watching); + var client = builder.Build(); + + // RobertMart Setup + + if (config["RobertMart"]["active"] == "true") + { + var robertMartChannelList = config["RobertMart"]["channels"].Split(",").ToList(); + var robertMart = new RobertMartClient(client, robertMartChannelList.Select(ulong.Parse).ToList(), openAiKey); + robertMart.SendScheduledMessage(); + } + + await client.ConnectAsync(); await Task.Delay(-1); } } diff --git a/Bot/bin/Debug/net9.0/Bot.deps.json b/Bot/bin/Debug/net9.0/Bot.deps.json index a10d3ea..86b939f 100644 --- a/Bot/bin/Debug/net9.0/Bot.deps.json +++ b/Bot/bin/Debug/net9.0/Bot.deps.json @@ -10,6 +10,7 @@ "dependencies": { "DSharpPlus": "5.0.0-nightly-02450", "OpenAI": "2.1.0", + "RobertMart": "1.0.0", "ini-parser": "2.5.2" }, "runtime": { @@ -42,6 +43,14 @@ } } }, + "HtmlAgilityPack/1.11.72": { + "runtime": { + "lib/netstandard2.0/HtmlAgilityPack.dll": { + "assemblyVersion": "1.11.72.0", + "fileVersion": "1.11.72.0" + } + } + }, "ini-parser/2.5.2": { "runtime": { "lib/net20/INIFileParser.dll": { @@ -222,6 +231,17 @@ "fileVersion": "1.3.4.0" } } + }, + "RobertMart/1.0.0": { + "dependencies": { + "HtmlAgilityPack": "1.11.72" + }, + "runtime": { + "RobertMart.dll": { + "assemblyVersion": "1.0.0", + "fileVersion": "1.0.0.0" + } + } } } }, @@ -245,6 +265,13 @@ "path": "dsharpplus/5.0.0-nightly-02450", "hashPath": "dsharpplus.5.0.0-nightly-02450.nupkg.sha512" }, + "HtmlAgilityPack/1.11.72": { + "type": "package", + "serviceable": true, + "sha512": "sha512-RNLgXxTFdIGFI+o5l8c2aJ2L5StIRn9Uv8HKR76p7QP4ZUL26wzpWUCWh08xWUdkL2kocl+Xhv6VUu0rA1npVg==", + "path": "htmlagilitypack/1.11.72", + "hashPath": "htmlagilitypack.1.11.72.nupkg.sha512" + }, "ini-parser/2.5.2": { "type": "package", "serviceable": true, @@ -384,6 +411,11 @@ "sha512": "sha512-6IaGquwjjfW+BoHSV844y12Uy2kxbboYNmsibxr2lotcSPAA3LKy1CKcAQ8JOdAdL4xMoDNXA1oxG41w7fbr6Q==", "path": "ulid/1.3.4", "hashPath": "ulid.1.3.4.nupkg.sha512" + }, + "RobertMart/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" } } } \ No newline at end of file diff --git a/Bot/bin/Debug/net9.0/Bot.dll b/Bot/bin/Debug/net9.0/Bot.dll index a08a335..49223df 100644 Binary files a/Bot/bin/Debug/net9.0/Bot.dll and b/Bot/bin/Debug/net9.0/Bot.dll differ diff --git a/Bot/bin/Debug/net9.0/Bot.exe b/Bot/bin/Debug/net9.0/Bot.exe index bbfce6a..80800ce 100644 Binary files a/Bot/bin/Debug/net9.0/Bot.exe and b/Bot/bin/Debug/net9.0/Bot.exe differ diff --git a/Bot/bin/Debug/net9.0/Bot.pdb b/Bot/bin/Debug/net9.0/Bot.pdb index 5f901e7..35259f3 100644 Binary files a/Bot/bin/Debug/net9.0/Bot.pdb and b/Bot/bin/Debug/net9.0/Bot.pdb differ diff --git a/Bot/bin/Debug/net9.0/config.ini b/Bot/bin/Debug/net9.0/config.ini index 662ebd7..a44da69 100644 --- a/Bot/bin/Debug/net9.0/config.ini +++ b/Bot/bin/Debug/net9.0/config.ini @@ -5,3 +5,7 @@ channels=trash-compactor [Politico] active=false channels=make-the-cantina-great-again,politics + +[RobertMart] +active=false +channels=437393972990836738 \ No newline at end of file diff --git a/Bot/config.ini b/Bot/config.ini index 662ebd7..7db6cc6 100644 --- a/Bot/config.ini +++ b/Bot/config.ini @@ -5,3 +5,7 @@ channels=trash-compactor [Politico] active=false channels=make-the-cantina-great-again,politics + +[RobertMart] +active=true +channels=437393972990836738 \ No newline at end of file diff --git a/Bot/modules/RobertMartClient.cs b/Bot/modules/RobertMartClient.cs new file mode 100644 index 0000000..2297ffc --- /dev/null +++ b/Bot/modules/RobertMartClient.cs @@ -0,0 +1,74 @@ +using DSharpPlus; +using DSharpPlus.Entities; +using OpenAI.Chat; + +namespace Bot.modules; + +public class RobertMartClient +{ + private readonly HashSet _channels = []; + private readonly ChatClient? _chatClient; + private readonly DiscordClient _discordClient; + + public RobertMartClient(DiscordClient discord, IEnumerable channels, string? openAiKey = null, string model = "gpt-4o") + { + _discordClient = discord; + foreach (var channel in channels) + { + _channels.Add(channel); + } + + if (openAiKey != null) + { + _chatClient = new ChatClient(model, openAiKey); + } + } + + public async Task SendScheduledMessage() + { + while (true) + { + try + { + if (_chatClient == null) return; + var yesterdayEggPrice = RobertMart.CommodityTracker.Commodities["Eggs"]; + var yesterdayGasPrice = RobertMart.CommodityTracker.Commodities["Gas"]; + + RobertMart.CommodityTracker.FetchCommodities(); + var todayEggPrice = RobertMart.CommodityTracker.Commodities["Eggs"]; + var todayGasPrice = RobertMart.CommodityTracker.Commodities["Gas"]; + + var messages = new List() + { + new SystemChatMessage( + "This is a private assistant, for use among consenting adults that find crude and dark humor, even if in bad taste, hilarious and desirable. " + + "The assitant will take on the persona of Robocop, and answer as him. Answers should be plausibly something Robocop would say in his movies. " + + "It is not mandatory that you refer to yourself, but if you do, respond as if your name was Robert. " + + "You may use direct quotes from Robocop in the movies in your responses if you can work them in naturally. " + + "Do not include quotation marks in your response. Your response should focus on punishment of the corrupt corporations driving up the prices. " + + "You will be given a list of the price of commodities from yesterday and today, you are expected to give what you think robocop's opinion would be on the difference "), + new UserChatMessage( + $"The price of eggs yesterday was {yesterdayEggPrice}. The price of eggs today is {todayEggPrice}. " + + $"The price of gas yesterday was {yesterdayGasPrice}. The price of gas today is {todayGasPrice}. What are your thoughts on this?"), + }; + var resp = await _chatClient.CompleteChatAsync(messages); + var respText = resp.Value.Content.Last().Text; + + foreach (var channelId in _channels) + { + var c = await _discordClient.GetChannelAsync(channelId); + await c.SendMessageAsync($"Gas Price Today/Yesterday: ${todayGasPrice}/${yesterdayGasPrice}\n" + + $"Egg Price Today/Yesterday: ${todayEggPrice}/${yesterdayEggPrice}\n" + + $"{respText}"); + } + } + catch (Exception ex) + { + Console.WriteLine($"Error sending message: {ex.Message}"); + } + + // Wait for 24 hours + await Task.Delay(TimeSpan.FromHours(24)); + } + } +} \ No newline at end of file diff --git a/Bot/modules/TextFreeChannels.cs b/Bot/modules/TextFreeChannels.cs index 81e3fd2..373c5da 100644 --- a/Bot/modules/TextFreeChannels.cs +++ b/Bot/modules/TextFreeChannels.cs @@ -1,3 +1,4 @@ +using System.Text.RegularExpressions; using DSharpPlus; using DSharpPlus.EventArgs; using OpenAI.Chat; @@ -27,10 +28,16 @@ public class TextFreeChannels public async Task MessageCreatedHandler(DiscordClient c, MessageCreatedEventArgs e) { if (e.Author.IsCurrent || !_channels.Contains(e.Channel.Name)) return; - if (e.Message.Embeds.Count == 0 && e.Message.Attachments.Count > 0) + if ((e.Message.Embeds.Count > 0 || e.Message.Attachments.Count > 0) && e.Message.Content == "") { return; } + + if (MessageOnlyContainsURL(e.Message.Content)) + { + return; + } + await e.Message.DeleteAsync(); if (_chatClient != null) @@ -57,4 +64,11 @@ public class TextFreeChannels } } + + private bool MessageOnlyContainsURL(string input) + { + // Regular expression to match only an image URL + string pattern = @"^(https?:\/\/.*\.(?:png|jpg|jpeg|gif|bmp|webp)|https?:\/\/(media\.)?tenor\.com\/\S+)$"; + return Regex.IsMatch(input, pattern, RegexOptions.IgnoreCase); + } } diff --git a/Bot/obj/Bot.csproj.nuget.dgspec.json b/Bot/obj/Bot.csproj.nuget.dgspec.json index c04f4e7..3d4a6a2 100644 --- a/Bot/obj/Bot.csproj.nuget.dgspec.json +++ b/Bot/obj/Bot.csproj.nuget.dgspec.json @@ -22,6 +22,108 @@ "sources": { "https://api.nuget.org/v3/index.json": {} }, + "frameworks": { + "net9.0": { + "targetAlias": "net9.0", + "projectReferences": { + "C:\\Users\\jerem\\RiderProjects\\Robert\\RobertMart\\RobertMart.csproj": { + "projectPath": "C:\\Users\\jerem\\RiderProjects\\Robert\\RobertMart\\RobertMart.csproj" + } + } + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "all" + }, + "SdkAnalysisLevel": "9.0.100" + }, + "frameworks": { + "net9.0": { + "targetAlias": "net9.0", + "dependencies": { + "DSharpPlus": { + "target": "Package", + "version": "[5.0.0-nightly-02450, )" + }, + "Microsoft.NET.ILLink.Tasks": { + "suppressParent": "All", + "target": "Package", + "version": "[9.0.0, )", + "autoReferenced": true + }, + "OpenAI": { + "target": "Package", + "version": "[2.1.0, )" + }, + "ini-parser": { + "target": "Package", + "version": "[2.5.2, )" + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "downloadDependencies": [ + { + "name": "Microsoft.AspNetCore.App.Runtime.linux-x64", + "version": "[9.0.0, 9.0.0]" + }, + { + "name": "Microsoft.NETCore.App.Host.linux-x64", + "version": "[9.0.0, 9.0.0]" + }, + { + "name": "Microsoft.NETCore.App.Runtime.linux-x64", + "version": "[9.0.0, 9.0.0]" + } + ], + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Users\\jerem\\.dotnet\\sdk\\9.0.100/PortableRuntimeIdentifierGraph.json" + } + }, + "runtimes": { + "linux-x64": { + "#import": [] + } + } + }, + "C:\\Users\\jerem\\RiderProjects\\Robert\\RobertMart\\RobertMart.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "C:\\Users\\jerem\\RiderProjects\\Robert\\RobertMart\\RobertMart.csproj", + "projectName": "RobertMart", + "projectPath": "C:\\Users\\jerem\\RiderProjects\\Robert\\RobertMart\\RobertMart.csproj", + "packagesPath": "C:\\Users\\jerem\\.nuget\\packages\\", + "outputPath": "C:\\Users\\jerem\\RiderProjects\\Robert\\RobertMart\\obj\\", + "projectStyle": "PackageReference", + "configFilePaths": [ + "C:\\Users\\jerem\\AppData\\Roaming\\NuGet\\NuGet.Config" + ], + "originalTargetFrameworks": [ + "net9.0" + ], + "sources": { + "https://api.nuget.org/v3/index.json": {} + }, "frameworks": { "net9.0": { "targetAlias": "net9.0", @@ -44,17 +146,15 @@ "net9.0": { "targetAlias": "net9.0", "dependencies": { - "DSharpPlus": { + "HtmlAgilityPack": { "target": "Package", - "version": "[5.0.0-nightly-02450, )" + "version": "[1.11.72, )" }, - "OpenAI": { + "Microsoft.NET.ILLink.Tasks": { + "suppressParent": "All", "target": "Package", - "version": "[2.1.0, )" - }, - "ini-parser": { - "target": "Package", - "version": "[2.5.2, )" + "version": "[9.0.0, )", + "autoReferenced": true } }, "imports": [ @@ -68,6 +168,16 @@ ], "assetTargetFallback": true, "warn": true, + "downloadDependencies": [ + { + "name": "Microsoft.AspNetCore.App.Runtime.linux-x64", + "version": "[9.0.0, 9.0.0]" + }, + { + "name": "Microsoft.NETCore.App.Runtime.linux-x64", + "version": "[9.0.0, 9.0.0]" + } + ], "frameworkReferences": { "Microsoft.NETCore.App": { "privateAssets": "all" @@ -75,6 +185,11 @@ }, "runtimeIdentifierGraphPath": "C:\\Users\\jerem\\.dotnet\\sdk\\9.0.100/PortableRuntimeIdentifierGraph.json" } + }, + "runtimes": { + "linux-x64": { + "#import": [] + } } } } diff --git a/Bot/obj/Bot.csproj.nuget.g.props b/Bot/obj/Bot.csproj.nuget.g.props index b9b9f43..14479a7 100644 --- a/Bot/obj/Bot.csproj.nuget.g.props +++ b/Bot/obj/Bot.csproj.nuget.g.props @@ -12,4 +12,10 @@ + + + + + C:\Users\jerem\.nuget\packages\microsoft.net.illink.tasks\9.0.0 + \ No newline at end of file diff --git a/Bot/obj/Debug/net9.0/Bot.AssemblyInfo.cs b/Bot/obj/Debug/net9.0/Bot.AssemblyInfo.cs index b958890..ba8c747 100644 --- a/Bot/obj/Debug/net9.0/Bot.AssemblyInfo.cs +++ b/Bot/obj/Debug/net9.0/Bot.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("Bot")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+2ef1b077b44fbb933d26f4071c1c05ee384bc114")] [assembly: System.Reflection.AssemblyProductAttribute("Bot")] [assembly: System.Reflection.AssemblyTitleAttribute("Bot")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/Bot/obj/Debug/net9.0/Bot.AssemblyInfoInputs.cache b/Bot/obj/Debug/net9.0/Bot.AssemblyInfoInputs.cache index 30a782e..3b13422 100644 --- a/Bot/obj/Debug/net9.0/Bot.AssemblyInfoInputs.cache +++ b/Bot/obj/Debug/net9.0/Bot.AssemblyInfoInputs.cache @@ -1 +1 @@ -98dca81d57bca6811d958e20fdedd41c52c2d1e7e01d7bc1f139fcf6d943c82e +a580ba8fcb7d8656f75baf85e8b3928ca384a15ccb48cd8a9895acdcf7c48dec diff --git a/Bot/obj/Debug/net9.0/Bot.GeneratedMSBuildEditorConfig.editorconfig b/Bot/obj/Debug/net9.0/Bot.GeneratedMSBuildEditorConfig.editorconfig index 190c150..a64538f 100644 --- a/Bot/obj/Debug/net9.0/Bot.GeneratedMSBuildEditorConfig.editorconfig +++ b/Bot/obj/Debug/net9.0/Bot.GeneratedMSBuildEditorConfig.editorconfig @@ -1,4 +1,8 @@ is_global = true +build_property.EnableAotAnalyzer = +build_property.EnableSingleFileAnalyzer = +build_property.EnableTrimAnalyzer = +build_property.IncludeAllContentForSelfExtract = build_property.TargetFramework = net9.0 build_property.TargetPlatformMinVersion = build_property.UsingMicrosoftNETSdkWeb = diff --git a/Bot/obj/Debug/net9.0/Bot.assets.cache b/Bot/obj/Debug/net9.0/Bot.assets.cache index 042d483..aca6c33 100644 Binary files a/Bot/obj/Debug/net9.0/Bot.assets.cache and b/Bot/obj/Debug/net9.0/Bot.assets.cache differ diff --git a/Bot/obj/Debug/net9.0/Bot.csproj.AssemblyReference.cache b/Bot/obj/Debug/net9.0/Bot.csproj.AssemblyReference.cache index 2ef796e..5eaee15 100644 Binary files a/Bot/obj/Debug/net9.0/Bot.csproj.AssemblyReference.cache and b/Bot/obj/Debug/net9.0/Bot.csproj.AssemblyReference.cache differ diff --git a/Bot/obj/Debug/net9.0/Bot.csproj.CoreCompileInputs.cache b/Bot/obj/Debug/net9.0/Bot.csproj.CoreCompileInputs.cache index 34fa11d..f57e32c 100644 --- a/Bot/obj/Debug/net9.0/Bot.csproj.CoreCompileInputs.cache +++ b/Bot/obj/Debug/net9.0/Bot.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -c9dbf835067ef6048df7f78ca9d2a34a4314f49ea6108350674fb83e5f991d3b +92b273f1ec765e67e7747d6fdd8b4d10439f8cab94488b163f0133f4eeff88df diff --git a/Bot/obj/Debug/net9.0/Bot.csproj.FileListAbsolute.txt b/Bot/obj/Debug/net9.0/Bot.csproj.FileListAbsolute.txt index 5fa3afa..7433bda 100644 --- a/Bot/obj/Debug/net9.0/Bot.csproj.FileListAbsolute.txt +++ b/Bot/obj/Debug/net9.0/Bot.csproj.FileListAbsolute.txt @@ -33,3 +33,6 @@ C:\Users\jerem\RiderProjects\Robert\Bot\bin\Debug\net9.0\INIFileParser.dll C:\Users\jerem\RiderProjects\Robert\Bot\bin\Debug\net9.0\OpenAI.dll C:\Users\jerem\RiderProjects\Robert\Bot\bin\Debug\net9.0\System.ClientModel.dll C:\Users\jerem\RiderProjects\Robert\Bot\bin\Debug\net9.0\System.Memory.Data.dll +C:\Users\jerem\RiderProjects\Robert\Bot\bin\Debug\net9.0\HtmlAgilityPack.dll +C:\Users\jerem\RiderProjects\Robert\Bot\bin\Debug\net9.0\RobertMart.dll +C:\Users\jerem\RiderProjects\Robert\Bot\bin\Debug\net9.0\RobertMart.pdb diff --git a/Bot/obj/Debug/net9.0/Bot.dll b/Bot/obj/Debug/net9.0/Bot.dll index a08a335..49223df 100644 Binary files a/Bot/obj/Debug/net9.0/Bot.dll and b/Bot/obj/Debug/net9.0/Bot.dll differ diff --git a/Bot/obj/Debug/net9.0/Bot.pdb b/Bot/obj/Debug/net9.0/Bot.pdb index 5f901e7..35259f3 100644 Binary files a/Bot/obj/Debug/net9.0/Bot.pdb and b/Bot/obj/Debug/net9.0/Bot.pdb differ diff --git a/Bot/obj/Debug/net9.0/apphost.exe b/Bot/obj/Debug/net9.0/apphost.exe index bbfce6a..80800ce 100644 Binary files a/Bot/obj/Debug/net9.0/apphost.exe and b/Bot/obj/Debug/net9.0/apphost.exe differ diff --git a/Bot/obj/Debug/net9.0/ref/Bot.dll b/Bot/obj/Debug/net9.0/ref/Bot.dll index 00f42e3..9a91eb6 100644 Binary files a/Bot/obj/Debug/net9.0/ref/Bot.dll and b/Bot/obj/Debug/net9.0/ref/Bot.dll differ diff --git a/Bot/obj/Debug/net9.0/refint/Bot.dll b/Bot/obj/Debug/net9.0/refint/Bot.dll index 00f42e3..9a91eb6 100644 Binary files a/Bot/obj/Debug/net9.0/refint/Bot.dll and b/Bot/obj/Debug/net9.0/refint/Bot.dll differ diff --git a/Bot/obj/project.assets.json b/Bot/obj/project.assets.json index 903cfe0..47ddc05 100644 --- a/Bot/obj/project.assets.json +++ b/Bot/obj/project.assets.json @@ -38,6 +38,19 @@ } } }, + "HtmlAgilityPack/1.11.72": { + "type": "package", + "compile": { + "lib/netstandard2.0/HtmlAgilityPack.dll": { + "related": ".deps.json;.pdb;.xml" + } + }, + "runtime": { + "lib/netstandard2.0/HtmlAgilityPack.dll": { + "related": ".deps.json;.pdb;.xml" + } + } + }, "ini-parser/2.5.2": { "type": "package", "compile": { @@ -204,6 +217,12 @@ "buildTransitive/net8.0/_._": {} } }, + "Microsoft.NET.ILLink.Tasks/9.0.0": { + "type": "package", + "build": { + "build/Microsoft.NET.ILLink.Tasks.props": {} + } + }, "NetEscapades.EnumGenerators/1.0.0-beta11": { "type": "package", "compile": { @@ -391,6 +410,437 @@ "related": ".xml" } } + }, + "RobertMart/1.0.0": { + "type": "project", + "framework": ".NETCoreApp,Version=v9.0", + "dependencies": { + "HtmlAgilityPack": "1.11.72" + }, + "compile": { + "bin/placeholder/RobertMart.dll": {} + }, + "runtime": { + "bin/placeholder/RobertMart.dll": {} + } + } + }, + "net9.0/linux-x64": { + "CommunityToolkit.HighPerformance/8.3.2": { + "type": "package", + "compile": { + "lib/net8.0/CommunityToolkit.HighPerformance.dll": { + "related": ".pdb;.xml" + } + }, + "runtime": { + "lib/net8.0/CommunityToolkit.HighPerformance.dll": { + "related": ".pdb;.xml" + } + } + }, + "DSharpPlus/5.0.0-nightly-02450": { + "type": "package", + "dependencies": { + "CommunityToolkit.HighPerformance": "8.3.2", + "Microsoft.Extensions.Caching.Memory": "9.0.0", + "Microsoft.Extensions.Logging": "9.0.0", + "Microsoft.Extensions.Logging.Abstractions": "9.0.0", + "NetEscapades.EnumGenerators": "1.0.0-beta11", + "Newtonsoft.Json": "13.0.3", + "Polly.Core": "8.5.0", + "Ulid": "1.3.4" + }, + "compile": { + "lib/net9.0/DSharpPlus.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net9.0/DSharpPlus.dll": { + "related": ".xml" + } + } + }, + "HtmlAgilityPack/1.11.72": { + "type": "package", + "compile": { + "lib/netstandard2.0/HtmlAgilityPack.dll": { + "related": ".deps.json;.pdb;.xml" + } + }, + "runtime": { + "lib/netstandard2.0/HtmlAgilityPack.dll": { + "related": ".deps.json;.pdb;.xml" + } + } + }, + "ini-parser/2.5.2": { + "type": "package", + "compile": { + "lib/net20/INIFileParser.dll": { + "related": ".dll.mdb;.xml" + } + }, + "runtime": { + "lib/net20/INIFileParser.dll": { + "related": ".dll.mdb;.xml" + } + } + }, + "Microsoft.Extensions.Caching.Abstractions/9.0.0": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.Primitives": "9.0.0" + }, + "compile": { + "lib/net9.0/Microsoft.Extensions.Caching.Abstractions.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net9.0/Microsoft.Extensions.Caching.Abstractions.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/net8.0/_._": {} + } + }, + "Microsoft.Extensions.Caching.Memory/9.0.0": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.Caching.Abstractions": "9.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.0", + "Microsoft.Extensions.Logging.Abstractions": "9.0.0", + "Microsoft.Extensions.Options": "9.0.0", + "Microsoft.Extensions.Primitives": "9.0.0" + }, + "compile": { + "lib/net9.0/Microsoft.Extensions.Caching.Memory.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net9.0/Microsoft.Extensions.Caching.Memory.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/net8.0/_._": {} + } + }, + "Microsoft.Extensions.DependencyInjection/9.0.0": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.0" + }, + "compile": { + "lib/net9.0/Microsoft.Extensions.DependencyInjection.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net9.0/Microsoft.Extensions.DependencyInjection.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/net8.0/_._": {} + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions/9.0.0": { + "type": "package", + "compile": { + "lib/net9.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net9.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/net8.0/_._": {} + } + }, + "Microsoft.Extensions.Logging/9.0.0": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.DependencyInjection": "9.0.0", + "Microsoft.Extensions.Logging.Abstractions": "9.0.0", + "Microsoft.Extensions.Options": "9.0.0" + }, + "compile": { + "lib/net9.0/Microsoft.Extensions.Logging.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net9.0/Microsoft.Extensions.Logging.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/net8.0/_._": {} + } + }, + "Microsoft.Extensions.Logging.Abstractions/9.0.0": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.0" + }, + "compile": { + "lib/net9.0/Microsoft.Extensions.Logging.Abstractions.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net9.0/Microsoft.Extensions.Logging.Abstractions.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/net8.0/Microsoft.Extensions.Logging.Abstractions.targets": {} + } + }, + "Microsoft.Extensions.Options/9.0.0": { + "type": "package", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.0", + "Microsoft.Extensions.Primitives": "9.0.0" + }, + "compile": { + "lib/net9.0/Microsoft.Extensions.Options.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net9.0/Microsoft.Extensions.Options.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/net8.0/Microsoft.Extensions.Options.targets": {} + } + }, + "Microsoft.Extensions.Primitives/9.0.0": { + "type": "package", + "compile": { + "lib/net9.0/Microsoft.Extensions.Primitives.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net9.0/Microsoft.Extensions.Primitives.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/net8.0/_._": {} + } + }, + "Microsoft.NET.ILLink.Tasks/9.0.0": { + "type": "package", + "build": { + "build/Microsoft.NET.ILLink.Tasks.props": {} + } + }, + "NetEscapades.EnumGenerators/1.0.0-beta11": { + "type": "package", + "compile": { + "lib/netstandard2.0/NetEscapades.EnumGenerators.Attributes.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.0/NetEscapades.EnumGenerators.Attributes.dll": { + "related": ".xml" + } + }, + "build": { + "build/_._": {} + } + }, + "Newtonsoft.Json/13.0.3": { + "type": "package", + "compile": { + "lib/net6.0/Newtonsoft.Json.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/Newtonsoft.Json.dll": { + "related": ".xml" + } + } + }, + "OpenAI/2.1.0": { + "type": "package", + "dependencies": { + "System.ClientModel": "1.2.1", + "System.Diagnostics.DiagnosticSource": "6.0.1" + }, + "compile": { + "lib/net6.0/OpenAI.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/OpenAI.dll": { + "related": ".xml" + } + } + }, + "Polly.Core/8.5.0": { + "type": "package", + "compile": { + "lib/net8.0/Polly.Core.dll": { + "related": ".pdb;.xml" + } + }, + "runtime": { + "lib/net8.0/Polly.Core.dll": { + "related": ".pdb;.xml" + } + } + }, + "System.ClientModel/1.2.1": { + "type": "package", + "dependencies": { + "System.Memory.Data": "6.0.0", + "System.Text.Json": "6.0.10" + }, + "compile": { + "lib/net6.0/System.ClientModel.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/System.ClientModel.dll": { + "related": ".xml" + } + } + }, + "System.Diagnostics.DiagnosticSource/6.0.1": { + "type": "package", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + }, + "compile": { + "lib/net6.0/System.Diagnostics.DiagnosticSource.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/System.Diagnostics.DiagnosticSource.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/netcoreapp3.1/_._": {} + } + }, + "System.Memory.Data/6.0.0": { + "type": "package", + "dependencies": { + "System.Text.Json": "6.0.0" + }, + "compile": { + "lib/net6.0/System.Memory.Data.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/System.Memory.Data.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/netcoreapp3.1/_._": {} + } + }, + "System.Runtime.CompilerServices.Unsafe/6.0.0": { + "type": "package", + "compile": { + "lib/net6.0/System.Runtime.CompilerServices.Unsafe.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/System.Runtime.CompilerServices.Unsafe.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/netcoreapp3.1/_._": {} + } + }, + "System.Text.Encodings.Web/6.0.0": { + "type": "package", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + }, + "compile": { + "lib/net6.0/System.Text.Encodings.Web.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/System.Text.Encodings.Web.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/netcoreapp3.1/_._": {} + } + }, + "System.Text.Json/6.0.10": { + "type": "package", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0", + "System.Text.Encodings.Web": "6.0.0" + }, + "compile": { + "lib/net6.0/System.Text.Json.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net6.0/System.Text.Json.dll": { + "related": ".xml" + } + }, + "build": { + "buildTransitive/netcoreapp3.1/System.Text.Json.targets": {} + } + }, + "Ulid/1.3.4": { + "type": "package", + "compile": { + "lib/net8.0/Ulid.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net8.0/Ulid.dll": { + "related": ".xml" + } + } + }, + "RobertMart/1.0.0": { + "type": "project", + "framework": ".NETCoreApp,Version=v9.0", + "dependencies": { + "HtmlAgilityPack": "1.11.72" + }, + "compile": { + "bin/placeholder/RobertMart.dll": {} + }, + "runtime": { + "bin/placeholder/RobertMart.dll": {} + } } } }, @@ -440,6 +890,55 @@ "lib/net9.0/DSharpPlus.xml" ] }, + "HtmlAgilityPack/1.11.72": { + "sha512": "RNLgXxTFdIGFI+o5l8c2aJ2L5StIRn9Uv8HKR76p7QP4ZUL26wzpWUCWh08xWUdkL2kocl+Xhv6VUu0rA1npVg==", + "type": "package", + "path": "htmlagilitypack/1.11.72", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "htmlagilitypack.1.11.72.nupkg.sha512", + "htmlagilitypack.nuspec", + "lib/Net35/HtmlAgilityPack.dll", + "lib/Net35/HtmlAgilityPack.pdb", + "lib/Net35/HtmlAgilityPack.xml", + "lib/Net40-client/HtmlAgilityPack.dll", + "lib/Net40-client/HtmlAgilityPack.pdb", + "lib/Net40-client/HtmlAgilityPack.xml", + "lib/Net40/HtmlAgilityPack.XML", + "lib/Net40/HtmlAgilityPack.dll", + "lib/Net40/HtmlAgilityPack.pdb", + "lib/Net45/HtmlAgilityPack.XML", + "lib/Net45/HtmlAgilityPack.dll", + "lib/Net45/HtmlAgilityPack.pdb", + "lib/NetCore45/HtmlAgilityPack.XML", + "lib/NetCore45/HtmlAgilityPack.dll", + "lib/NetCore45/HtmlAgilityPack.pdb", + "lib/netstandard1.3/HtmlAgilityPack.deps.json", + "lib/netstandard1.3/HtmlAgilityPack.dll", + "lib/netstandard1.3/HtmlAgilityPack.pdb", + "lib/netstandard1.3/HtmlAgilityPack.xml", + "lib/netstandard1.6/HtmlAgilityPack.deps.json", + "lib/netstandard1.6/HtmlAgilityPack.dll", + "lib/netstandard1.6/HtmlAgilityPack.pdb", + "lib/netstandard1.6/HtmlAgilityPack.xml", + "lib/netstandard2.0/HtmlAgilityPack.deps.json", + "lib/netstandard2.0/HtmlAgilityPack.dll", + "lib/netstandard2.0/HtmlAgilityPack.pdb", + "lib/netstandard2.0/HtmlAgilityPack.xml", + "lib/portable-net45+netcore45+wp8+MonoAndroid+MonoTouch/HtmlAgilityPack.XML", + "lib/portable-net45+netcore45+wp8+MonoAndroid+MonoTouch/HtmlAgilityPack.dll", + "lib/portable-net45+netcore45+wp8+MonoAndroid+MonoTouch/HtmlAgilityPack.pdb", + "lib/portable-net45+netcore45+wpa81+wp8+MonoAndroid+MonoTouch/HtmlAgilityPack.XML", + "lib/portable-net45+netcore45+wpa81+wp8+MonoAndroid+MonoTouch/HtmlAgilityPack.dll", + "lib/portable-net45+netcore45+wpa81+wp8+MonoAndroid+MonoTouch/HtmlAgilityPack.pdb", + "lib/uap10.0/HtmlAgilityPack.XML", + "lib/uap10.0/HtmlAgilityPack.dll", + "lib/uap10.0/HtmlAgilityPack.pdb", + "lib/uap10.0/HtmlAgilityPack.pri", + "readme.md" + ] + }, "ini-parser/2.5.2": { "sha512": "hp3gKmC/14+6eKLgv7Jd1Z7OV86lO+tNfOXr/stQbwmRhdQuXVSvrRAuAe7G5+lwhkov0XkqZ8/bn1PYWMx6eg==", "type": "package", @@ -744,6 +1243,57 @@ "useSharedDesignerContext.txt" ] }, + "Microsoft.NET.ILLink.Tasks/9.0.0": { + "sha512": "zAwp213evC3UkimtVXRb+Dlgc/40QG145nmZDtp2LO9zJJMfrp+i/87BnXN7tRXEA4liyzdFkjqG1HE8/RPb4A==", + "type": "package", + "path": "microsoft.net.illink.tasks/9.0.0", + "hasTools": true, + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.TXT", + "Sdk/Sdk.props", + "THIRD-PARTY-NOTICES.TXT", + "analyzers/dotnet/cs/ILLink.CodeFixProvider.dll", + "analyzers/dotnet/cs/ILLink.RoslynAnalyzer.dll", + "build/Microsoft.NET.ILLink.Analyzers.props", + "build/Microsoft.NET.ILLink.Tasks.props", + "build/Microsoft.NET.ILLink.targets", + "microsoft.net.illink.tasks.9.0.0.nupkg.sha512", + "microsoft.net.illink.tasks.nuspec", + "tools/net472/ILLink.Tasks.dll", + "tools/net472/ILLink.Tasks.dll.config", + "tools/net472/Mono.Cecil.Mdb.dll", + "tools/net472/Mono.Cecil.Pdb.dll", + "tools/net472/Mono.Cecil.Rocks.dll", + "tools/net472/Mono.Cecil.dll", + "tools/net472/Sdk/Sdk.props", + "tools/net472/System.Buffers.dll", + "tools/net472/System.Collections.Immutable.dll", + "tools/net472/System.Memory.dll", + "tools/net472/System.Numerics.Vectors.dll", + "tools/net472/System.Reflection.Metadata.dll", + "tools/net472/System.Runtime.CompilerServices.Unsafe.dll", + "tools/net472/build/Microsoft.NET.ILLink.Analyzers.props", + "tools/net472/build/Microsoft.NET.ILLink.Tasks.props", + "tools/net472/build/Microsoft.NET.ILLink.targets", + "tools/net9.0/ILLink.Tasks.deps.json", + "tools/net9.0/ILLink.Tasks.dll", + "tools/net9.0/Mono.Cecil.Mdb.dll", + "tools/net9.0/Mono.Cecil.Pdb.dll", + "tools/net9.0/Mono.Cecil.Rocks.dll", + "tools/net9.0/Mono.Cecil.dll", + "tools/net9.0/Sdk/Sdk.props", + "tools/net9.0/build/Microsoft.NET.ILLink.Analyzers.props", + "tools/net9.0/build/Microsoft.NET.ILLink.Tasks.props", + "tools/net9.0/build/Microsoft.NET.ILLink.targets", + "tools/net9.0/illink.deps.json", + "tools/net9.0/illink.dll", + "tools/net9.0/illink.runtimeconfig.json", + "useSharedDesignerContext.txt" + ] + }, "NetEscapades.EnumGenerators/1.0.0-beta11": { "sha512": "37btDZQX5OzwUmF6xvqxDb0mRTXi3O/h3nVKjvri2XEwyUnHsY5g43jbPJo8Sp2gxbfJd2lto7fLLQujw5aT5Q==", "type": "package", @@ -1035,12 +1585,19 @@ "ulid.1.3.4.nupkg.sha512", "ulid.nuspec" ] + }, + "RobertMart/1.0.0": { + "type": "project", + "path": "../RobertMart/RobertMart.csproj", + "msbuildProject": "../RobertMart/RobertMart.csproj" } }, "projectFileDependencyGroups": { "net9.0": [ "DSharpPlus >= 5.0.0-nightly-02450", + "Microsoft.NET.ILLink.Tasks >= 9.0.0", "OpenAI >= 2.1.0", + "RobertMart >= 1.0.0", "ini-parser >= 2.5.2" ] }, @@ -1068,7 +1625,11 @@ "frameworks": { "net9.0": { "targetAlias": "net9.0", - "projectReferences": {} + "projectReferences": { + "C:\\Users\\jerem\\RiderProjects\\Robert\\RobertMart\\RobertMart.csproj": { + "projectPath": "C:\\Users\\jerem\\RiderProjects\\Robert\\RobertMart\\RobertMart.csproj" + } + } } }, "warningProperties": { @@ -1091,6 +1652,12 @@ "target": "Package", "version": "[5.0.0-nightly-02450, )" }, + "Microsoft.NET.ILLink.Tasks": { + "suppressParent": "All", + "target": "Package", + "version": "[9.0.0, )", + "autoReferenced": true + }, "OpenAI": { "target": "Package", "version": "[2.1.0, )" @@ -1111,6 +1678,20 @@ ], "assetTargetFallback": true, "warn": true, + "downloadDependencies": [ + { + "name": "Microsoft.AspNetCore.App.Runtime.linux-x64", + "version": "[9.0.0, 9.0.0]" + }, + { + "name": "Microsoft.NETCore.App.Host.linux-x64", + "version": "[9.0.0, 9.0.0]" + }, + { + "name": "Microsoft.NETCore.App.Runtime.linux-x64", + "version": "[9.0.0, 9.0.0]" + } + ], "frameworkReferences": { "Microsoft.NETCore.App": { "privateAssets": "all" @@ -1118,6 +1699,11 @@ }, "runtimeIdentifierGraphPath": "C:\\Users\\jerem\\.dotnet\\sdk\\9.0.100/PortableRuntimeIdentifierGraph.json" } + }, + "runtimes": { + "linux-x64": { + "#import": [] + } } }, "logs": [ diff --git a/Bot/obj/project.nuget.cache b/Bot/obj/project.nuget.cache index 3c5f9de..ab61f99 100644 --- a/Bot/obj/project.nuget.cache +++ b/Bot/obj/project.nuget.cache @@ -1,11 +1,12 @@ { "version": 2, - "dgSpecHash": "6DG89n12Fl0=", + "dgSpecHash": "h+hcN35o2Y0=", "success": true, "projectFilePath": "C:\\Users\\jerem\\RiderProjects\\Robert\\Bot\\Bot.csproj", "expectedPackageFiles": [ "C:\\Users\\jerem\\.nuget\\packages\\communitytoolkit.highperformance\\8.3.2\\communitytoolkit.highperformance.8.3.2.nupkg.sha512", "C:\\Users\\jerem\\.nuget\\packages\\dsharpplus\\5.0.0-nightly-02450\\dsharpplus.5.0.0-nightly-02450.nupkg.sha512", + "C:\\Users\\jerem\\.nuget\\packages\\htmlagilitypack\\1.11.72\\htmlagilitypack.1.11.72.nupkg.sha512", "C:\\Users\\jerem\\.nuget\\packages\\ini-parser\\2.5.2\\ini-parser.2.5.2.nupkg.sha512", "C:\\Users\\jerem\\.nuget\\packages\\microsoft.extensions.caching.abstractions\\9.0.0\\microsoft.extensions.caching.abstractions.9.0.0.nupkg.sha512", "C:\\Users\\jerem\\.nuget\\packages\\microsoft.extensions.caching.memory\\9.0.0\\microsoft.extensions.caching.memory.9.0.0.nupkg.sha512", @@ -15,6 +16,7 @@ "C:\\Users\\jerem\\.nuget\\packages\\microsoft.extensions.logging.abstractions\\9.0.0\\microsoft.extensions.logging.abstractions.9.0.0.nupkg.sha512", "C:\\Users\\jerem\\.nuget\\packages\\microsoft.extensions.options\\9.0.0\\microsoft.extensions.options.9.0.0.nupkg.sha512", "C:\\Users\\jerem\\.nuget\\packages\\microsoft.extensions.primitives\\9.0.0\\microsoft.extensions.primitives.9.0.0.nupkg.sha512", + "C:\\Users\\jerem\\.nuget\\packages\\microsoft.net.illink.tasks\\9.0.0\\microsoft.net.illink.tasks.9.0.0.nupkg.sha512", "C:\\Users\\jerem\\.nuget\\packages\\netescapades.enumgenerators\\1.0.0-beta11\\netescapades.enumgenerators.1.0.0-beta11.nupkg.sha512", "C:\\Users\\jerem\\.nuget\\packages\\newtonsoft.json\\13.0.3\\newtonsoft.json.13.0.3.nupkg.sha512", "C:\\Users\\jerem\\.nuget\\packages\\openai\\2.1.0\\openai.2.1.0.nupkg.sha512", @@ -25,7 +27,10 @@ "C:\\Users\\jerem\\.nuget\\packages\\system.runtime.compilerservices.unsafe\\6.0.0\\system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512", "C:\\Users\\jerem\\.nuget\\packages\\system.text.encodings.web\\6.0.0\\system.text.encodings.web.6.0.0.nupkg.sha512", "C:\\Users\\jerem\\.nuget\\packages\\system.text.json\\6.0.10\\system.text.json.6.0.10.nupkg.sha512", - "C:\\Users\\jerem\\.nuget\\packages\\ulid\\1.3.4\\ulid.1.3.4.nupkg.sha512" + "C:\\Users\\jerem\\.nuget\\packages\\ulid\\1.3.4\\ulid.1.3.4.nupkg.sha512", + "C:\\Users\\jerem\\.nuget\\packages\\microsoft.netcore.app.runtime.linux-x64\\9.0.0\\microsoft.netcore.app.runtime.linux-x64.9.0.0.nupkg.sha512", + "C:\\Users\\jerem\\.nuget\\packages\\microsoft.aspnetcore.app.runtime.linux-x64\\9.0.0\\microsoft.aspnetcore.app.runtime.linux-x64.9.0.0.nupkg.sha512", + "C:\\Users\\jerem\\.nuget\\packages\\microsoft.netcore.app.host.linux-x64\\9.0.0\\microsoft.netcore.app.host.linux-x64.9.0.0.nupkg.sha512" ], "logs": [ { diff --git a/Bot/obj/project.packagespec.json b/Bot/obj/project.packagespec.json index f6de653..aa8b324 100644 --- a/Bot/obj/project.packagespec.json +++ b/Bot/obj/project.packagespec.json @@ -1 +1 @@ -"restore":{"projectUniqueName":"C:\\Users\\jerem\\RiderProjects\\Robert\\Bot\\Bot.csproj","projectName":"Bot","projectPath":"C:\\Users\\jerem\\RiderProjects\\Robert\\Bot\\Bot.csproj","outputPath":"C:\\Users\\jerem\\RiderProjects\\Robert\\Bot\\obj\\","projectStyle":"PackageReference","originalTargetFrameworks":["net9.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net9.0":{"targetAlias":"net9.0","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]},"restoreAuditProperties":{"enableAudit":"true","auditLevel":"low","auditMode":"all"},"SdkAnalysisLevel":"9.0.100"}"frameworks":{"net9.0":{"targetAlias":"net9.0","dependencies":{"DSharpPlus":{"target":"Package","version":"[5.0.0-nightly-02450, )"},"OpenAI":{"target":"Package","version":"[2.1.0, )"},"ini-parser":{"target":"Package","version":"[2.5.2, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"C:\\Users\\jerem\\.dotnet\\sdk\\9.0.100/PortableRuntimeIdentifierGraph.json"}} \ No newline at end of file +"restore":{"projectUniqueName":"C:\\Users\\jerem\\RiderProjects\\Robert\\Bot\\Bot.csproj","projectName":"Bot","projectPath":"C:\\Users\\jerem\\RiderProjects\\Robert\\Bot\\Bot.csproj","outputPath":"C:\\Users\\jerem\\RiderProjects\\Robert\\Bot\\obj\\","projectStyle":"PackageReference","originalTargetFrameworks":["net9.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net9.0":{"targetAlias":"net9.0","projectReferences":{"C:\\Users\\jerem\\RiderProjects\\Robert\\RobertMart\\RobertMart.csproj":{"projectPath":"C:\\Users\\jerem\\RiderProjects\\Robert\\RobertMart\\RobertMart.csproj"}}}},"warningProperties":{"warnAsError":["NU1605"]},"restoreAuditProperties":{"enableAudit":"true","auditLevel":"low","auditMode":"all"},"SdkAnalysisLevel":"9.0.100"}"frameworks":{"net9.0":{"targetAlias":"net9.0","dependencies":{"DSharpPlus":{"target":"Package","version":"[5.0.0-nightly-02450, )"},"OpenAI":{"target":"Package","version":"[2.1.0, )"},"ini-parser":{"target":"Package","version":"[2.5.2, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"C:\\Users\\jerem\\.dotnet\\sdk\\9.0.100/PortableRuntimeIdentifierGraph.json"}} \ No newline at end of file diff --git a/Bot/obj/rider.project.model.nuget.info b/Bot/obj/rider.project.model.nuget.info index a71427f..3246b07 100644 --- a/Bot/obj/rider.project.model.nuget.info +++ b/Bot/obj/rider.project.model.nuget.info @@ -1 +1 @@ -17376010223077519 \ No newline at end of file +17393804755893759 \ No newline at end of file diff --git a/Bot/obj/rider.project.restore.info b/Bot/obj/rider.project.restore.info index 08ec610..a20f8c4 100644 --- a/Bot/obj/rider.project.restore.info +++ b/Bot/obj/rider.project.restore.info @@ -1 +1 @@ -17376089123902687 \ No newline at end of file +17393793386527819 \ No newline at end of file diff --git a/Robert.sln b/Robert.sln index 62ce14b..50cfc40 100644 --- a/Robert.sln +++ b/Robert.sln @@ -2,6 +2,8 @@ Microsoft Visual Studio Solution File, Format Version 12.00 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bot", "Bot\Bot.csproj", "{15F2CD23-B53C-4C59-9D68-B2FD3F0F2C48}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RobertMart", "RobertMart\RobertMart.csproj", "{FA57B949-39DA-44CD-9F9F-880A0F585D7D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -12,5 +14,9 @@ Global {15F2CD23-B53C-4C59-9D68-B2FD3F0F2C48}.Debug|Any CPU.Build.0 = Debug|Any CPU {15F2CD23-B53C-4C59-9D68-B2FD3F0F2C48}.Release|Any CPU.ActiveCfg = Release|Any CPU {15F2CD23-B53C-4C59-9D68-B2FD3F0F2C48}.Release|Any CPU.Build.0 = Release|Any CPU + {FA57B949-39DA-44CD-9F9F-880A0F585D7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA57B949-39DA-44CD-9F9F-880A0F585D7D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA57B949-39DA-44CD-9F9F-880A0F585D7D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA57B949-39DA-44CD-9F9F-880A0F585D7D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/Robert.sln.DotSettings.user b/Robert.sln.DotSettings.user index 8c2f580..da8dac2 100644 --- a/Robert.sln.DotSettings.user +++ b/Robert.sln.DotSettings.user @@ -1,4 +1,7 @@  + ForceIncluded + ForceIncluded + ForceIncluded <AssemblyExplorer> <Assembly Path="C:\Users\jerem\.nuget\packages\dsharpplus\4.5.0\lib\netstandard2.0\DSharpPlus.dll" /> </AssemblyExplorer> \ No newline at end of file diff --git a/RobertMart/CommodityTracker.cs b/RobertMart/CommodityTracker.cs new file mode 100644 index 0000000..7b7ce60 --- /dev/null +++ b/RobertMart/CommodityTracker.cs @@ -0,0 +1,69 @@ +using HtmlAgilityPack; + +namespace RobertMart +{ + public class CommodityTracker + { + public static readonly Dictionary Commodities = new Dictionary() + { + {"Eggs", 6.00m}, + {"Gas", 3.000m}, + }; + + private const string EggsSourceUri = "https://tradingeconomics.com"; + private const string GasSourceUri = "https://gasprices.aaa.com/"; + + public static async void FetchCommodities() + { + try + { + var client = new HttpClient(); + var httpRequest = new HttpRequestMessage + { + Method = HttpMethod.Get, + RequestUri = new Uri($"{EggsSourceUri}/commodity/eggs-us"), + Headers = + { + {"Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"}, + { "User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0" }, + } + }; + var html = await client.SendAsync(httpRequest).Result.Content.ReadAsStringAsync(); + var doc = new HtmlDocument(); + doc.LoadHtml(html); + var tableNode = doc.DocumentNode.SelectSingleNode("//table[@class='table']"); + var tr = tableNode.SelectSingleNode("./tr"); + var priceNode = tr.SelectSingleNode("./td[2]"); + var price = decimal.Parse(priceNode.InnerText.Trim()); + Commodities["Eggs"] = price; + + var gasHttpRequest = new HttpRequestMessage + { + Method = HttpMethod.Get, + RequestUri = new Uri(GasSourceUri), + Headers = + { + { "Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" }, + { + "User-Agent", + "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0" + }, + }, + }; + + var gasClient = new HttpClient(); + var gasHtml = await gasClient.SendAsync(gasHttpRequest).Result.Content.ReadAsStringAsync(); + var gasDoc = new HtmlDocument(); + gasDoc.LoadHtml(gasHtml); + var gasPriceNode = gasDoc.DocumentNode.SelectSingleNode("//p[@class='numb']"); + var stringGasPrice = gasPriceNode.SelectSingleNode("text()").InnerText.Trim(); + var gasPrice = decimal.Parse(stringGasPrice.Replace("$", "")); + Commodities["Gas"] = gasPrice; + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + } +} \ No newline at end of file diff --git a/RobertMart/RobertMart.csproj b/RobertMart/RobertMart.csproj new file mode 100644 index 0000000..3b22976 --- /dev/null +++ b/RobertMart/RobertMart.csproj @@ -0,0 +1,13 @@ + + + + net9.0 + enable + enable + + + + + + +