Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ dcs-docs-preview.zip
docfx.zip
DisCatSharp.Docs/_site/
_site
dcs-artifacts/

#Ignore thumbnails created by Windows
Thumbs.db
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
uid: api_discatsharp_extensions_translations_applicationcommands_index
title: DisCatSharp Translations ApplicationCommands Extension API Reference
author: DisCatSharp Team
---

# API Reference

Welcome to the DisCatSharp Translations ApplicationCommands Extension API reference.

To begin, select a namespace, then a class, from the table of contents on the left.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### YamlMime:TableOfContent
items:
- uid: DisCatSharp.Extensions.Translations.ApplicationCommands
name: DisCatSharp.Extensions.Translations.ApplicationCommands
type: Namespace
items:
- uid: DisCatSharp.Extensions.Translations.ApplicationCommands.ExtensionMethods
name: ExtensionMethods
type: Class
memberLayout: SeparatePages
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
uid: api_discatsharp_extensions_translations_commandsnext_index
title: DisCatSharp Translations CommandsNext Extension API Reference
author: DisCatSharp Team
---

# API Reference

Welcome to the DisCatSharp Translations CommandsNext Extension API reference.

To begin, select a namespace, then a class, from the table of contents on the left.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### YamlMime:TableOfContent
items:
- uid: DisCatSharp.Extensions.Translations.CommandsNext
name: DisCatSharp.Extensions.Translations.CommandsNext
type: Namespace
items:
- uid: DisCatSharp.Extensions.Translations.CommandsNext.ExtensionMethods
name: ExtensionMethods
type: Class
memberLayout: SeparatePages
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
uid: api_discatsharp_extensions_translations_manager_index
title: DisCatSharp Translations Manager Extension API Reference
author: DisCatSharp Team
---

# API Reference

Welcome to the DisCatSharp Translations Manager Extension API reference.

To begin, select a namespace, then a class, from the table of contents on the left.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### YamlMime:TableOfContent
items:
- uid: DisCatSharp.Extensions.Translations.Manager
name: DisCatSharp.Extensions.Translations.Manager
type: Namespace
items:
- uid: DisCatSharp.Extensions.Translations.Manager.TranslationManager
name: TranslationManager
type: Class
- uid: DisCatSharp.Extensions.Translations.Manager.TranslationsManagerConfiguration
name: TranslationsManagerConfiguration
type: Class
memberLayout: SeparatePages
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
uid: api_discatsharp_extensions_translations_index
title: DisCatSharp Translations Extension API Reference
author: DisCatSharp Team
---

# API Reference

Welcome to the DisCatSharp Translations Extension API reference.

To begin, select a namespace, then a class, from the table of contents on the left.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### YamlMime:TableOfContent
items:
- uid: DisCatSharp.Extensions.Translations
name: DisCatSharp.Extensions.Translations
type: Namespace
items:
- uid: DisCatSharp.Extensions.Translations.ExtensionMethods
name: ExtensionMethods
type: Class
- uid: DisCatSharp.Extensions.Translations.TranslationEngine
name: TranslationEngine
type: Class
- uid: DisCatSharp.Extensions.Translations.TranslationsConfiguration
name: TranslationsConfiguration
type: Class
- uid: DisCatSharp.Extensions.Translations.TranslationsExtension
name: TranslationsExtension
type: Class
memberLayout: SeparatePages
4 changes: 4 additions & 0 deletions DisCatSharp.Extensions.Docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ Welcome to the DisCatSharp Extensions Global API reference.
- [DisCatSharp.Extensions.TwoFactorCommands](xref:api_discatsharp_extensions_twofactorcommands_index)
- [DisCatSharp.Extensions.OAuth2Web](xref:api_discatsharp_extensions_oauth2web_index)
- [DisCatSharp.Extensions.SimpleMusicCommands](xref:api_discatsharp_extensions_simplemusiccommands_index)
- [DisCatSharp.Extensions.Translations](xref:api_discatsharp_extensions_translations_index)
- [DisCatSharp.Extensions.Translations.ApplicationCommands](xref:api_discatsharp_extensions_translations_applicationcommands_index)
- [DisCatSharp.Extensions.Translations.CommandsNext](xref:api_discatsharp_extensions_translations_commandsnext_index)
- [DisCatSharp.Extensions.Translations.Manager](xref:api_discatsharp_extensions_translations_manager_index)
64 changes: 64 additions & 0 deletions DisCatSharp.Extensions.Docs/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,70 @@
"namespaceLayout": "flattened",
"enumSortOrder": "declaringOrder",
"includeExplicitInterfaceImplementations": true
},
{
"src": [
{
"src": "../DisCatSharp.Extensions.Translations/",
"files": ["**.csproj"],
"exclude": ["**/obj/**", "**/bin/**"]
}
],
"dest": "api/DisCatSharp.Extensions.Translations",
"filter": "filter_config.yml",
"disableDefaultFilter": false,
"memberLayout": "separatePages",
"namespaceLayout": "flattened",
"enumSortOrder": "declaringOrder",
"includeExplicitInterfaceImplementations": true
},
{
"src": [
{
"src": "../DisCatSharp.Extensions.Translations.ApplicationCommands/",
"files": ["**.csproj"],
"exclude": ["**/obj/**", "**/bin/**"]
}
],
"dest": "api/DisCatSharp.Extensions.Translations.ApplicationCommands",
"filter": "filter_config.yml",
"disableDefaultFilter": false,
"memberLayout": "separatePages",
"namespaceLayout": "flattened",
"enumSortOrder": "declaringOrder",
"includeExplicitInterfaceImplementations": true
},
{
"src": [
{
"src": "../DisCatSharp.Extensions.Translations.CommandsNext/",
"files": ["**.csproj"],
"exclude": ["**/obj/**", "**/bin/**"]
}
],
"dest": "api/DisCatSharp.Extensions.Translations.CommandsNext",
"filter": "filter_config.yml",
"disableDefaultFilter": false,
"memberLayout": "separatePages",
"namespaceLayout": "flattened",
"enumSortOrder": "declaringOrder",
"includeExplicitInterfaceImplementations": true
},
{
"src": [
{
"src": "../DisCatSharp.Extensions.Translations.Manager/",
"files": ["**.csproj"],
"exclude": ["**/obj/**", "**/bin/**"]
}
],
"dest": "api/DisCatSharp.Extensions.Translations.Manager",
"filter": "filter_config.yml",
"disableDefaultFilter": false,
"memberLayout": "separatePages",
"namespaceLayout": "flattened",
"enumSortOrder": "declaringOrder",
"includeExplicitInterfaceImplementations": true
}
],
"build": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the DisCatSharp project.
//
// Copyright (c) 2021-2023 AITSYS
// Copyright (c) 2021-2025 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the DisCatSharp project.
//
// Copyright (c) 2021-2023 AITSYS
// Copyright (c) 2021-2025 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the DisCatSharp project.
//
// Copyright (c) 2021-2023 AITSYS
// Copyright (c) 2021-2025 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the DisCatSharp project.
//
// Copyright (c) 2021-2023 AITSYS
// Copyright (c) 2021-2025 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
Expand All @@ -26,7 +26,7 @@

public class AuthorizationCodeReceiveEventArgs : DiscordOAuth2EventArgs
{
internal AuthorizationCodeReceiveEventArgs(IServiceProvider provider)

Check warning on line 29 in DisCatSharp.Extensions.OAuth2Web/EventArgs/AuthorizationCodeReceiveEventArgs.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Non-nullable property 'ReceivedState' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 29 in DisCatSharp.Extensions.OAuth2Web/EventArgs/AuthorizationCodeReceiveEventArgs.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Non-nullable property 'ReceivedCode' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
: base(provider)
{ }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the DisCatSharp project, based off DSharpPlus.
//
// Copyright (c) 2021-2023 AITSYS
// Copyright (c) 2021-2025 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the DisCatSharp project, based off DSharpPlus.
//
// Copyright (c) 2021-2023 AITSYS
// Copyright (c) 2021-2025 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the DisCatSharp project, based off DSharpPlus.
//
// Copyright (c) 2021-2023 AITSYS
// Copyright (c) 2021-2025 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the DisCatSharp project, based off DSharpPlus.
//
// Copyright (c) 2021-2023 AITSYS
// Copyright (c) 2021-2025 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
Expand Down Expand Up @@ -47,7 +47,7 @@
this.State = state;
this.Predicate = predicate;
this.Cancellation = cancellation;
this.Cancellation.Register(() => this.Tcs.TrySetResult(null));

Check warning on line 50 in DisCatSharp.Extensions.OAuth2Web/EventHandling/Requests/AuthorizationCodeMatchRequest.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Cannot convert null literal to non-nullable reference type.
}

public string State { get; private set; }
Expand Down
2 changes: 1 addition & 1 deletion DisCatSharp.Extensions.OAuth2Web/ExtensionMethods.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the DisCatSharp project.
//
// Copyright (c) 2021-2023 AITSYS
// Copyright (c) 2021-2025 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
Expand Down
2 changes: 1 addition & 1 deletion DisCatSharp.Extensions.OAuth2Web/OAuth2Result.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the DisCatSharp project, based off DSharpPlus.
//
// Copyright (c) 2021-2023 AITSYS
// Copyright (c) 2021-2025 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the DisCatSharp project.
//
// Copyright (c) 2021-2023 AITSYS
// Copyright (c) 2021-2025 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
Expand Down
2 changes: 1 addition & 1 deletion DisCatSharp.Extensions.OAuth2Web/OAuth2WebExtension.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the DisCatSharp project.
//
// Copyright (c) 2021-2023 AITSYS
// Copyright (c) 2021-2025 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the DisCatSharp project.
//
// Copyright (c) 2021-2023 AITSYS
// Copyright (c) 2021-2025 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the DisCatSharp project.
//
// Copyright (c) 2021-2023 AITSYS
// Copyright (c) 2021-2025 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of the DisCatSharp project.
//
// Copyright (c) 2021-2023 AITSYS
// Copyright (c) 2021-2025 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
Expand Down Expand Up @@ -41,7 +41,7 @@
/// Initializes a new instance of the <see cref="SimpleMusicCommandsExtension" /> class.
/// </summary>
/// <param name="configuration">The config.</param>
internal SimpleMusicCommandsExtension(LavalinkConfiguration? configuration = null)

Check warning on line 44 in DisCatSharp.Extensions.SimpleMusicCommands/SimpleMusicCommandsExtension.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Non-nullable property 'Client' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 44 in DisCatSharp.Extensions.SimpleMusicCommands/SimpleMusicCommandsExtension.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Non-nullable property 'Client' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
{
configuration ??= new();
configuration.EnableBuiltInQueueSystem = true;
Expand All @@ -57,7 +57,7 @@
/// <summary>
/// Gets the discord client.
/// </summary>
internal DiscordClient Client { get; private set; }

Check warning on line 60 in DisCatSharp.Extensions.SimpleMusicCommands/SimpleMusicCommandsExtension.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

'SimpleMusicCommandsExtension.Client' hides inherited member 'BaseExtension.Client'. Use the new keyword if hiding was intended.

Check warning on line 60 in DisCatSharp.Extensions.SimpleMusicCommands/SimpleMusicCommandsExtension.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

'SimpleMusicCommandsExtension.Client' hides inherited member 'BaseExtension.Client'. Use the new keyword if hiding was intended.

/// <summary>
/// DO NOT USE THIS MANUALLY.
Expand All @@ -79,7 +79,7 @@
else
{
var v = a.GetName().Version;
var vs = v.ToString(3);

Check warning on line 82 in DisCatSharp.Extensions.SimpleMusicCommands/SimpleMusicCommandsExtension.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Dereference of a possibly null reference.

Check warning on line 82 in DisCatSharp.Extensions.SimpleMusicCommands/SimpleMusicCommandsExtension.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

Dereference of a possibly null reference.

if (v.Revision > 0)
this.VersionString = $"{vs}, CI build {v.Revision}";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>

<Project Sdk="Microsoft.NET.Sdk">

<Import Project="../Targets/Version.targets" />
<Import Project="../Targets/DisCatSharp.targets" />
<Import Project="../Targets/Package.targets" />
<Import Project="../Targets/NuGet.targets" />
<Import Project="../Targets/Library.targets" />

<PropertyGroup>
<AssemblyName>DisCatSharp.Extensions.Translations.ApplicationCommands</AssemblyName>
<RootNamespace>DisCatSharp.Extensions.Translations.ApplicationCommands</RootNamespace>
</PropertyGroup>

<PropertyGroup>
<PackageId>DisCatSharp.Extensions.Translations.ApplicationCommands</PackageId>
<Description>
DisCatSharp.Extensions.Translations.ApplicationCommands

Extension making it easy to use localizations in ApplicationCommands commands.
</Description>
<PackageTags>DisCatSharp,DisCatSharp Extension,Translations,Localization,ApplicationCommands,Discord,Bots,Discord Bots,AITSYS,Net8,Net9,Net10</PackageTags>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="DisCatSharp.ApplicationCommands" Version="[10.7.0-nightly-049,)" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\DisCatSharp.Extensions.Translations/DisCatSharp.Extensions.Translations.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>

</Project>
Loading
Loading