Skip to content

Commit ffef9ef

Browse files
committed
Merge branch 'main' into temp
2 parents 743b136 + 1c119a4 commit ffef9ef

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

.github/workflows/dotnet.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ jobs:
5757
id: github_release
5858
uses: ncipollo/[email protected]
5959
with:
60-
artifacts: "out/*"
60+
artifacts: "out/*.zip"
6161
makeLatest: true
62-
release_name: ${{ github.event.repository.name }} V${{ github.ref_name }}
62+
name: ${{ github.event.repository.name }} V${{ github.ref_name }}

GameRemover/Directory.Build.props

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
<PropertyGroup>
66
<Description>ASF plugin to remove games from account.</Description>
7+
<NoWarn>$(NoWarn),CA1863</NoWarn>
78
<Version>2.3.0</Version>
89
</PropertyGroup>
910

GameRemover/GameRemoverPlugin.cs

+5-10
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using System.Globalization;
55
using System.Linq;
66
using System.Reflection;
7-
using System.Text;
87
using System.Threading.Tasks;
98
using AngleSharp.Dom;
109
using ArchiSteamFarm.Core;
@@ -23,10 +22,6 @@ namespace GameRemover;
2322
[UsedImplicitly]
2423
public class GameRemoverPlugin : IBotCommand2
2524
{
26-
private static readonly CompositeFormat ErrorIsInvalid = CompositeFormat.Parse(Strings.ErrorIsInvalid);
27-
private static readonly CompositeFormat ErrorObjectIsNull = CompositeFormat.Parse(Strings.ErrorObjectIsNull);
28-
private static readonly CompositeFormat BotNotFound = CompositeFormat.Parse(Strings.BotNotFound);
29-
3025
public Task OnLoaded()
3126
{
3227
ASF.ArchiLogger.LogGenericInfo($"{Name} by ezhevita | Support & source code: https://github.com/ezhevita/{Name}");
@@ -64,7 +59,7 @@ public Task OnLoaded()
6459
{
6560
if (!uint.TryParse(appIDText, out var appID) || (appID == 0) || !appIDs.Add(appID))
6661
{
67-
return bot.Commands.FormatBotResponse(string.Format(CultureInfo.CurrentCulture, ErrorIsInvalid, appIDText));
62+
return bot.Commands.FormatBotResponse(string.Format(CultureInfo.CurrentCulture, Strings.ErrorIsInvalid, appIDText));
6863
}
6964
}
7065

@@ -75,18 +70,18 @@ public Task OnLoaded()
7570
using var responseDeleteGamePage = (await bot.ArchiWebHandler.UrlGetToHtmlDocumentWithSession(uriDeleteGamePage).ConfigureAwait(false))?.Content;
7671
if (responseDeleteGamePage == null)
7772
{
78-
return bot.Commands.FormatBotResponse(string.Format(CultureInfo.CurrentCulture, ErrorObjectIsNull, nameof(responseDeleteGamePage)));
73+
return bot.Commands.FormatBotResponse(string.Format(CultureInfo.CurrentCulture, Strings.ErrorObjectIsNull, nameof(responseDeleteGamePage)));
7974
}
8075

8176
var node = responseDeleteGamePage.SelectSingleNode<IElement>("//input[@id='packageid']");
8277
if (node == null)
8378
{
84-
return bot.Commands.FormatBotResponse(string.Format(CultureInfo.CurrentCulture, ErrorObjectIsNull, nameof(node)));
79+
return bot.Commands.FormatBotResponse(string.Format(CultureInfo.CurrentCulture, Strings.ErrorObjectIsNull, nameof(node)));
8580
}
8681

8782
if (!uint.TryParse(node.GetAttribute("value"), out var packageID) || (packageID == 0))
8883
{
89-
return bot.Commands.FormatBotResponse(string.Format(CultureInfo.CurrentCulture, ErrorIsInvalid, nameof(packageID)));
84+
return bot.Commands.FormatBotResponse(string.Format(CultureInfo.CurrentCulture, Strings.ErrorIsInvalid, nameof(packageID)));
9085
}
9186

9287
Dictionary<string, string> data = new(3)
@@ -110,7 +105,7 @@ public Task OnLoaded()
110105
var bots = Bot.GetBots(botNames);
111106
if ((bots == null) || (bots.Count == 0))
112107
{
113-
return access >= EAccess.Owner ? Commands.FormatStaticResponse(string.Format(CultureInfo.CurrentCulture, BotNotFound, botNames)) : null;
108+
return access >= EAccess.Owner ? Commands.FormatStaticResponse(string.Format(CultureInfo.CurrentCulture, Strings.BotNotFound, botNames)) : null;
114109
}
115110

116111
var results = await Utilities.InParallel(bots.Select(bot => ResponseDeleteGame(bot, Commands.GetProxyAccess(bot, access, steamID), appIDsText))).ConfigureAwait(false);

0 commit comments

Comments
 (0)