Skip to content

Commit

Permalink
Merge branch 'fix/vnext' of https://github.com/Aiko-IT-Systems/DisCat…
Browse files Browse the repository at this point in the history
…Sharp into fix/vnext
  • Loading branch information
Lulalaby committed Oct 18, 2023
2 parents a525915 + 82bdc9c commit d7c0990
Show file tree
Hide file tree
Showing 1,142 changed files with 13,006 additions and 19,195 deletions.
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ dotnet_diagnostic.IDE0161.severity = error
# Organize usings
dotnet_separate_import_directive_groups = true
dotnet_sort_system_directives_first = true
file_header_template = This file is part of the DisCatSharp project, based off DSharpPlus.\n\nCopyright (c) 2021-2023 AITSYS\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.

# this. and Me. preferences
dotnet_style_qualification_for_event = true:warning
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ jobs:
name: Build library
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: |
7.0.306
7.0.401
6.x
- name: Build library
run: dotnet build -c Release -v minimal DisCatSharp.sln
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches: [ main ]
schedule:
- cron: '39 18 * * 3'
merge_group:
workflow_dispatch:

jobs:
Expand All @@ -23,7 +24,7 @@ jobs:
language: [ 'csharp' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
Expand All @@ -32,7 +33,7 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
7.0.306
7.0.401
6.x
- name: Build
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
name: Build documentation
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.NYUW_TOKEN_GH }}
- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: 7.0.306
dotnet-version: 7.0.401
- name: Git fetch unshallow
run: git fetch --unshallow
- name: Install DocFX
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
needs: build
steps:
- name: Checkout docs repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: Aiko-IT-Systems/DisCatSharp.Docs
token: ${{ secrets.NYUW_TOKEN_GH }}
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/documentation_test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: "Test Documentation"
on:
pull_request:
merge_group:

env:
DOTNET_NOLOGO: true
Expand All @@ -15,13 +16,13 @@ jobs:
name: Build documentation
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.NYUW_TOKEN_GH }}
- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: 7.0.306
dotnet-version: 7.0.401
- name: Install DocFX
run: dotnet tool update -g docfx --prerelease
continue-on-error: true
Expand Down Expand Up @@ -60,7 +61,7 @@ jobs:
git_user_name: NyuwBot
git_user_email: [email protected]
- name: Checkout docs repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: Aiko-IT-Systems/DisCatSharp.Docs
token: ${{ secrets.NYUW_TOKEN_GH }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/internal-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: "Internal Release"

on:
workflow_dispatch:
merge_group:
push:
branches-ignore:
- main
Expand All @@ -19,12 +20,12 @@ jobs:
name: Build library and release internally
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: |
7.0.306
7.0.401
6.x
- name: Restore dependencies
run: dotnet restore DisCatSharp.sln
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ jobs:
runs-on: ubuntu-latest
name: Label PRs
steps:
- uses: srvaroa/[email protected].0
- uses: srvaroa/[email protected].3
env:
GITHUB_TOKEN: "${{ secrets.NYUW_TOKEN_GH }}"
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ jobs:
name: Build library and release
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: |
7.0.306
7.0.401
6.x
- name: Restore dependencies
run: dotnet restore DisCatSharp.sln
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sentry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Checkout repository"
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set outputs
id: vars
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tweet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Get Release Tag"
id: tags
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -326,3 +326,4 @@ Thumbs.db
.manifest
dcs-artifacts/
_exported_templates/
package-lock.json
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
"hlsl",
"powershell",
"xml"
]
],
"dotnet.defaultSolution": "DisCatSharp.sln"
}
14 changes: 0 additions & 14 deletions DisCatSharp.ApplicationCommands/.editorconfig

This file was deleted.

35 changes: 10 additions & 25 deletions DisCatSharp.ApplicationCommands/ApplicationCommandsConfiguration.cs
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
// This file is part of the DisCatSharp project.
//
// Copyright (c) 2021-2023 AITSYS
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

using System;

using Microsoft.Extensions.DependencyInjection;
Expand All @@ -37,7 +15,7 @@ public class ApplicationCommandsConfiguration
/// <para>This allows passing data around without resorting to static members.</para>
/// <para>Defaults to <see langword="null"/>.</para>
/// </summary>
public IServiceProvider ServiceProvider { internal get; set; }
public IServiceProvider ServiceProvider { internal get; set; } = new ServiceCollection().BuildServiceProvider(true);

/// <summary>
/// <para>This option enables the default help command.</para>
Expand Down Expand Up @@ -94,11 +72,18 @@ public class ApplicationCommandsConfiguration
public bool GenerateTranslationFilesOnly { internal get; set; } = false;

/// <summary>
/// Initializes a new instance of the <see cref="ApplicationCommandsConfiguration"/> class.
/// Creates a new configuration with default values.
/// </summary>
[ActivatorUtilitiesConstructor]
public ApplicationCommandsConfiguration()
{ }

/// <summary>
/// Utilized via dependency injection pipeline.
/// </summary>
/// <param name="provider">The service provider.</param>
[ActivatorUtilitiesConstructor]
public ApplicationCommandsConfiguration(IServiceProvider provider = null)
public ApplicationCommandsConfiguration(IServiceProvider provider)
{
this.ServiceProvider = provider;
}
Expand Down
Loading

0 comments on commit d7c0990

Please sign in to comment.