Skip to content

Commit cdcca9c

Browse files
committed
Fix build
1 parent d35ada5 commit cdcca9c

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
lines changed

.github/workflows/dotnet.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: .NET
33
on: [ push, pull_request ]
44

55
env:
6-
DOTNET_SDK_VERSION: 5.0.x
6+
DOTNET_SDK_VERSION: 6.0.x
77

88
jobs:
99
build-generic:
@@ -24,7 +24,7 @@ jobs:
2424
run: dotnet restore
2525

2626
- name: Build with .NET Core
27-
run: dotnet publish -c Release -f net5.0 -o out/${{ github.event.repository.name }}-generic
27+
run: dotnet publish -c Release -f net6.0 -o out/${{ github.event.repository.name }}-generic
2828

2929
- name: Upload generic artifacts
3030
uses: actions/upload-artifact@v2

GameRemover/GameRemoverPlugin.cs

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,11 @@ namespace GameRemover {
2121
[Export(typeof(IPlugin))]
2222
[UsedImplicitly]
2323
public class GameRemoverPlugin : IBotCommand {
24-
public void OnLoaded() {
25-
Assembly assembly = Assembly.GetExecutingAssembly();
26-
string repository = assembly
27-
.GetCustomAttributes<AssemblyMetadataAttribute>()
28-
.First(x => x.Key == "RepositoryUrl")
29-
.Value ?? throw new InvalidOperationException(nameof(AssemblyMetadataAttribute));
24+
public Task OnLoaded()
25+
{
26+
ASF.ArchiLogger.LogGenericInfo($"{Name} by Vital7 | Support & source code: https://github.com/Vital7/{Name}");
3027

31-
const string git = ".git";
32-
int index = repository.IndexOf(git, StringComparison.Ordinal);
33-
if (index >= 0) {
34-
repository = repository[..(index + 1)];
35-
}
36-
37-
string company = assembly
38-
.GetCustomAttribute<AssemblyCompanyAttribute>()?.Company ?? throw new InvalidOperationException(nameof(AssemblyCompanyAttribute));
39-
40-
ASF.ArchiLogger.LogGenericInfo(Name + " by " + company + " | Support & source code: " + repository);
28+
return Task.CompletedTask;
4129
}
4230

4331
public string Name => nameof(GameRemover);

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ ASF plugin to remove games from account.
77

88
## Commands
99

10-
Command | Access | Description
11-
--- | --- | ---
12-
`deletegame [Bots] {AppID}` | `Master` | Removes game `appID` from the given bot instances.
10+
| Command | Access | Description |
11+
|-----------------------------|----------|----------------------------------------------------|
12+
| `deletegame [Bots] {AppID}` | `Master` | Removes game `appID` from the given bot instances. |

0 commit comments

Comments
 (0)