You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

installing.md 5.4 KiB

Improve library documentation (#826) * Improve the Command Service documentation The following changes have been added to this PR: • Fix minor grammatical errors. • Capitalize terms such as Commands, Modules and such, as the context is specific to the lib. • Wrap methods and properties in code blocks. The docs page currently has several issues that remains to be fixed. 1. ```md >[!WARNING] >This article is out of date and has not been rewritten yet. Information is not guaranteed to be accurate. ``` The docs doesn't necessarily seem "out of date" as the warning claims. The basics seem pretty relevant to the latest version of the lib. 2. >“To manually load a module, invoke [CommandService.AddModuleAsync], by passing in the generic type of your module and optionally, a dependency map.” The latter part of the sentence seems off. Where should the user pass the dependency map to? It seems to suggest that `AddModuleAsync` has an argument to pass the dependency to. If it is referring to `AddModuleAsync(Type type)`, then I feel like it should be clarified here - or perhaps change the wording of the sentence. 3. >“First, you need to create an @System.IServiceProvider You may create your own IServiceProvider if you wish.” Any mention of @System.IServiceProvider is currently broken on the docs. 4. >“Submodules are Modules that reside within another one. Typically, submodules are used to create nested groups (although not required to create nested groups).” Clarification on the part after "although?" 5. >“Finally, pass the map into the LoadAssembly method. Your modules will automatically be loaded with this dependency map.” Where is this `LoadAssembly` method? 6. ```md >[!NOTE] >Preconditions can be applied to Modules, Groups, or Commands. ``` The docs should mention `ParameterPreconditionAttribute`'s existence. * Update line breaks to comply with docs standard * Change "you should..." to "instead, ..." * Trim trailing spaces * Change "inherits" to "inherit" * Fix Context warning note and add ReplyAsync xref * Fix broken xrefs * Fix [Command Service] xref * Fix consistency between TypeReaders and Preconditions returns * Add missing semi-colons in ServiceProvider sample * Change CommandContext to SocketCommandContext & change variable naming * Cleanup TypeReader section * Wrap [DontInject] in code block * Fix commands docs linking in intro * Improve Getting Started - Installation - Fix character misalignment to comply with docs standard. - Fix image numbering issues by moving the tooltips above some of the steps. - Add codeblocks to search terms like `Discord.Net`. - Remove broken `addons` reference. - Specify `.NET 4.6.1` as `.NET Framework 4.6.1`. - Minor cross-reference cleanup. * Fix Getting Started - Intro - Minor grammartical fixes. - Wrap mentions of the methods, properties, and events in code block. - Replace `Discord.Net` to `Discord.NET`. - Fix steps numbering under `Creating a Discord Bot` and `Adding your bot to a server`. - Change `Task-based Asynchronous Pattern ([TAP])` linking to mark the entire term instead. - Change code block of `Pong!` to quotation mark instead. * Fix cross references in Sending Voice * Mention parameter precondition attribute * Change `Discord.NET` to `Discord.Net` for consistency * Wrap project names in code blocks & minor fixes in Terminology * Change `add-ons` to `addons` for consistency * Fix cross references in Logging * Fix minor grammatical issues in "Working with Events" * Missed a tilda * Remove out-of-date warning in Commands * Minor grammatical fixes for Entities * Fix broken xref in Logging * Adjust service collection sample ...according to https://github.com/RogueException/Discord.Net/pull/826/files/f89aecb7bfa8fe82a541d3bba44d0e37c125d235#r141530227 * Update Command Handler sample - Update Main for C# 7.1. - Inject CommandService and DiscordSocketClient into the service collection. - Add Async suffix to asynchronous methods. * Minor grammatical fixes in Events * Revert 2 incorrect grammar corrections * Revert async Main sample * Add hardcode token notice in sample * Fix missing method for Command Handler * Modify module samples to use SocketCommandContext instead * Emphasize CommandContext and SocketCommandContext * Fix formatting for module sample * Add SocketCommandContext for Groups sample * Remove comma * Fix DepMap sample formatting * Replace [DontInject] with DontInjectAttribute with cross reference * Remove connection logic note There is no reason that this note should still be here since Ready event exists. * Add a new warning message informing the users the existence of CommandService * Make command handler private excellent change
7 years ago
Improve library documentation (#826) * Improve the Command Service documentation The following changes have been added to this PR: • Fix minor grammatical errors. • Capitalize terms such as Commands, Modules and such, as the context is specific to the lib. • Wrap methods and properties in code blocks. The docs page currently has several issues that remains to be fixed. 1. ```md >[!WARNING] >This article is out of date and has not been rewritten yet. Information is not guaranteed to be accurate. ``` The docs doesn't necessarily seem "out of date" as the warning claims. The basics seem pretty relevant to the latest version of the lib. 2. >“To manually load a module, invoke [CommandService.AddModuleAsync], by passing in the generic type of your module and optionally, a dependency map.” The latter part of the sentence seems off. Where should the user pass the dependency map to? It seems to suggest that `AddModuleAsync` has an argument to pass the dependency to. If it is referring to `AddModuleAsync(Type type)`, then I feel like it should be clarified here - or perhaps change the wording of the sentence. 3. >“First, you need to create an @System.IServiceProvider You may create your own IServiceProvider if you wish.” Any mention of @System.IServiceProvider is currently broken on the docs. 4. >“Submodules are Modules that reside within another one. Typically, submodules are used to create nested groups (although not required to create nested groups).” Clarification on the part after "although?" 5. >“Finally, pass the map into the LoadAssembly method. Your modules will automatically be loaded with this dependency map.” Where is this `LoadAssembly` method? 6. ```md >[!NOTE] >Preconditions can be applied to Modules, Groups, or Commands. ``` The docs should mention `ParameterPreconditionAttribute`'s existence. * Update line breaks to comply with docs standard * Change "you should..." to "instead, ..." * Trim trailing spaces * Change "inherits" to "inherit" * Fix Context warning note and add ReplyAsync xref * Fix broken xrefs * Fix [Command Service] xref * Fix consistency between TypeReaders and Preconditions returns * Add missing semi-colons in ServiceProvider sample * Change CommandContext to SocketCommandContext & change variable naming * Cleanup TypeReader section * Wrap [DontInject] in code block * Fix commands docs linking in intro * Improve Getting Started - Installation - Fix character misalignment to comply with docs standard. - Fix image numbering issues by moving the tooltips above some of the steps. - Add codeblocks to search terms like `Discord.Net`. - Remove broken `addons` reference. - Specify `.NET 4.6.1` as `.NET Framework 4.6.1`. - Minor cross-reference cleanup. * Fix Getting Started - Intro - Minor grammartical fixes. - Wrap mentions of the methods, properties, and events in code block. - Replace `Discord.Net` to `Discord.NET`. - Fix steps numbering under `Creating a Discord Bot` and `Adding your bot to a server`. - Change `Task-based Asynchronous Pattern ([TAP])` linking to mark the entire term instead. - Change code block of `Pong!` to quotation mark instead. * Fix cross references in Sending Voice * Mention parameter precondition attribute * Change `Discord.NET` to `Discord.Net` for consistency * Wrap project names in code blocks & minor fixes in Terminology * Change `add-ons` to `addons` for consistency * Fix cross references in Logging * Fix minor grammatical issues in "Working with Events" * Missed a tilda * Remove out-of-date warning in Commands * Minor grammatical fixes for Entities * Fix broken xref in Logging * Adjust service collection sample ...according to https://github.com/RogueException/Discord.Net/pull/826/files/f89aecb7bfa8fe82a541d3bba44d0e37c125d235#r141530227 * Update Command Handler sample - Update Main for C# 7.1. - Inject CommandService and DiscordSocketClient into the service collection. - Add Async suffix to asynchronous methods. * Minor grammatical fixes in Events * Revert 2 incorrect grammar corrections * Revert async Main sample * Add hardcode token notice in sample * Fix missing method for Command Handler * Modify module samples to use SocketCommandContext instead * Emphasize CommandContext and SocketCommandContext * Fix formatting for module sample * Add SocketCommandContext for Groups sample * Remove comma * Fix DepMap sample formatting * Replace [DontInject] with DontInjectAttribute with cross reference * Remove connection logic note There is no reason that this note should still be here since Ready event exists. * Add a new warning message informing the users the existence of CommandService * Make command handler private excellent change
7 years ago
Improve library documentation (#826) * Improve the Command Service documentation The following changes have been added to this PR: • Fix minor grammatical errors. • Capitalize terms such as Commands, Modules and such, as the context is specific to the lib. • Wrap methods and properties in code blocks. The docs page currently has several issues that remains to be fixed. 1. ```md >[!WARNING] >This article is out of date and has not been rewritten yet. Information is not guaranteed to be accurate. ``` The docs doesn't necessarily seem "out of date" as the warning claims. The basics seem pretty relevant to the latest version of the lib. 2. >“To manually load a module, invoke [CommandService.AddModuleAsync], by passing in the generic type of your module and optionally, a dependency map.” The latter part of the sentence seems off. Where should the user pass the dependency map to? It seems to suggest that `AddModuleAsync` has an argument to pass the dependency to. If it is referring to `AddModuleAsync(Type type)`, then I feel like it should be clarified here - or perhaps change the wording of the sentence. 3. >“First, you need to create an @System.IServiceProvider You may create your own IServiceProvider if you wish.” Any mention of @System.IServiceProvider is currently broken on the docs. 4. >“Submodules are Modules that reside within another one. Typically, submodules are used to create nested groups (although not required to create nested groups).” Clarification on the part after "although?" 5. >“Finally, pass the map into the LoadAssembly method. Your modules will automatically be loaded with this dependency map.” Where is this `LoadAssembly` method? 6. ```md >[!NOTE] >Preconditions can be applied to Modules, Groups, or Commands. ``` The docs should mention `ParameterPreconditionAttribute`'s existence. * Update line breaks to comply with docs standard * Change "you should..." to "instead, ..." * Trim trailing spaces * Change "inherits" to "inherit" * Fix Context warning note and add ReplyAsync xref * Fix broken xrefs * Fix [Command Service] xref * Fix consistency between TypeReaders and Preconditions returns * Add missing semi-colons in ServiceProvider sample * Change CommandContext to SocketCommandContext & change variable naming * Cleanup TypeReader section * Wrap [DontInject] in code block * Fix commands docs linking in intro * Improve Getting Started - Installation - Fix character misalignment to comply with docs standard. - Fix image numbering issues by moving the tooltips above some of the steps. - Add codeblocks to search terms like `Discord.Net`. - Remove broken `addons` reference. - Specify `.NET 4.6.1` as `.NET Framework 4.6.1`. - Minor cross-reference cleanup. * Fix Getting Started - Intro - Minor grammartical fixes. - Wrap mentions of the methods, properties, and events in code block. - Replace `Discord.Net` to `Discord.NET`. - Fix steps numbering under `Creating a Discord Bot` and `Adding your bot to a server`. - Change `Task-based Asynchronous Pattern ([TAP])` linking to mark the entire term instead. - Change code block of `Pong!` to quotation mark instead. * Fix cross references in Sending Voice * Mention parameter precondition attribute * Change `Discord.NET` to `Discord.Net` for consistency * Wrap project names in code blocks & minor fixes in Terminology * Change `add-ons` to `addons` for consistency * Fix cross references in Logging * Fix minor grammatical issues in "Working with Events" * Missed a tilda * Remove out-of-date warning in Commands * Minor grammatical fixes for Entities * Fix broken xref in Logging * Adjust service collection sample ...according to https://github.com/RogueException/Discord.Net/pull/826/files/f89aecb7bfa8fe82a541d3bba44d0e37c125d235#r141530227 * Update Command Handler sample - Update Main for C# 7.1. - Inject CommandService and DiscordSocketClient into the service collection. - Add Async suffix to asynchronous methods. * Minor grammatical fixes in Events * Revert 2 incorrect grammar corrections * Revert async Main sample * Add hardcode token notice in sample * Fix missing method for Command Handler * Modify module samples to use SocketCommandContext instead * Emphasize CommandContext and SocketCommandContext * Fix formatting for module sample * Add SocketCommandContext for Groups sample * Remove comma * Fix DepMap sample formatting * Replace [DontInject] with DontInjectAttribute with cross reference * Remove connection logic note There is no reason that this note should still be here since Ready event exists. * Add a new warning message informing the users the existence of CommandService * Make command handler private excellent change
7 years ago
7 years ago
Improve library documentation (#826) * Improve the Command Service documentation The following changes have been added to this PR: • Fix minor grammatical errors. • Capitalize terms such as Commands, Modules and such, as the context is specific to the lib. • Wrap methods and properties in code blocks. The docs page currently has several issues that remains to be fixed. 1. ```md >[!WARNING] >This article is out of date and has not been rewritten yet. Information is not guaranteed to be accurate. ``` The docs doesn't necessarily seem "out of date" as the warning claims. The basics seem pretty relevant to the latest version of the lib. 2. >“To manually load a module, invoke [CommandService.AddModuleAsync], by passing in the generic type of your module and optionally, a dependency map.” The latter part of the sentence seems off. Where should the user pass the dependency map to? It seems to suggest that `AddModuleAsync` has an argument to pass the dependency to. If it is referring to `AddModuleAsync(Type type)`, then I feel like it should be clarified here - or perhaps change the wording of the sentence. 3. >“First, you need to create an @System.IServiceProvider You may create your own IServiceProvider if you wish.” Any mention of @System.IServiceProvider is currently broken on the docs. 4. >“Submodules are Modules that reside within another one. Typically, submodules are used to create nested groups (although not required to create nested groups).” Clarification on the part after "although?" 5. >“Finally, pass the map into the LoadAssembly method. Your modules will automatically be loaded with this dependency map.” Where is this `LoadAssembly` method? 6. ```md >[!NOTE] >Preconditions can be applied to Modules, Groups, or Commands. ``` The docs should mention `ParameterPreconditionAttribute`'s existence. * Update line breaks to comply with docs standard * Change "you should..." to "instead, ..." * Trim trailing spaces * Change "inherits" to "inherit" * Fix Context warning note and add ReplyAsync xref * Fix broken xrefs * Fix [Command Service] xref * Fix consistency between TypeReaders and Preconditions returns * Add missing semi-colons in ServiceProvider sample * Change CommandContext to SocketCommandContext & change variable naming * Cleanup TypeReader section * Wrap [DontInject] in code block * Fix commands docs linking in intro * Improve Getting Started - Installation - Fix character misalignment to comply with docs standard. - Fix image numbering issues by moving the tooltips above some of the steps. - Add codeblocks to search terms like `Discord.Net`. - Remove broken `addons` reference. - Specify `.NET 4.6.1` as `.NET Framework 4.6.1`. - Minor cross-reference cleanup. * Fix Getting Started - Intro - Minor grammartical fixes. - Wrap mentions of the methods, properties, and events in code block. - Replace `Discord.Net` to `Discord.NET`. - Fix steps numbering under `Creating a Discord Bot` and `Adding your bot to a server`. - Change `Task-based Asynchronous Pattern ([TAP])` linking to mark the entire term instead. - Change code block of `Pong!` to quotation mark instead. * Fix cross references in Sending Voice * Mention parameter precondition attribute * Change `Discord.NET` to `Discord.Net` for consistency * Wrap project names in code blocks & minor fixes in Terminology * Change `add-ons` to `addons` for consistency * Fix cross references in Logging * Fix minor grammatical issues in "Working with Events" * Missed a tilda * Remove out-of-date warning in Commands * Minor grammatical fixes for Entities * Fix broken xref in Logging * Adjust service collection sample ...according to https://github.com/RogueException/Discord.Net/pull/826/files/f89aecb7bfa8fe82a541d3bba44d0e37c125d235#r141530227 * Update Command Handler sample - Update Main for C# 7.1. - Inject CommandService and DiscordSocketClient into the service collection. - Add Async suffix to asynchronous methods. * Minor grammatical fixes in Events * Revert 2 incorrect grammar corrections * Revert async Main sample * Add hardcode token notice in sample * Fix missing method for Command Handler * Modify module samples to use SocketCommandContext instead * Emphasize CommandContext and SocketCommandContext * Fix formatting for module sample * Add SocketCommandContext for Groups sample * Remove comma * Fix DepMap sample formatting * Replace [DontInject] with DontInjectAttribute with cross reference * Remove connection logic note There is no reason that this note should still be here since Ready event exists. * Add a new warning message informing the users the existence of CommandService * Make command handler private excellent change
7 years ago
Improve library documentation (#826) * Improve the Command Service documentation The following changes have been added to this PR: • Fix minor grammatical errors. • Capitalize terms such as Commands, Modules and such, as the context is specific to the lib. • Wrap methods and properties in code blocks. The docs page currently has several issues that remains to be fixed. 1. ```md >[!WARNING] >This article is out of date and has not been rewritten yet. Information is not guaranteed to be accurate. ``` The docs doesn't necessarily seem "out of date" as the warning claims. The basics seem pretty relevant to the latest version of the lib. 2. >“To manually load a module, invoke [CommandService.AddModuleAsync], by passing in the generic type of your module and optionally, a dependency map.” The latter part of the sentence seems off. Where should the user pass the dependency map to? It seems to suggest that `AddModuleAsync` has an argument to pass the dependency to. If it is referring to `AddModuleAsync(Type type)`, then I feel like it should be clarified here - or perhaps change the wording of the sentence. 3. >“First, you need to create an @System.IServiceProvider You may create your own IServiceProvider if you wish.” Any mention of @System.IServiceProvider is currently broken on the docs. 4. >“Submodules are Modules that reside within another one. Typically, submodules are used to create nested groups (although not required to create nested groups).” Clarification on the part after "although?" 5. >“Finally, pass the map into the LoadAssembly method. Your modules will automatically be loaded with this dependency map.” Where is this `LoadAssembly` method? 6. ```md >[!NOTE] >Preconditions can be applied to Modules, Groups, or Commands. ``` The docs should mention `ParameterPreconditionAttribute`'s existence. * Update line breaks to comply with docs standard * Change "you should..." to "instead, ..." * Trim trailing spaces * Change "inherits" to "inherit" * Fix Context warning note and add ReplyAsync xref * Fix broken xrefs * Fix [Command Service] xref * Fix consistency between TypeReaders and Preconditions returns * Add missing semi-colons in ServiceProvider sample * Change CommandContext to SocketCommandContext & change variable naming * Cleanup TypeReader section * Wrap [DontInject] in code block * Fix commands docs linking in intro * Improve Getting Started - Installation - Fix character misalignment to comply with docs standard. - Fix image numbering issues by moving the tooltips above some of the steps. - Add codeblocks to search terms like `Discord.Net`. - Remove broken `addons` reference. - Specify `.NET 4.6.1` as `.NET Framework 4.6.1`. - Minor cross-reference cleanup. * Fix Getting Started - Intro - Minor grammartical fixes. - Wrap mentions of the methods, properties, and events in code block. - Replace `Discord.Net` to `Discord.NET`. - Fix steps numbering under `Creating a Discord Bot` and `Adding your bot to a server`. - Change `Task-based Asynchronous Pattern ([TAP])` linking to mark the entire term instead. - Change code block of `Pong!` to quotation mark instead. * Fix cross references in Sending Voice * Mention parameter precondition attribute * Change `Discord.NET` to `Discord.Net` for consistency * Wrap project names in code blocks & minor fixes in Terminology * Change `add-ons` to `addons` for consistency * Fix cross references in Logging * Fix minor grammatical issues in "Working with Events" * Missed a tilda * Remove out-of-date warning in Commands * Minor grammatical fixes for Entities * Fix broken xref in Logging * Adjust service collection sample ...according to https://github.com/RogueException/Discord.Net/pull/826/files/f89aecb7bfa8fe82a541d3bba44d0e37c125d235#r141530227 * Update Command Handler sample - Update Main for C# 7.1. - Inject CommandService and DiscordSocketClient into the service collection. - Add Async suffix to asynchronous methods. * Minor grammatical fixes in Events * Revert 2 incorrect grammar corrections * Revert async Main sample * Add hardcode token notice in sample * Fix missing method for Command Handler * Modify module samples to use SocketCommandContext instead * Emphasize CommandContext and SocketCommandContext * Fix formatting for module sample * Add SocketCommandContext for Groups sample * Remove comma * Fix DepMap sample formatting * Replace [DontInject] with DontInjectAttribute with cross reference * Remove connection logic note There is no reason that this note should still be here since Ready event exists. * Add a new warning message informing the users the existence of CommandService * Make command handler private excellent change
7 years ago
Improve library documentation (#826) * Improve the Command Service documentation The following changes have been added to this PR: • Fix minor grammatical errors. • Capitalize terms such as Commands, Modules and such, as the context is specific to the lib. • Wrap methods and properties in code blocks. The docs page currently has several issues that remains to be fixed. 1. ```md >[!WARNING] >This article is out of date and has not been rewritten yet. Information is not guaranteed to be accurate. ``` The docs doesn't necessarily seem "out of date" as the warning claims. The basics seem pretty relevant to the latest version of the lib. 2. >“To manually load a module, invoke [CommandService.AddModuleAsync], by passing in the generic type of your module and optionally, a dependency map.” The latter part of the sentence seems off. Where should the user pass the dependency map to? It seems to suggest that `AddModuleAsync` has an argument to pass the dependency to. If it is referring to `AddModuleAsync(Type type)`, then I feel like it should be clarified here - or perhaps change the wording of the sentence. 3. >“First, you need to create an @System.IServiceProvider You may create your own IServiceProvider if you wish.” Any mention of @System.IServiceProvider is currently broken on the docs. 4. >“Submodules are Modules that reside within another one. Typically, submodules are used to create nested groups (although not required to create nested groups).” Clarification on the part after "although?" 5. >“Finally, pass the map into the LoadAssembly method. Your modules will automatically be loaded with this dependency map.” Where is this `LoadAssembly` method? 6. ```md >[!NOTE] >Preconditions can be applied to Modules, Groups, or Commands. ``` The docs should mention `ParameterPreconditionAttribute`'s existence. * Update line breaks to comply with docs standard * Change "you should..." to "instead, ..." * Trim trailing spaces * Change "inherits" to "inherit" * Fix Context warning note and add ReplyAsync xref * Fix broken xrefs * Fix [Command Service] xref * Fix consistency between TypeReaders and Preconditions returns * Add missing semi-colons in ServiceProvider sample * Change CommandContext to SocketCommandContext & change variable naming * Cleanup TypeReader section * Wrap [DontInject] in code block * Fix commands docs linking in intro * Improve Getting Started - Installation - Fix character misalignment to comply with docs standard. - Fix image numbering issues by moving the tooltips above some of the steps. - Add codeblocks to search terms like `Discord.Net`. - Remove broken `addons` reference. - Specify `.NET 4.6.1` as `.NET Framework 4.6.1`. - Minor cross-reference cleanup. * Fix Getting Started - Intro - Minor grammartical fixes. - Wrap mentions of the methods, properties, and events in code block. - Replace `Discord.Net` to `Discord.NET`. - Fix steps numbering under `Creating a Discord Bot` and `Adding your bot to a server`. - Change `Task-based Asynchronous Pattern ([TAP])` linking to mark the entire term instead. - Change code block of `Pong!` to quotation mark instead. * Fix cross references in Sending Voice * Mention parameter precondition attribute * Change `Discord.NET` to `Discord.Net` for consistency * Wrap project names in code blocks & minor fixes in Terminology * Change `add-ons` to `addons` for consistency * Fix cross references in Logging * Fix minor grammatical issues in "Working with Events" * Missed a tilda * Remove out-of-date warning in Commands * Minor grammatical fixes for Entities * Fix broken xref in Logging * Adjust service collection sample ...according to https://github.com/RogueException/Discord.Net/pull/826/files/f89aecb7bfa8fe82a541d3bba44d0e37c125d235#r141530227 * Update Command Handler sample - Update Main for C# 7.1. - Inject CommandService and DiscordSocketClient into the service collection. - Add Async suffix to asynchronous methods. * Minor grammatical fixes in Events * Revert 2 incorrect grammar corrections * Revert async Main sample * Add hardcode token notice in sample * Fix missing method for Command Handler * Modify module samples to use SocketCommandContext instead * Emphasize CommandContext and SocketCommandContext * Fix formatting for module sample * Add SocketCommandContext for Groups sample * Remove comma * Fix DepMap sample formatting * Replace [DontInject] with DontInjectAttribute with cross reference * Remove connection logic note There is no reason that this note should still be here since Ready event exists. * Add a new warning message informing the users the existence of CommandService * Make command handler private excellent change
7 years ago
Improve library documentation (#826) * Improve the Command Service documentation The following changes have been added to this PR: • Fix minor grammatical errors. • Capitalize terms such as Commands, Modules and such, as the context is specific to the lib. • Wrap methods and properties in code blocks. The docs page currently has several issues that remains to be fixed. 1. ```md >[!WARNING] >This article is out of date and has not been rewritten yet. Information is not guaranteed to be accurate. ``` The docs doesn't necessarily seem "out of date" as the warning claims. The basics seem pretty relevant to the latest version of the lib. 2. >“To manually load a module, invoke [CommandService.AddModuleAsync], by passing in the generic type of your module and optionally, a dependency map.” The latter part of the sentence seems off. Where should the user pass the dependency map to? It seems to suggest that `AddModuleAsync` has an argument to pass the dependency to. If it is referring to `AddModuleAsync(Type type)`, then I feel like it should be clarified here - or perhaps change the wording of the sentence. 3. >“First, you need to create an @System.IServiceProvider You may create your own IServiceProvider if you wish.” Any mention of @System.IServiceProvider is currently broken on the docs. 4. >“Submodules are Modules that reside within another one. Typically, submodules are used to create nested groups (although not required to create nested groups).” Clarification on the part after "although?" 5. >“Finally, pass the map into the LoadAssembly method. Your modules will automatically be loaded with this dependency map.” Where is this `LoadAssembly` method? 6. ```md >[!NOTE] >Preconditions can be applied to Modules, Groups, or Commands. ``` The docs should mention `ParameterPreconditionAttribute`'s existence. * Update line breaks to comply with docs standard * Change "you should..." to "instead, ..." * Trim trailing spaces * Change "inherits" to "inherit" * Fix Context warning note and add ReplyAsync xref * Fix broken xrefs * Fix [Command Service] xref * Fix consistency between TypeReaders and Preconditions returns * Add missing semi-colons in ServiceProvider sample * Change CommandContext to SocketCommandContext & change variable naming * Cleanup TypeReader section * Wrap [DontInject] in code block * Fix commands docs linking in intro * Improve Getting Started - Installation - Fix character misalignment to comply with docs standard. - Fix image numbering issues by moving the tooltips above some of the steps. - Add codeblocks to search terms like `Discord.Net`. - Remove broken `addons` reference. - Specify `.NET 4.6.1` as `.NET Framework 4.6.1`. - Minor cross-reference cleanup. * Fix Getting Started - Intro - Minor grammartical fixes. - Wrap mentions of the methods, properties, and events in code block. - Replace `Discord.Net` to `Discord.NET`. - Fix steps numbering under `Creating a Discord Bot` and `Adding your bot to a server`. - Change `Task-based Asynchronous Pattern ([TAP])` linking to mark the entire term instead. - Change code block of `Pong!` to quotation mark instead. * Fix cross references in Sending Voice * Mention parameter precondition attribute * Change `Discord.NET` to `Discord.Net` for consistency * Wrap project names in code blocks & minor fixes in Terminology * Change `add-ons` to `addons` for consistency * Fix cross references in Logging * Fix minor grammatical issues in "Working with Events" * Missed a tilda * Remove out-of-date warning in Commands * Minor grammatical fixes for Entities * Fix broken xref in Logging * Adjust service collection sample ...according to https://github.com/RogueException/Discord.Net/pull/826/files/f89aecb7bfa8fe82a541d3bba44d0e37c125d235#r141530227 * Update Command Handler sample - Update Main for C# 7.1. - Inject CommandService and DiscordSocketClient into the service collection. - Add Async suffix to asynchronous methods. * Minor grammatical fixes in Events * Revert 2 incorrect grammar corrections * Revert async Main sample * Add hardcode token notice in sample * Fix missing method for Command Handler * Modify module samples to use SocketCommandContext instead * Emphasize CommandContext and SocketCommandContext * Fix formatting for module sample * Add SocketCommandContext for Groups sample * Remove comma * Fix DepMap sample formatting * Replace [DontInject] with DontInjectAttribute with cross reference * Remove connection logic note There is no reason that this note should still be here since Ready event exists. * Add a new warning message informing the users the existence of CommandService * Make command handler private excellent change
7 years ago
Improve library documentation (#826) * Improve the Command Service documentation The following changes have been added to this PR: • Fix minor grammatical errors. • Capitalize terms such as Commands, Modules and such, as the context is specific to the lib. • Wrap methods and properties in code blocks. The docs page currently has several issues that remains to be fixed. 1. ```md >[!WARNING] >This article is out of date and has not been rewritten yet. Information is not guaranteed to be accurate. ``` The docs doesn't necessarily seem "out of date" as the warning claims. The basics seem pretty relevant to the latest version of the lib. 2. >“To manually load a module, invoke [CommandService.AddModuleAsync], by passing in the generic type of your module and optionally, a dependency map.” The latter part of the sentence seems off. Where should the user pass the dependency map to? It seems to suggest that `AddModuleAsync` has an argument to pass the dependency to. If it is referring to `AddModuleAsync(Type type)`, then I feel like it should be clarified here - or perhaps change the wording of the sentence. 3. >“First, you need to create an @System.IServiceProvider You may create your own IServiceProvider if you wish.” Any mention of @System.IServiceProvider is currently broken on the docs. 4. >“Submodules are Modules that reside within another one. Typically, submodules are used to create nested groups (although not required to create nested groups).” Clarification on the part after "although?" 5. >“Finally, pass the map into the LoadAssembly method. Your modules will automatically be loaded with this dependency map.” Where is this `LoadAssembly` method? 6. ```md >[!NOTE] >Preconditions can be applied to Modules, Groups, or Commands. ``` The docs should mention `ParameterPreconditionAttribute`'s existence. * Update line breaks to comply with docs standard * Change "you should..." to "instead, ..." * Trim trailing spaces * Change "inherits" to "inherit" * Fix Context warning note and add ReplyAsync xref * Fix broken xrefs * Fix [Command Service] xref * Fix consistency between TypeReaders and Preconditions returns * Add missing semi-colons in ServiceProvider sample * Change CommandContext to SocketCommandContext & change variable naming * Cleanup TypeReader section * Wrap [DontInject] in code block * Fix commands docs linking in intro * Improve Getting Started - Installation - Fix character misalignment to comply with docs standard. - Fix image numbering issues by moving the tooltips above some of the steps. - Add codeblocks to search terms like `Discord.Net`. - Remove broken `addons` reference. - Specify `.NET 4.6.1` as `.NET Framework 4.6.1`. - Minor cross-reference cleanup. * Fix Getting Started - Intro - Minor grammartical fixes. - Wrap mentions of the methods, properties, and events in code block. - Replace `Discord.Net` to `Discord.NET`. - Fix steps numbering under `Creating a Discord Bot` and `Adding your bot to a server`. - Change `Task-based Asynchronous Pattern ([TAP])` linking to mark the entire term instead. - Change code block of `Pong!` to quotation mark instead. * Fix cross references in Sending Voice * Mention parameter precondition attribute * Change `Discord.NET` to `Discord.Net` for consistency * Wrap project names in code blocks & minor fixes in Terminology * Change `add-ons` to `addons` for consistency * Fix cross references in Logging * Fix minor grammatical issues in "Working with Events" * Missed a tilda * Remove out-of-date warning in Commands * Minor grammatical fixes for Entities * Fix broken xref in Logging * Adjust service collection sample ...according to https://github.com/RogueException/Discord.Net/pull/826/files/f89aecb7bfa8fe82a541d3bba44d0e37c125d235#r141530227 * Update Command Handler sample - Update Main for C# 7.1. - Inject CommandService and DiscordSocketClient into the service collection. - Add Async suffix to asynchronous methods. * Minor grammatical fixes in Events * Revert 2 incorrect grammar corrections * Revert async Main sample * Add hardcode token notice in sample * Fix missing method for Command Handler * Modify module samples to use SocketCommandContext instead * Emphasize CommandContext and SocketCommandContext * Fix formatting for module sample * Add SocketCommandContext for Groups sample * Remove comma * Fix DepMap sample formatting * Replace [DontInject] with DontInjectAttribute with cross reference * Remove connection logic note There is no reason that this note should still be here since Ready event exists. * Add a new warning message informing the users the existence of CommandService * Make command handler private excellent change
7 years ago
Improve library documentation (#826) * Improve the Command Service documentation The following changes have been added to this PR: • Fix minor grammatical errors. • Capitalize terms such as Commands, Modules and such, as the context is specific to the lib. • Wrap methods and properties in code blocks. The docs page currently has several issues that remains to be fixed. 1. ```md >[!WARNING] >This article is out of date and has not been rewritten yet. Information is not guaranteed to be accurate. ``` The docs doesn't necessarily seem "out of date" as the warning claims. The basics seem pretty relevant to the latest version of the lib. 2. >“To manually load a module, invoke [CommandService.AddModuleAsync], by passing in the generic type of your module and optionally, a dependency map.” The latter part of the sentence seems off. Where should the user pass the dependency map to? It seems to suggest that `AddModuleAsync` has an argument to pass the dependency to. If it is referring to `AddModuleAsync(Type type)`, then I feel like it should be clarified here - or perhaps change the wording of the sentence. 3. >“First, you need to create an @System.IServiceProvider You may create your own IServiceProvider if you wish.” Any mention of @System.IServiceProvider is currently broken on the docs. 4. >“Submodules are Modules that reside within another one. Typically, submodules are used to create nested groups (although not required to create nested groups).” Clarification on the part after "although?" 5. >“Finally, pass the map into the LoadAssembly method. Your modules will automatically be loaded with this dependency map.” Where is this `LoadAssembly` method? 6. ```md >[!NOTE] >Preconditions can be applied to Modules, Groups, or Commands. ``` The docs should mention `ParameterPreconditionAttribute`'s existence. * Update line breaks to comply with docs standard * Change "you should..." to "instead, ..." * Trim trailing spaces * Change "inherits" to "inherit" * Fix Context warning note and add ReplyAsync xref * Fix broken xrefs * Fix [Command Service] xref * Fix consistency between TypeReaders and Preconditions returns * Add missing semi-colons in ServiceProvider sample * Change CommandContext to SocketCommandContext & change variable naming * Cleanup TypeReader section * Wrap [DontInject] in code block * Fix commands docs linking in intro * Improve Getting Started - Installation - Fix character misalignment to comply with docs standard. - Fix image numbering issues by moving the tooltips above some of the steps. - Add codeblocks to search terms like `Discord.Net`. - Remove broken `addons` reference. - Specify `.NET 4.6.1` as `.NET Framework 4.6.1`. - Minor cross-reference cleanup. * Fix Getting Started - Intro - Minor grammartical fixes. - Wrap mentions of the methods, properties, and events in code block. - Replace `Discord.Net` to `Discord.NET`. - Fix steps numbering under `Creating a Discord Bot` and `Adding your bot to a server`. - Change `Task-based Asynchronous Pattern ([TAP])` linking to mark the entire term instead. - Change code block of `Pong!` to quotation mark instead. * Fix cross references in Sending Voice * Mention parameter precondition attribute * Change `Discord.NET` to `Discord.Net` for consistency * Wrap project names in code blocks & minor fixes in Terminology * Change `add-ons` to `addons` for consistency * Fix cross references in Logging * Fix minor grammatical issues in "Working with Events" * Missed a tilda * Remove out-of-date warning in Commands * Minor grammatical fixes for Entities * Fix broken xref in Logging * Adjust service collection sample ...according to https://github.com/RogueException/Discord.Net/pull/826/files/f89aecb7bfa8fe82a541d3bba44d0e37c125d235#r141530227 * Update Command Handler sample - Update Main for C# 7.1. - Inject CommandService and DiscordSocketClient into the service collection. - Add Async suffix to asynchronous methods. * Minor grammatical fixes in Events * Revert 2 incorrect grammar corrections * Revert async Main sample * Add hardcode token notice in sample * Fix missing method for Command Handler * Modify module samples to use SocketCommandContext instead * Emphasize CommandContext and SocketCommandContext * Fix formatting for module sample * Add SocketCommandContext for Groups sample * Remove comma * Fix DepMap sample formatting * Replace [DontInject] with DontInjectAttribute with cross reference * Remove connection logic note There is no reason that this note should still be here since Ready event exists. * Add a new warning message informing the users the existence of CommandService * Make command handler private excellent change
7 years ago
Improve library documentation (#826) * Improve the Command Service documentation The following changes have been added to this PR: • Fix minor grammatical errors. • Capitalize terms such as Commands, Modules and such, as the context is specific to the lib. • Wrap methods and properties in code blocks. The docs page currently has several issues that remains to be fixed. 1. ```md >[!WARNING] >This article is out of date and has not been rewritten yet. Information is not guaranteed to be accurate. ``` The docs doesn't necessarily seem "out of date" as the warning claims. The basics seem pretty relevant to the latest version of the lib. 2. >“To manually load a module, invoke [CommandService.AddModuleAsync], by passing in the generic type of your module and optionally, a dependency map.” The latter part of the sentence seems off. Where should the user pass the dependency map to? It seems to suggest that `AddModuleAsync` has an argument to pass the dependency to. If it is referring to `AddModuleAsync(Type type)`, then I feel like it should be clarified here - or perhaps change the wording of the sentence. 3. >“First, you need to create an @System.IServiceProvider You may create your own IServiceProvider if you wish.” Any mention of @System.IServiceProvider is currently broken on the docs. 4. >“Submodules are Modules that reside within another one. Typically, submodules are used to create nested groups (although not required to create nested groups).” Clarification on the part after "although?" 5. >“Finally, pass the map into the LoadAssembly method. Your modules will automatically be loaded with this dependency map.” Where is this `LoadAssembly` method? 6. ```md >[!NOTE] >Preconditions can be applied to Modules, Groups, or Commands. ``` The docs should mention `ParameterPreconditionAttribute`'s existence. * Update line breaks to comply with docs standard * Change "you should..." to "instead, ..." * Trim trailing spaces * Change "inherits" to "inherit" * Fix Context warning note and add ReplyAsync xref * Fix broken xrefs * Fix [Command Service] xref * Fix consistency between TypeReaders and Preconditions returns * Add missing semi-colons in ServiceProvider sample * Change CommandContext to SocketCommandContext & change variable naming * Cleanup TypeReader section * Wrap [DontInject] in code block * Fix commands docs linking in intro * Improve Getting Started - Installation - Fix character misalignment to comply with docs standard. - Fix image numbering issues by moving the tooltips above some of the steps. - Add codeblocks to search terms like `Discord.Net`. - Remove broken `addons` reference. - Specify `.NET 4.6.1` as `.NET Framework 4.6.1`. - Minor cross-reference cleanup. * Fix Getting Started - Intro - Minor grammartical fixes. - Wrap mentions of the methods, properties, and events in code block. - Replace `Discord.Net` to `Discord.NET`. - Fix steps numbering under `Creating a Discord Bot` and `Adding your bot to a server`. - Change `Task-based Asynchronous Pattern ([TAP])` linking to mark the entire term instead. - Change code block of `Pong!` to quotation mark instead. * Fix cross references in Sending Voice * Mention parameter precondition attribute * Change `Discord.NET` to `Discord.Net` for consistency * Wrap project names in code blocks & minor fixes in Terminology * Change `add-ons` to `addons` for consistency * Fix cross references in Logging * Fix minor grammatical issues in "Working with Events" * Missed a tilda * Remove out-of-date warning in Commands * Minor grammatical fixes for Entities * Fix broken xref in Logging * Adjust service collection sample ...according to https://github.com/RogueException/Discord.Net/pull/826/files/f89aecb7bfa8fe82a541d3bba44d0e37c125d235#r141530227 * Update Command Handler sample - Update Main for C# 7.1. - Inject CommandService and DiscordSocketClient into the service collection. - Add Async suffix to asynchronous methods. * Minor grammatical fixes in Events * Revert 2 incorrect grammar corrections * Revert async Main sample * Add hardcode token notice in sample * Fix missing method for Command Handler * Modify module samples to use SocketCommandContext instead * Emphasize CommandContext and SocketCommandContext * Fix formatting for module sample * Add SocketCommandContext for Groups sample * Remove comma * Fix DepMap sample formatting * Replace [DontInject] with DontInjectAttribute with cross reference * Remove connection logic note There is no reason that this note should still be here since Ready event exists. * Add a new warning message informing the users the existence of CommandService * Make command handler private excellent change
7 years ago
Improve library documentation (#826) * Improve the Command Service documentation The following changes have been added to this PR: • Fix minor grammatical errors. • Capitalize terms such as Commands, Modules and such, as the context is specific to the lib. • Wrap methods and properties in code blocks. The docs page currently has several issues that remains to be fixed. 1. ```md >[!WARNING] >This article is out of date and has not been rewritten yet. Information is not guaranteed to be accurate. ``` The docs doesn't necessarily seem "out of date" as the warning claims. The basics seem pretty relevant to the latest version of the lib. 2. >“To manually load a module, invoke [CommandService.AddModuleAsync], by passing in the generic type of your module and optionally, a dependency map.” The latter part of the sentence seems off. Where should the user pass the dependency map to? It seems to suggest that `AddModuleAsync` has an argument to pass the dependency to. If it is referring to `AddModuleAsync(Type type)`, then I feel like it should be clarified here - or perhaps change the wording of the sentence. 3. >“First, you need to create an @System.IServiceProvider You may create your own IServiceProvider if you wish.” Any mention of @System.IServiceProvider is currently broken on the docs. 4. >“Submodules are Modules that reside within another one. Typically, submodules are used to create nested groups (although not required to create nested groups).” Clarification on the part after "although?" 5. >“Finally, pass the map into the LoadAssembly method. Your modules will automatically be loaded with this dependency map.” Where is this `LoadAssembly` method? 6. ```md >[!NOTE] >Preconditions can be applied to Modules, Groups, or Commands. ``` The docs should mention `ParameterPreconditionAttribute`'s existence. * Update line breaks to comply with docs standard * Change "you should..." to "instead, ..." * Trim trailing spaces * Change "inherits" to "inherit" * Fix Context warning note and add ReplyAsync xref * Fix broken xrefs * Fix [Command Service] xref * Fix consistency between TypeReaders and Preconditions returns * Add missing semi-colons in ServiceProvider sample * Change CommandContext to SocketCommandContext & change variable naming * Cleanup TypeReader section * Wrap [DontInject] in code block * Fix commands docs linking in intro * Improve Getting Started - Installation - Fix character misalignment to comply with docs standard. - Fix image numbering issues by moving the tooltips above some of the steps. - Add codeblocks to search terms like `Discord.Net`. - Remove broken `addons` reference. - Specify `.NET 4.6.1` as `.NET Framework 4.6.1`. - Minor cross-reference cleanup. * Fix Getting Started - Intro - Minor grammartical fixes. - Wrap mentions of the methods, properties, and events in code block. - Replace `Discord.Net` to `Discord.NET`. - Fix steps numbering under `Creating a Discord Bot` and `Adding your bot to a server`. - Change `Task-based Asynchronous Pattern ([TAP])` linking to mark the entire term instead. - Change code block of `Pong!` to quotation mark instead. * Fix cross references in Sending Voice * Mention parameter precondition attribute * Change `Discord.NET` to `Discord.Net` for consistency * Wrap project names in code blocks & minor fixes in Terminology * Change `add-ons` to `addons` for consistency * Fix cross references in Logging * Fix minor grammatical issues in "Working with Events" * Missed a tilda * Remove out-of-date warning in Commands * Minor grammatical fixes for Entities * Fix broken xref in Logging * Adjust service collection sample ...according to https://github.com/RogueException/Discord.Net/pull/826/files/f89aecb7bfa8fe82a541d3bba44d0e37c125d235#r141530227 * Update Command Handler sample - Update Main for C# 7.1. - Inject CommandService and DiscordSocketClient into the service collection. - Add Async suffix to asynchronous methods. * Minor grammatical fixes in Events * Revert 2 incorrect grammar corrections * Revert async Main sample * Add hardcode token notice in sample * Fix missing method for Command Handler * Modify module samples to use SocketCommandContext instead * Emphasize CommandContext and SocketCommandContext * Fix formatting for module sample * Add SocketCommandContext for Groups sample * Remove comma * Fix DepMap sample formatting * Replace [DontInject] with DontInjectAttribute with cross reference * Remove connection logic note There is no reason that this note should still be here since Ready event exists. * Add a new warning message informing the users the existence of CommandService * Make command handler private excellent change
7 years ago
Improve library documentation (#826) * Improve the Command Service documentation The following changes have been added to this PR: • Fix minor grammatical errors. • Capitalize terms such as Commands, Modules and such, as the context is specific to the lib. • Wrap methods and properties in code blocks. The docs page currently has several issues that remains to be fixed. 1. ```md >[!WARNING] >This article is out of date and has not been rewritten yet. Information is not guaranteed to be accurate. ``` The docs doesn't necessarily seem "out of date" as the warning claims. The basics seem pretty relevant to the latest version of the lib. 2. >“To manually load a module, invoke [CommandService.AddModuleAsync], by passing in the generic type of your module and optionally, a dependency map.” The latter part of the sentence seems off. Where should the user pass the dependency map to? It seems to suggest that `AddModuleAsync` has an argument to pass the dependency to. If it is referring to `AddModuleAsync(Type type)`, then I feel like it should be clarified here - or perhaps change the wording of the sentence. 3. >“First, you need to create an @System.IServiceProvider You may create your own IServiceProvider if you wish.” Any mention of @System.IServiceProvider is currently broken on the docs. 4. >“Submodules are Modules that reside within another one. Typically, submodules are used to create nested groups (although not required to create nested groups).” Clarification on the part after "although?" 5. >“Finally, pass the map into the LoadAssembly method. Your modules will automatically be loaded with this dependency map.” Where is this `LoadAssembly` method? 6. ```md >[!NOTE] >Preconditions can be applied to Modules, Groups, or Commands. ``` The docs should mention `ParameterPreconditionAttribute`'s existence. * Update line breaks to comply with docs standard * Change "you should..." to "instead, ..." * Trim trailing spaces * Change "inherits" to "inherit" * Fix Context warning note and add ReplyAsync xref * Fix broken xrefs * Fix [Command Service] xref * Fix consistency between TypeReaders and Preconditions returns * Add missing semi-colons in ServiceProvider sample * Change CommandContext to SocketCommandContext & change variable naming * Cleanup TypeReader section * Wrap [DontInject] in code block * Fix commands docs linking in intro * Improve Getting Started - Installation - Fix character misalignment to comply with docs standard. - Fix image numbering issues by moving the tooltips above some of the steps. - Add codeblocks to search terms like `Discord.Net`. - Remove broken `addons` reference. - Specify `.NET 4.6.1` as `.NET Framework 4.6.1`. - Minor cross-reference cleanup. * Fix Getting Started - Intro - Minor grammartical fixes. - Wrap mentions of the methods, properties, and events in code block. - Replace `Discord.Net` to `Discord.NET`. - Fix steps numbering under `Creating a Discord Bot` and `Adding your bot to a server`. - Change `Task-based Asynchronous Pattern ([TAP])` linking to mark the entire term instead. - Change code block of `Pong!` to quotation mark instead. * Fix cross references in Sending Voice * Mention parameter precondition attribute * Change `Discord.NET` to `Discord.Net` for consistency * Wrap project names in code blocks & minor fixes in Terminology * Change `add-ons` to `addons` for consistency * Fix cross references in Logging * Fix minor grammatical issues in "Working with Events" * Missed a tilda * Remove out-of-date warning in Commands * Minor grammatical fixes for Entities * Fix broken xref in Logging * Adjust service collection sample ...according to https://github.com/RogueException/Discord.Net/pull/826/files/f89aecb7bfa8fe82a541d3bba44d0e37c125d235#r141530227 * Update Command Handler sample - Update Main for C# 7.1. - Inject CommandService and DiscordSocketClient into the service collection. - Add Async suffix to asynchronous methods. * Minor grammatical fixes in Events * Revert 2 incorrect grammar corrections * Revert async Main sample * Add hardcode token notice in sample * Fix missing method for Command Handler * Modify module samples to use SocketCommandContext instead * Emphasize CommandContext and SocketCommandContext * Fix formatting for module sample * Add SocketCommandContext for Groups sample * Remove comma * Fix DepMap sample formatting * Replace [DontInject] with DontInjectAttribute with cross reference * Remove connection logic note There is no reason that this note should still be here since Ready event exists. * Add a new warning message informing the users the existence of CommandService * Make command handler private excellent change
7 years ago
Improve library documentation (#826) * Improve the Command Service documentation The following changes have been added to this PR: • Fix minor grammatical errors. • Capitalize terms such as Commands, Modules and such, as the context is specific to the lib. • Wrap methods and properties in code blocks. The docs page currently has several issues that remains to be fixed. 1. ```md >[!WARNING] >This article is out of date and has not been rewritten yet. Information is not guaranteed to be accurate. ``` The docs doesn't necessarily seem "out of date" as the warning claims. The basics seem pretty relevant to the latest version of the lib. 2. >“To manually load a module, invoke [CommandService.AddModuleAsync], by passing in the generic type of your module and optionally, a dependency map.” The latter part of the sentence seems off. Where should the user pass the dependency map to? It seems to suggest that `AddModuleAsync` has an argument to pass the dependency to. If it is referring to `AddModuleAsync(Type type)`, then I feel like it should be clarified here - or perhaps change the wording of the sentence. 3. >“First, you need to create an @System.IServiceProvider You may create your own IServiceProvider if you wish.” Any mention of @System.IServiceProvider is currently broken on the docs. 4. >“Submodules are Modules that reside within another one. Typically, submodules are used to create nested groups (although not required to create nested groups).” Clarification on the part after "although?" 5. >“Finally, pass the map into the LoadAssembly method. Your modules will automatically be loaded with this dependency map.” Where is this `LoadAssembly` method? 6. ```md >[!NOTE] >Preconditions can be applied to Modules, Groups, or Commands. ``` The docs should mention `ParameterPreconditionAttribute`'s existence. * Update line breaks to comply with docs standard * Change "you should..." to "instead, ..." * Trim trailing spaces * Change "inherits" to "inherit" * Fix Context warning note and add ReplyAsync xref * Fix broken xrefs * Fix [Command Service] xref * Fix consistency between TypeReaders and Preconditions returns * Add missing semi-colons in ServiceProvider sample * Change CommandContext to SocketCommandContext & change variable naming * Cleanup TypeReader section * Wrap [DontInject] in code block * Fix commands docs linking in intro * Improve Getting Started - Installation - Fix character misalignment to comply with docs standard. - Fix image numbering issues by moving the tooltips above some of the steps. - Add codeblocks to search terms like `Discord.Net`. - Remove broken `addons` reference. - Specify `.NET 4.6.1` as `.NET Framework 4.6.1`. - Minor cross-reference cleanup. * Fix Getting Started - Intro - Minor grammartical fixes. - Wrap mentions of the methods, properties, and events in code block. - Replace `Discord.Net` to `Discord.NET`. - Fix steps numbering under `Creating a Discord Bot` and `Adding your bot to a server`. - Change `Task-based Asynchronous Pattern ([TAP])` linking to mark the entire term instead. - Change code block of `Pong!` to quotation mark instead. * Fix cross references in Sending Voice * Mention parameter precondition attribute * Change `Discord.NET` to `Discord.Net` for consistency * Wrap project names in code blocks & minor fixes in Terminology * Change `add-ons` to `addons` for consistency * Fix cross references in Logging * Fix minor grammatical issues in "Working with Events" * Missed a tilda * Remove out-of-date warning in Commands * Minor grammatical fixes for Entities * Fix broken xref in Logging * Adjust service collection sample ...according to https://github.com/RogueException/Discord.Net/pull/826/files/f89aecb7bfa8fe82a541d3bba44d0e37c125d235#r141530227 * Update Command Handler sample - Update Main for C# 7.1. - Inject CommandService and DiscordSocketClient into the service collection. - Add Async suffix to asynchronous methods. * Minor grammatical fixes in Events * Revert 2 incorrect grammar corrections * Revert async Main sample * Add hardcode token notice in sample * Fix missing method for Command Handler * Modify module samples to use SocketCommandContext instead * Emphasize CommandContext and SocketCommandContext * Fix formatting for module sample * Add SocketCommandContext for Groups sample * Remove comma * Fix DepMap sample formatting * Replace [DontInject] with DontInjectAttribute with cross reference * Remove connection logic note There is no reason that this note should still be here since Ready event exists. * Add a new warning message informing the users the existence of CommandService * Make command handler private excellent change
7 years ago
Improve library documentation (#826) * Improve the Command Service documentation The following changes have been added to this PR: • Fix minor grammatical errors. • Capitalize terms such as Commands, Modules and such, as the context is specific to the lib. • Wrap methods and properties in code blocks. The docs page currently has several issues that remains to be fixed. 1. ```md >[!WARNING] >This article is out of date and has not been rewritten yet. Information is not guaranteed to be accurate. ``` The docs doesn't necessarily seem "out of date" as the warning claims. The basics seem pretty relevant to the latest version of the lib. 2. >“To manually load a module, invoke [CommandService.AddModuleAsync], by passing in the generic type of your module and optionally, a dependency map.” The latter part of the sentence seems off. Where should the user pass the dependency map to? It seems to suggest that `AddModuleAsync` has an argument to pass the dependency to. If it is referring to `AddModuleAsync(Type type)`, then I feel like it should be clarified here - or perhaps change the wording of the sentence. 3. >“First, you need to create an @System.IServiceProvider You may create your own IServiceProvider if you wish.” Any mention of @System.IServiceProvider is currently broken on the docs. 4. >“Submodules are Modules that reside within another one. Typically, submodules are used to create nested groups (although not required to create nested groups).” Clarification on the part after "although?" 5. >“Finally, pass the map into the LoadAssembly method. Your modules will automatically be loaded with this dependency map.” Where is this `LoadAssembly` method? 6. ```md >[!NOTE] >Preconditions can be applied to Modules, Groups, or Commands. ``` The docs should mention `ParameterPreconditionAttribute`'s existence. * Update line breaks to comply with docs standard * Change "you should..." to "instead, ..." * Trim trailing spaces * Change "inherits" to "inherit" * Fix Context warning note and add ReplyAsync xref * Fix broken xrefs * Fix [Command Service] xref * Fix consistency between TypeReaders and Preconditions returns * Add missing semi-colons in ServiceProvider sample * Change CommandContext to SocketCommandContext & change variable naming * Cleanup TypeReader section * Wrap [DontInject] in code block * Fix commands docs linking in intro * Improve Getting Started - Installation - Fix character misalignment to comply with docs standard. - Fix image numbering issues by moving the tooltips above some of the steps. - Add codeblocks to search terms like `Discord.Net`. - Remove broken `addons` reference. - Specify `.NET 4.6.1` as `.NET Framework 4.6.1`. - Minor cross-reference cleanup. * Fix Getting Started - Intro - Minor grammartical fixes. - Wrap mentions of the methods, properties, and events in code block. - Replace `Discord.Net` to `Discord.NET`. - Fix steps numbering under `Creating a Discord Bot` and `Adding your bot to a server`. - Change `Task-based Asynchronous Pattern ([TAP])` linking to mark the entire term instead. - Change code block of `Pong!` to quotation mark instead. * Fix cross references in Sending Voice * Mention parameter precondition attribute * Change `Discord.NET` to `Discord.Net` for consistency * Wrap project names in code blocks & minor fixes in Terminology * Change `add-ons` to `addons` for consistency * Fix cross references in Logging * Fix minor grammatical issues in "Working with Events" * Missed a tilda * Remove out-of-date warning in Commands * Minor grammatical fixes for Entities * Fix broken xref in Logging * Adjust service collection sample ...according to https://github.com/RogueException/Discord.Net/pull/826/files/f89aecb7bfa8fe82a541d3bba44d0e37c125d235#r141530227 * Update Command Handler sample - Update Main for C# 7.1. - Inject CommandService and DiscordSocketClient into the service collection. - Add Async suffix to asynchronous methods. * Minor grammatical fixes in Events * Revert 2 incorrect grammar corrections * Revert async Main sample * Add hardcode token notice in sample * Fix missing method for Command Handler * Modify module samples to use SocketCommandContext instead * Emphasize CommandContext and SocketCommandContext * Fix formatting for module sample * Add SocketCommandContext for Groups sample * Remove comma * Fix DepMap sample formatting * Replace [DontInject] with DontInjectAttribute with cross reference * Remove connection logic note There is no reason that this note should still be here since Ready event exists. * Add a new warning message informing the users the existence of CommandService * Make command handler private excellent change
7 years ago
Improve library documentation (#826) * Improve the Command Service documentation The following changes have been added to this PR: • Fix minor grammatical errors. • Capitalize terms such as Commands, Modules and such, as the context is specific to the lib. • Wrap methods and properties in code blocks. The docs page currently has several issues that remains to be fixed. 1. ```md >[!WARNING] >This article is out of date and has not been rewritten yet. Information is not guaranteed to be accurate. ``` The docs doesn't necessarily seem "out of date" as the warning claims. The basics seem pretty relevant to the latest version of the lib. 2. >“To manually load a module, invoke [CommandService.AddModuleAsync], by passing in the generic type of your module and optionally, a dependency map.” The latter part of the sentence seems off. Where should the user pass the dependency map to? It seems to suggest that `AddModuleAsync` has an argument to pass the dependency to. If it is referring to `AddModuleAsync(Type type)`, then I feel like it should be clarified here - or perhaps change the wording of the sentence. 3. >“First, you need to create an @System.IServiceProvider You may create your own IServiceProvider if you wish.” Any mention of @System.IServiceProvider is currently broken on the docs. 4. >“Submodules are Modules that reside within another one. Typically, submodules are used to create nested groups (although not required to create nested groups).” Clarification on the part after "although?" 5. >“Finally, pass the map into the LoadAssembly method. Your modules will automatically be loaded with this dependency map.” Where is this `LoadAssembly` method? 6. ```md >[!NOTE] >Preconditions can be applied to Modules, Groups, or Commands. ``` The docs should mention `ParameterPreconditionAttribute`'s existence. * Update line breaks to comply with docs standard * Change "you should..." to "instead, ..." * Trim trailing spaces * Change "inherits" to "inherit" * Fix Context warning note and add ReplyAsync xref * Fix broken xrefs * Fix [Command Service] xref * Fix consistency between TypeReaders and Preconditions returns * Add missing semi-colons in ServiceProvider sample * Change CommandContext to SocketCommandContext & change variable naming * Cleanup TypeReader section * Wrap [DontInject] in code block * Fix commands docs linking in intro * Improve Getting Started - Installation - Fix character misalignment to comply with docs standard. - Fix image numbering issues by moving the tooltips above some of the steps. - Add codeblocks to search terms like `Discord.Net`. - Remove broken `addons` reference. - Specify `.NET 4.6.1` as `.NET Framework 4.6.1`. - Minor cross-reference cleanup. * Fix Getting Started - Intro - Minor grammartical fixes. - Wrap mentions of the methods, properties, and events in code block. - Replace `Discord.Net` to `Discord.NET`. - Fix steps numbering under `Creating a Discord Bot` and `Adding your bot to a server`. - Change `Task-based Asynchronous Pattern ([TAP])` linking to mark the entire term instead. - Change code block of `Pong!` to quotation mark instead. * Fix cross references in Sending Voice * Mention parameter precondition attribute * Change `Discord.NET` to `Discord.Net` for consistency * Wrap project names in code blocks & minor fixes in Terminology * Change `add-ons` to `addons` for consistency * Fix cross references in Logging * Fix minor grammatical issues in "Working with Events" * Missed a tilda * Remove out-of-date warning in Commands * Minor grammatical fixes for Entities * Fix broken xref in Logging * Adjust service collection sample ...according to https://github.com/RogueException/Discord.Net/pull/826/files/f89aecb7bfa8fe82a541d3bba44d0e37c125d235#r141530227 * Update Command Handler sample - Update Main for C# 7.1. - Inject CommandService and DiscordSocketClient into the service collection. - Add Async suffix to asynchronous methods. * Minor grammatical fixes in Events * Revert 2 incorrect grammar corrections * Revert async Main sample * Add hardcode token notice in sample * Fix missing method for Command Handler * Modify module samples to use SocketCommandContext instead * Emphasize CommandContext and SocketCommandContext * Fix formatting for module sample * Add SocketCommandContext for Groups sample * Remove comma * Fix DepMap sample formatting * Replace [DontInject] with DontInjectAttribute with cross reference * Remove connection logic note There is no reason that this note should still be here since Ready event exists. * Add a new warning message informing the users the existence of CommandService * Make command handler private excellent change
7 years ago
Improve library documentation (#826) * Improve the Command Service documentation The following changes have been added to this PR: • Fix minor grammatical errors. • Capitalize terms such as Commands, Modules and such, as the context is specific to the lib. • Wrap methods and properties in code blocks. The docs page currently has several issues that remains to be fixed. 1. ```md >[!WARNING] >This article is out of date and has not been rewritten yet. Information is not guaranteed to be accurate. ``` The docs doesn't necessarily seem "out of date" as the warning claims. The basics seem pretty relevant to the latest version of the lib. 2. >“To manually load a module, invoke [CommandService.AddModuleAsync], by passing in the generic type of your module and optionally, a dependency map.” The latter part of the sentence seems off. Where should the user pass the dependency map to? It seems to suggest that `AddModuleAsync` has an argument to pass the dependency to. If it is referring to `AddModuleAsync(Type type)`, then I feel like it should be clarified here - or perhaps change the wording of the sentence. 3. >“First, you need to create an @System.IServiceProvider You may create your own IServiceProvider if you wish.” Any mention of @System.IServiceProvider is currently broken on the docs. 4. >“Submodules are Modules that reside within another one. Typically, submodules are used to create nested groups (although not required to create nested groups).” Clarification on the part after "although?" 5. >“Finally, pass the map into the LoadAssembly method. Your modules will automatically be loaded with this dependency map.” Where is this `LoadAssembly` method? 6. ```md >[!NOTE] >Preconditions can be applied to Modules, Groups, or Commands. ``` The docs should mention `ParameterPreconditionAttribute`'s existence. * Update line breaks to comply with docs standard * Change "you should..." to "instead, ..." * Trim trailing spaces * Change "inherits" to "inherit" * Fix Context warning note and add ReplyAsync xref * Fix broken xrefs * Fix [Command Service] xref * Fix consistency between TypeReaders and Preconditions returns * Add missing semi-colons in ServiceProvider sample * Change CommandContext to SocketCommandContext & change variable naming * Cleanup TypeReader section * Wrap [DontInject] in code block * Fix commands docs linking in intro * Improve Getting Started - Installation - Fix character misalignment to comply with docs standard. - Fix image numbering issues by moving the tooltips above some of the steps. - Add codeblocks to search terms like `Discord.Net`. - Remove broken `addons` reference. - Specify `.NET 4.6.1` as `.NET Framework 4.6.1`. - Minor cross-reference cleanup. * Fix Getting Started - Intro - Minor grammartical fixes. - Wrap mentions of the methods, properties, and events in code block. - Replace `Discord.Net` to `Discord.NET`. - Fix steps numbering under `Creating a Discord Bot` and `Adding your bot to a server`. - Change `Task-based Asynchronous Pattern ([TAP])` linking to mark the entire term instead. - Change code block of `Pong!` to quotation mark instead. * Fix cross references in Sending Voice * Mention parameter precondition attribute * Change `Discord.NET` to `Discord.Net` for consistency * Wrap project names in code blocks & minor fixes in Terminology * Change `add-ons` to `addons` for consistency * Fix cross references in Logging * Fix minor grammatical issues in "Working with Events" * Missed a tilda * Remove out-of-date warning in Commands * Minor grammatical fixes for Entities * Fix broken xref in Logging * Adjust service collection sample ...according to https://github.com/RogueException/Discord.Net/pull/826/files/f89aecb7bfa8fe82a541d3bba44d0e37c125d235#r141530227 * Update Command Handler sample - Update Main for C# 7.1. - Inject CommandService and DiscordSocketClient into the service collection. - Add Async suffix to asynchronous methods. * Minor grammatical fixes in Events * Revert 2 incorrect grammar corrections * Revert async Main sample * Add hardcode token notice in sample * Fix missing method for Command Handler * Modify module samples to use SocketCommandContext instead * Emphasize CommandContext and SocketCommandContext * Fix formatting for module sample * Add SocketCommandContext for Groups sample * Remove comma * Fix DepMap sample formatting * Replace [DontInject] with DontInjectAttribute with cross reference * Remove connection logic note There is no reason that this note should still be here since Ready event exists. * Add a new warning message informing the users the existence of CommandService * Make command handler private excellent change
7 years ago
Improve library documentation (#826) * Improve the Command Service documentation The following changes have been added to this PR: • Fix minor grammatical errors. • Capitalize terms such as Commands, Modules and such, as the context is specific to the lib. • Wrap methods and properties in code blocks. The docs page currently has several issues that remains to be fixed. 1. ```md >[!WARNING] >This article is out of date and has not been rewritten yet. Information is not guaranteed to be accurate. ``` The docs doesn't necessarily seem "out of date" as the warning claims. The basics seem pretty relevant to the latest version of the lib. 2. >“To manually load a module, invoke [CommandService.AddModuleAsync], by passing in the generic type of your module and optionally, a dependency map.” The latter part of the sentence seems off. Where should the user pass the dependency map to? It seems to suggest that `AddModuleAsync` has an argument to pass the dependency to. If it is referring to `AddModuleAsync(Type type)`, then I feel like it should be clarified here - or perhaps change the wording of the sentence. 3. >“First, you need to create an @System.IServiceProvider You may create your own IServiceProvider if you wish.” Any mention of @System.IServiceProvider is currently broken on the docs. 4. >“Submodules are Modules that reside within another one. Typically, submodules are used to create nested groups (although not required to create nested groups).” Clarification on the part after "although?" 5. >“Finally, pass the map into the LoadAssembly method. Your modules will automatically be loaded with this dependency map.” Where is this `LoadAssembly` method? 6. ```md >[!NOTE] >Preconditions can be applied to Modules, Groups, or Commands. ``` The docs should mention `ParameterPreconditionAttribute`'s existence. * Update line breaks to comply with docs standard * Change "you should..." to "instead, ..." * Trim trailing spaces * Change "inherits" to "inherit" * Fix Context warning note and add ReplyAsync xref * Fix broken xrefs * Fix [Command Service] xref * Fix consistency between TypeReaders and Preconditions returns * Add missing semi-colons in ServiceProvider sample * Change CommandContext to SocketCommandContext & change variable naming * Cleanup TypeReader section * Wrap [DontInject] in code block * Fix commands docs linking in intro * Improve Getting Started - Installation - Fix character misalignment to comply with docs standard. - Fix image numbering issues by moving the tooltips above some of the steps. - Add codeblocks to search terms like `Discord.Net`. - Remove broken `addons` reference. - Specify `.NET 4.6.1` as `.NET Framework 4.6.1`. - Minor cross-reference cleanup. * Fix Getting Started - Intro - Minor grammartical fixes. - Wrap mentions of the methods, properties, and events in code block. - Replace `Discord.Net` to `Discord.NET`. - Fix steps numbering under `Creating a Discord Bot` and `Adding your bot to a server`. - Change `Task-based Asynchronous Pattern ([TAP])` linking to mark the entire term instead. - Change code block of `Pong!` to quotation mark instead. * Fix cross references in Sending Voice * Mention parameter precondition attribute * Change `Discord.NET` to `Discord.Net` for consistency * Wrap project names in code blocks & minor fixes in Terminology * Change `add-ons` to `addons` for consistency * Fix cross references in Logging * Fix minor grammatical issues in "Working with Events" * Missed a tilda * Remove out-of-date warning in Commands * Minor grammatical fixes for Entities * Fix broken xref in Logging * Adjust service collection sample ...according to https://github.com/RogueException/Discord.Net/pull/826/files/f89aecb7bfa8fe82a541d3bba44d0e37c125d235#r141530227 * Update Command Handler sample - Update Main for C# 7.1. - Inject CommandService and DiscordSocketClient into the service collection. - Add Async suffix to asynchronous methods. * Minor grammatical fixes in Events * Revert 2 incorrect grammar corrections * Revert async Main sample * Add hardcode token notice in sample * Fix missing method for Command Handler * Modify module samples to use SocketCommandContext instead * Emphasize CommandContext and SocketCommandContext * Fix formatting for module sample * Add SocketCommandContext for Groups sample * Remove comma * Fix DepMap sample formatting * Replace [DontInject] with DontInjectAttribute with cross reference * Remove connection logic note There is no reason that this note should still be here since Ready event exists. * Add a new warning message informing the users the existence of CommandService * Make command handler private excellent change
7 years ago
Improve library documentation (#826) * Improve the Command Service documentation The following changes have been added to this PR: • Fix minor grammatical errors. • Capitalize terms such as Commands, Modules and such, as the context is specific to the lib. • Wrap methods and properties in code blocks. The docs page currently has several issues that remains to be fixed. 1. ```md >[!WARNING] >This article is out of date and has not been rewritten yet. Information is not guaranteed to be accurate. ``` The docs doesn't necessarily seem "out of date" as the warning claims. The basics seem pretty relevant to the latest version of the lib. 2. >“To manually load a module, invoke [CommandService.AddModuleAsync], by passing in the generic type of your module and optionally, a dependency map.” The latter part of the sentence seems off. Where should the user pass the dependency map to? It seems to suggest that `AddModuleAsync` has an argument to pass the dependency to. If it is referring to `AddModuleAsync(Type type)`, then I feel like it should be clarified here - or perhaps change the wording of the sentence. 3. >“First, you need to create an @System.IServiceProvider You may create your own IServiceProvider if you wish.” Any mention of @System.IServiceProvider is currently broken on the docs. 4. >“Submodules are Modules that reside within another one. Typically, submodules are used to create nested groups (although not required to create nested groups).” Clarification on the part after "although?" 5. >“Finally, pass the map into the LoadAssembly method. Your modules will automatically be loaded with this dependency map.” Where is this `LoadAssembly` method? 6. ```md >[!NOTE] >Preconditions can be applied to Modules, Groups, or Commands. ``` The docs should mention `ParameterPreconditionAttribute`'s existence. * Update line breaks to comply with docs standard * Change "you should..." to "instead, ..." * Trim trailing spaces * Change "inherits" to "inherit" * Fix Context warning note and add ReplyAsync xref * Fix broken xrefs * Fix [Command Service] xref * Fix consistency between TypeReaders and Preconditions returns * Add missing semi-colons in ServiceProvider sample * Change CommandContext to SocketCommandContext & change variable naming * Cleanup TypeReader section * Wrap [DontInject] in code block * Fix commands docs linking in intro * Improve Getting Started - Installation - Fix character misalignment to comply with docs standard. - Fix image numbering issues by moving the tooltips above some of the steps. - Add codeblocks to search terms like `Discord.Net`. - Remove broken `addons` reference. - Specify `.NET 4.6.1` as `.NET Framework 4.6.1`. - Minor cross-reference cleanup. * Fix Getting Started - Intro - Minor grammartical fixes. - Wrap mentions of the methods, properties, and events in code block. - Replace `Discord.Net` to `Discord.NET`. - Fix steps numbering under `Creating a Discord Bot` and `Adding your bot to a server`. - Change `Task-based Asynchronous Pattern ([TAP])` linking to mark the entire term instead. - Change code block of `Pong!` to quotation mark instead. * Fix cross references in Sending Voice * Mention parameter precondition attribute * Change `Discord.NET` to `Discord.Net` for consistency * Wrap project names in code blocks & minor fixes in Terminology * Change `add-ons` to `addons` for consistency * Fix cross references in Logging * Fix minor grammatical issues in "Working with Events" * Missed a tilda * Remove out-of-date warning in Commands * Minor grammatical fixes for Entities * Fix broken xref in Logging * Adjust service collection sample ...according to https://github.com/RogueException/Discord.Net/pull/826/files/f89aecb7bfa8fe82a541d3bba44d0e37c125d235#r141530227 * Update Command Handler sample - Update Main for C# 7.1. - Inject CommandService and DiscordSocketClient into the service collection. - Add Async suffix to asynchronous methods. * Minor grammatical fixes in Events * Revert 2 incorrect grammar corrections * Revert async Main sample * Add hardcode token notice in sample * Fix missing method for Command Handler * Modify module samples to use SocketCommandContext instead * Emphasize CommandContext and SocketCommandContext * Fix formatting for module sample * Add SocketCommandContext for Groups sample * Remove comma * Fix DepMap sample formatting * Replace [DontInject] with DontInjectAttribute with cross reference * Remove connection logic note There is no reason that this note should still be here since Ready event exists. * Add a new warning message informing the users the existence of CommandService * Make command handler private excellent change
7 years ago
Improve library documentation (#826) * Improve the Command Service documentation The following changes have been added to this PR: • Fix minor grammatical errors. • Capitalize terms such as Commands, Modules and such, as the context is specific to the lib. • Wrap methods and properties in code blocks. The docs page currently has several issues that remains to be fixed. 1. ```md >[!WARNING] >This article is out of date and has not been rewritten yet. Information is not guaranteed to be accurate. ``` The docs doesn't necessarily seem "out of date" as the warning claims. The basics seem pretty relevant to the latest version of the lib. 2. >“To manually load a module, invoke [CommandService.AddModuleAsync], by passing in the generic type of your module and optionally, a dependency map.” The latter part of the sentence seems off. Where should the user pass the dependency map to? It seems to suggest that `AddModuleAsync` has an argument to pass the dependency to. If it is referring to `AddModuleAsync(Type type)`, then I feel like it should be clarified here - or perhaps change the wording of the sentence. 3. >“First, you need to create an @System.IServiceProvider You may create your own IServiceProvider if you wish.” Any mention of @System.IServiceProvider is currently broken on the docs. 4. >“Submodules are Modules that reside within another one. Typically, submodules are used to create nested groups (although not required to create nested groups).” Clarification on the part after "although?" 5. >“Finally, pass the map into the LoadAssembly method. Your modules will automatically be loaded with this dependency map.” Where is this `LoadAssembly` method? 6. ```md >[!NOTE] >Preconditions can be applied to Modules, Groups, or Commands. ``` The docs should mention `ParameterPreconditionAttribute`'s existence. * Update line breaks to comply with docs standard * Change "you should..." to "instead, ..." * Trim trailing spaces * Change "inherits" to "inherit" * Fix Context warning note and add ReplyAsync xref * Fix broken xrefs * Fix [Command Service] xref * Fix consistency between TypeReaders and Preconditions returns * Add missing semi-colons in ServiceProvider sample * Change CommandContext to SocketCommandContext & change variable naming * Cleanup TypeReader section * Wrap [DontInject] in code block * Fix commands docs linking in intro * Improve Getting Started - Installation - Fix character misalignment to comply with docs standard. - Fix image numbering issues by moving the tooltips above some of the steps. - Add codeblocks to search terms like `Discord.Net`. - Remove broken `addons` reference. - Specify `.NET 4.6.1` as `.NET Framework 4.6.1`. - Minor cross-reference cleanup. * Fix Getting Started - Intro - Minor grammartical fixes. - Wrap mentions of the methods, properties, and events in code block. - Replace `Discord.Net` to `Discord.NET`. - Fix steps numbering under `Creating a Discord Bot` and `Adding your bot to a server`. - Change `Task-based Asynchronous Pattern ([TAP])` linking to mark the entire term instead. - Change code block of `Pong!` to quotation mark instead. * Fix cross references in Sending Voice * Mention parameter precondition attribute * Change `Discord.NET` to `Discord.Net` for consistency * Wrap project names in code blocks & minor fixes in Terminology * Change `add-ons` to `addons` for consistency * Fix cross references in Logging * Fix minor grammatical issues in "Working with Events" * Missed a tilda * Remove out-of-date warning in Commands * Minor grammatical fixes for Entities * Fix broken xref in Logging * Adjust service collection sample ...according to https://github.com/RogueException/Discord.Net/pull/826/files/f89aecb7bfa8fe82a541d3bba44d0e37c125d235#r141530227 * Update Command Handler sample - Update Main for C# 7.1. - Inject CommandService and DiscordSocketClient into the service collection. - Add Async suffix to asynchronous methods. * Minor grammatical fixes in Events * Revert 2 incorrect grammar corrections * Revert async Main sample * Add hardcode token notice in sample * Fix missing method for Command Handler * Modify module samples to use SocketCommandContext instead * Emphasize CommandContext and SocketCommandContext * Fix formatting for module sample * Add SocketCommandContext for Groups sample * Remove comma * Fix DepMap sample formatting * Replace [DontInject] with DontInjectAttribute with cross reference * Remove connection logic note There is no reason that this note should still be here since Ready event exists. * Add a new warning message informing the users the existence of CommandService * Make command handler private excellent change
7 years ago
Improve library documentation (#826) * Improve the Command Service documentation The following changes have been added to this PR: • Fix minor grammatical errors. • Capitalize terms such as Commands, Modules and such, as the context is specific to the lib. • Wrap methods and properties in code blocks. The docs page currently has several issues that remains to be fixed. 1. ```md >[!WARNING] >This article is out of date and has not been rewritten yet. Information is not guaranteed to be accurate. ``` The docs doesn't necessarily seem "out of date" as the warning claims. The basics seem pretty relevant to the latest version of the lib. 2. >“To manually load a module, invoke [CommandService.AddModuleAsync], by passing in the generic type of your module and optionally, a dependency map.” The latter part of the sentence seems off. Where should the user pass the dependency map to? It seems to suggest that `AddModuleAsync` has an argument to pass the dependency to. If it is referring to `AddModuleAsync(Type type)`, then I feel like it should be clarified here - or perhaps change the wording of the sentence. 3. >“First, you need to create an @System.IServiceProvider You may create your own IServiceProvider if you wish.” Any mention of @System.IServiceProvider is currently broken on the docs. 4. >“Submodules are Modules that reside within another one. Typically, submodules are used to create nested groups (although not required to create nested groups).” Clarification on the part after "although?" 5. >“Finally, pass the map into the LoadAssembly method. Your modules will automatically be loaded with this dependency map.” Where is this `LoadAssembly` method? 6. ```md >[!NOTE] >Preconditions can be applied to Modules, Groups, or Commands. ``` The docs should mention `ParameterPreconditionAttribute`'s existence. * Update line breaks to comply with docs standard * Change "you should..." to "instead, ..." * Trim trailing spaces * Change "inherits" to "inherit" * Fix Context warning note and add ReplyAsync xref * Fix broken xrefs * Fix [Command Service] xref * Fix consistency between TypeReaders and Preconditions returns * Add missing semi-colons in ServiceProvider sample * Change CommandContext to SocketCommandContext & change variable naming * Cleanup TypeReader section * Wrap [DontInject] in code block * Fix commands docs linking in intro * Improve Getting Started - Installation - Fix character misalignment to comply with docs standard. - Fix image numbering issues by moving the tooltips above some of the steps. - Add codeblocks to search terms like `Discord.Net`. - Remove broken `addons` reference. - Specify `.NET 4.6.1` as `.NET Framework 4.6.1`. - Minor cross-reference cleanup. * Fix Getting Started - Intro - Minor grammartical fixes. - Wrap mentions of the methods, properties, and events in code block. - Replace `Discord.Net` to `Discord.NET`. - Fix steps numbering under `Creating a Discord Bot` and `Adding your bot to a server`. - Change `Task-based Asynchronous Pattern ([TAP])` linking to mark the entire term instead. - Change code block of `Pong!` to quotation mark instead. * Fix cross references in Sending Voice * Mention parameter precondition attribute * Change `Discord.NET` to `Discord.Net` for consistency * Wrap project names in code blocks & minor fixes in Terminology * Change `add-ons` to `addons` for consistency * Fix cross references in Logging * Fix minor grammatical issues in "Working with Events" * Missed a tilda * Remove out-of-date warning in Commands * Minor grammatical fixes for Entities * Fix broken xref in Logging * Adjust service collection sample ...according to https://github.com/RogueException/Discord.Net/pull/826/files/f89aecb7bfa8fe82a541d3bba44d0e37c125d235#r141530227 * Update Command Handler sample - Update Main for C# 7.1. - Inject CommandService and DiscordSocketClient into the service collection. - Add Async suffix to asynchronous methods. * Minor grammatical fixes in Events * Revert 2 incorrect grammar corrections * Revert async Main sample * Add hardcode token notice in sample * Fix missing method for Command Handler * Modify module samples to use SocketCommandContext instead * Emphasize CommandContext and SocketCommandContext * Fix formatting for module sample * Add SocketCommandContext for Groups sample * Remove comma * Fix DepMap sample formatting * Replace [DontInject] with DontInjectAttribute with cross reference * Remove connection logic note There is no reason that this note should still be here since Ready event exists. * Add a new warning message informing the users the existence of CommandService * Make command handler private excellent change
7 years ago
Improve library documentation (#826) * Improve the Command Service documentation The following changes have been added to this PR: • Fix minor grammatical errors. • Capitalize terms such as Commands, Modules and such, as the context is specific to the lib. • Wrap methods and properties in code blocks. The docs page currently has several issues that remains to be fixed. 1. ```md >[!WARNING] >This article is out of date and has not been rewritten yet. Information is not guaranteed to be accurate. ``` The docs doesn't necessarily seem "out of date" as the warning claims. The basics seem pretty relevant to the latest version of the lib. 2. >“To manually load a module, invoke [CommandService.AddModuleAsync], by passing in the generic type of your module and optionally, a dependency map.” The latter part of the sentence seems off. Where should the user pass the dependency map to? It seems to suggest that `AddModuleAsync` has an argument to pass the dependency to. If it is referring to `AddModuleAsync(Type type)`, then I feel like it should be clarified here - or perhaps change the wording of the sentence. 3. >“First, you need to create an @System.IServiceProvider You may create your own IServiceProvider if you wish.” Any mention of @System.IServiceProvider is currently broken on the docs. 4. >“Submodules are Modules that reside within another one. Typically, submodules are used to create nested groups (although not required to create nested groups).” Clarification on the part after "although?" 5. >“Finally, pass the map into the LoadAssembly method. Your modules will automatically be loaded with this dependency map.” Where is this `LoadAssembly` method? 6. ```md >[!NOTE] >Preconditions can be applied to Modules, Groups, or Commands. ``` The docs should mention `ParameterPreconditionAttribute`'s existence. * Update line breaks to comply with docs standard * Change "you should..." to "instead, ..." * Trim trailing spaces * Change "inherits" to "inherit" * Fix Context warning note and add ReplyAsync xref * Fix broken xrefs * Fix [Command Service] xref * Fix consistency between TypeReaders and Preconditions returns * Add missing semi-colons in ServiceProvider sample * Change CommandContext to SocketCommandContext & change variable naming * Cleanup TypeReader section * Wrap [DontInject] in code block * Fix commands docs linking in intro * Improve Getting Started - Installation - Fix character misalignment to comply with docs standard. - Fix image numbering issues by moving the tooltips above some of the steps. - Add codeblocks to search terms like `Discord.Net`. - Remove broken `addons` reference. - Specify `.NET 4.6.1` as `.NET Framework 4.6.1`. - Minor cross-reference cleanup. * Fix Getting Started - Intro - Minor grammartical fixes. - Wrap mentions of the methods, properties, and events in code block. - Replace `Discord.Net` to `Discord.NET`. - Fix steps numbering under `Creating a Discord Bot` and `Adding your bot to a server`. - Change `Task-based Asynchronous Pattern ([TAP])` linking to mark the entire term instead. - Change code block of `Pong!` to quotation mark instead. * Fix cross references in Sending Voice * Mention parameter precondition attribute * Change `Discord.NET` to `Discord.Net` for consistency * Wrap project names in code blocks & minor fixes in Terminology * Change `add-ons` to `addons` for consistency * Fix cross references in Logging * Fix minor grammatical issues in "Working with Events" * Missed a tilda * Remove out-of-date warning in Commands * Minor grammatical fixes for Entities * Fix broken xref in Logging * Adjust service collection sample ...according to https://github.com/RogueException/Discord.Net/pull/826/files/f89aecb7bfa8fe82a541d3bba44d0e37c125d235#r141530227 * Update Command Handler sample - Update Main for C# 7.1. - Inject CommandService and DiscordSocketClient into the service collection. - Add Async suffix to asynchronous methods. * Minor grammatical fixes in Events * Revert 2 incorrect grammar corrections * Revert async Main sample * Add hardcode token notice in sample * Fix missing method for Command Handler * Modify module samples to use SocketCommandContext instead * Emphasize CommandContext and SocketCommandContext * Fix formatting for module sample * Add SocketCommandContext for Groups sample * Remove comma * Fix DepMap sample formatting * Replace [DontInject] with DontInjectAttribute with cross reference * Remove connection logic note There is no reason that this note should still be here since Ready event exists. * Add a new warning message informing the users the existence of CommandService * Make command handler private excellent change
7 years ago
7 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. ---
  2. uid: Guides.GettingStarted.Installation
  3. title: Installing Discord.Net
  4. ---
  5. # Discord.Net Installation
  6. Discord.Net is distributed through the NuGet package manager, so it is
  7. recommended for you to install the library that way.
  8. Alternatively, you may compile from the source and install the library
  9. yourself.
  10. ## Supported Platforms
  11. Currently, Discord.Net targets [.NET Standard] 1.3 and offers support
  12. for .NET Standard 1.1. If your application will be targeting .NET
  13. Standard 1.1, please see the [additional steps].
  14. Since Discord.Net is built on top of .NET Standard, it is also
  15. recommended to create applications using [.NET Core], although it is not
  16. required. When using .NET Framework, it is suggested to target
  17. `.NET Framework 4.6.1` or higher.
  18. > [!WARNING]
  19. > Using this library with [Mono] is not recommended until further
  20. > notice. It is known to have issues with the library's WebSockets
  21. > implementation and may crash the application upon startup.
  22. [Mono]: https://www.mono-project.com/
  23. [.NET Standard]: https://docs.microsoft.com/en-us/dotnet/articles/standard/library
  24. [.NET Core]: https://docs.microsoft.com/en-us/dotnet/articles/core/
  25. [additional steps]: #installing-on-net-standard-11
  26. ## Installing with NuGet
  27. Release builds of Discord.Net will be published to the
  28. [official NuGet feed].
  29. Development builds of Discord.Net, as well as add-ons, will be
  30. published to our [MyGet feed].
  31. * Direct feed link: `https://www.myget.org/F/discord-net/api/v3/index.json`
  32. Not sure how to add a direct feed? See how [with Visual Studio] or
  33. [without Visual Studio].
  34. [official NuGet feed]: https://nuget.org
  35. [MyGet feed]: https://www.myget.org/feed/Packages/discord-net
  36. [with Visual Studio]: https://docs.microsoft.com/en-us/nuget/tools/package-manager-ui#package-sources
  37. [without Visual Studio]: #configuring-nuget-without-visual-studio
  38. ### [Using Visual Studio](#tab/vs-install)
  39. > [!TIP]
  40. > Don't forget to change your package source if you're installing from
  41. > the developer feed.
  42. > Also make sure to check "Enable Prereleases" if installing a dev
  43. > build!
  44. 1. Create a new solution for your bot.
  45. 2. In the Solution Explorer, find the "Dependencies" element under your
  46. bot's project.
  47. 3. Right click on "Dependencies", and select "Manage NuGet packages."
  48. ![Step 3](images/install-vs-deps.png)
  49. 4. In the "Browse" tab, search for `Discord.Net`.
  50. 5. Install the `Discord.Net` package.
  51. ![Step 5](images/install-vs-nuget.png)
  52. ### [Using JetBrains Rider](#tab/rider-install)
  53. > [!TIP]
  54. > Make sure to check the "Prerelease" box if installing a dev build!
  55. 1. Create a new solution for your bot.
  56. 2. Open the NuGet window (Tools > NuGet > Manage NuGet packages for
  57. Solution).
  58. ![Step 2](images/install-rider-nuget-manager.png)
  59. 3. In the "Packages" tab, search for `Discord.Net`.
  60. ![Step 3](images/install-rider-search.png)
  61. 4. Install by adding the package to your project.
  62. ![Step 4](images/install-rider-add.png)
  63. ### [Using Visual Studio Code](#tab/vs-code)
  64. > [!TIP]
  65. > Don't forget to add the package source to a [NuGet.Config file] if
  66. > you're installing from the developer feed.
  67. 1. Create a new project for your bot.
  68. 2. Add `Discord.Net` to your .csproj.
  69. [!code[Sample .csproj](samples/project.xml)]
  70. [NuGet.Config file]: #configuring-nuget-without-visual-studio
  71. ### [Using dotnet CLI](#tab/dotnet-cli)
  72. > [!TIP]
  73. > Don't forget to add the package source to a [NuGet.Config file] if
  74. > you're installing from the developer feed.
  75. 1. Open command-line and navigate to where your .csproj is located.
  76. 2. Enter `dotnet add package Discord.Net`.
  77. [NuGet.Config file]: #configuring-nuget-without-visual-studio
  78. ***
  79. ## Compiling from Source
  80. In order to compile Discord.Net, you will need the following:
  81. ### Using Visual Studio
  82. - [Visual Studio 2017](https://www.visualstudio.com/)
  83. - [.NET Core SDK]
  84. The .NET Core and Docker (Preview) workload is required during Visual
  85. Studio installation.
  86. ### Using Command Line
  87. - [.NET Core SDK]
  88. [.NET Core SDK]: https://www.microsoft.com/net/download/
  89. ## Additional Information
  90. ### Installing on .NET Standard 1.1
  91. For applications targeting a runtime corresponding with .NET Standard
  92. 1.1 or 1.2, the built-in WebSocket and UDP provider will not work. For
  93. applications which utilize a WebSocket connection to Discord, such as
  94. WebSocket or RPC, third-party provider packages will need to be
  95. installed and configured.
  96. > [!NOTE]
  97. > `Discord.Net.Providers.UDPClient` is _only_ required if your
  98. > bot will be utilizing voice chat.
  99. First, install the following packages through NuGet, or compile them
  100. yourself, if you prefer:
  101. - Discord.Net.Providers.WS4Net
  102. - Discord.Net.Providers.UDPClient
  103. Next, you will need to configure your [DiscordSocketClient] to use
  104. these custom providers over the default ones.
  105. To do this, set the `WebSocketProvider` and the optional
  106. `UdpSocketProvider` properties on the [DiscordSocketConfig] that you
  107. are passing into your client.
  108. [!code-csharp[NET Standard 1.1 Example](samples/netstd11.cs)]
  109. [DiscordSocketClient]: xref:Discord.WebSocket.DiscordSocketClient
  110. [DiscordSocketConfig]: xref:Discord.WebSocket.DiscordSocketConfig
  111. ### Configuring NuGet without Visual Studio
  112. If you plan on deploying your bot or developing outside of Visual
  113. Studio, you will need to create a local NuGet configuration file for
  114. your project.
  115. To do this, create a file named `NuGet.Config` alongside the root of
  116. your application, where the project is located.
  117. Paste the following snippets into this configuration file, adding any
  118. additional feeds if necessary.
  119. [!code[NuGet Configuration](samples/nuget.config)]