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.

BaseSocketClient.Events.cs 40 KiB

Documentation Overhaul (#1161) * Add XML docs * Clean up style switcher * Squash commits on branch docs/faq-n-patches * Fix broken theme selector * Add local image embed instruction * Add a bunch of XML docs * Add a bunch of XML docs * Fix broken search + DocFX by default ships with an older version of jQuery, switching to a newer version confuses parts of the DocFX Javascript. * Minor fixes for CONTRIBUTING.md and README.md * Clean up filterConfig.yml + New config exposes Discord.Net namespace since it has several common public exceptions that may be helpful to users * Add XML docs * Read token from Environment Variable instead of hardcode * Add XMLDocs * Compress some assets & add OAuth2 URL generator * Fix sample link & add missing pictures * Add tag examples * Fix embed docs consistency * Add details regarding userbot support * Add XML Docs * Add XML Docs * Add XML Docs * Minor fixes in documentations + Fix unescaped '<' + Fix typo * Fix seealso for preconditions and add missing descriptions * Add missing exceptions * Document exposed TypeReaders * Fix letter-casing for files * Add 'last modified' plugin Source: https://github.com/Still34/DocFx.Plugin.LastModified Licensed under MIT License * XML Docs * Fix minor consistencies & redundant impl * Add properties examples to overwrite * Fix missing Username prop * Add warning for bulk-delete endpoint * Replace note block * Add BaseSocketClient docs * Add XML docs * Replace langword null to code block null instead - Because DocFX sucks at rendering langword * Replace all langword placements with code block * Add more IGuild docs * Add details to SpotifyGame * Initial proofread of the articles * Add explanation for RunMode * Add event docs - MessageReceived - ChannelUpdated/Destroyed/Created * Fix light theme link color * Fix xml docs error * Add partial documentation for audit log impl * Add documentation for some REST-based objects * Add partial documentation for audit log objects * Add more XML comments to quotation mark alias map stuff, including an example * Add reference to CommandServiceConfig from the util docs' * Add explanation that if " is removed then it wont work * Fix missing service provider in example * Add documentation for new INestedChannel * Add documentation * Add documentation for new API version & few events * Revise guide paragraphs/samples + Fix various formatting. + Provide a more detailed walkthrough for dependency injection. + Add C# note at intro. * Fix typos & formatting * Improve group module example * Small amount to see if I'm doing it right * Remove/cleanup redundant variables * Fix EnterTypingState impl for doc inheritance * Fix Test to resolve changes made in 15b58e * Improve precondition documentation + Add precondition usage sample + Add precondition group usage sample + Move precondition samples to its own sample folder * Move samples to individual folders * Clarify token source * Cleanup styling of README.md for docs * Replace InvalidPathChars for NS1.3 * InvalidPathChars does not exist in NS1.3; replaced with GetInvalidPathChars instead. * Add a missing change for 2c7cc738 * Update LastModified to v1.1.0 & add license * Rewrite installation page for Core 2.1 * Fix anchor link * Bump post-processor to v1.1.1 * Add fixes to partial file & add license * Moved theme-switcher code to scripts partial file + Add author's MIT license to featherlight javascript * Remove unused bootstrap plugin * Bump LastModified plugin * Changed the path from 'lastmodified' to 'last-modified' for consistency * Cleanup README & Contribution guide * Changes to last pr * Fix GetCategoryAsync docs * Proofread and cleanup articles * Change passive voice in "Get Started" to active * Fix improper preposition in Commands Introduction page * Fix minor grammar mistakes in "Your First Bot" (future tense -> present tense/subjunctive mood -> indicative mood/proper noun casing/incorrect noun/add missing article) * Fix minor grammar mistakes in "Installation" (missing article) * no hablo ingles * Try try try again * I'm sure you're having as much fun as I am * Cleanup TOC & fix titles * Improve styling + Change title font to Noto Sans + Add materialized design for commit message box * Add DescriptionGenerator plugin * Add nightly section for clarification * Fix typos in Nightlies & Post-execution * Bump DescriptionGenerator to v1.1.0 + This build adds the functionality of generating managed references' summary into the description tag. * Initial emoji article draft * Add 'additional information' section for emoji article * Add cosmetic changes to the master css * Alter info box color + Add transition to article content * Add clarification in the emoji article * Emphasize that normal emoji string will not translate to its Unicode representation. * Clean up or add some of the samples featured in the article. + Add emoji/emote declaration section for clarification. + Add WebSocket emote sample. - Remove inconsistent styling ('wacky memes' proves to be too out of place). * Improve readability for nightlies article * Move 'Bundled Preconditions' section * Bump LastModified to fix UTC DateTime parsing * Add langwordMapping.yml * Add XML docs * Add VSC workspace rule * The root workspace limits the ruler to 120 characters for member documentations and excludes folders such as 'samples' and 'docs'. * The docs workspace limits the ruler to 70 characters for standard conceptual article to comply with documentation's CONTRIBUTING.md rule, and excludes temprorary folders created by DocFX. * Update CONTRIBUTING.md * Add documentation style rule * Fix styling of several member documentation * Fix ' />' caused by Agent Smith oddities * Fix styling to be more specific about the mention of IDs * Fix exception summary to comply with official Microsoft Docs style * References https://docs.microsoft.com/en-us/dotnet/api/system.argumentnullexception?view=netframework-4.7.2 https://docs.microsoft.com/en-us/dotnet/api/system.platformnotsupportedexception?view=netframework-4.7.2 https://docs.microsoft.com/en-us/dotnet/api/system.badimageformatexception?view=netframework-4.7.2 * Add XML documentations * Shift color return docs * Fix minor docs * Added documentation for SocketDMChannel, SocketGuildChannel, and SocketTextChannel * Add XML docs * Corrections to SocketGuildChannel * Corrections to SocketTextChannel * Corrections to SocketDMChannel * Swapped out 'id' for 'snowflake identifier * Swapped out 'id' for 'snowflake identifier' * SocketDMChannel amendments * SocketGuildChannel amendments * SocketTextChannel amendments * Add XML docs & patch return types + Starting from this commit, all return types for tasks will use style similar to most documentations featured on docs.microsoft.com References: https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.dbcontext.-ctor?view=efcore-2.1 https://docs.microsoft.com/en-us/dotnet/api/system.io.filestream.readasync?view=netcore-2.1 https://docs.microsoft.com/en-us/dotnet/api/system.io.textwriter.writelineasync?view=netcore-2.1#System_IO_TextWriter_WriteLineAsync_System_Char___ And many more other asynchronous method documentations featured in the latest BCL. * Added documentation for many audit log data types, fixed vowel indefinite articles * Change audit log data types to start with 'Contains' (verb) instead of an article * Fix some documentation issues and document some more audit log data types * Fix English posession * Add XML doc * Documented two more types * Documented RoleCreateAuditLogData * Document remaining audit log data types * Added RestDMChannel documentation * Added RestGuildChannel documentation * Added RestTextChannel documentation * Added RestVoiceChannel documentation * Added RestUser documentation * Added RestRole documentation * Added RestMessage documentation * Slightly better wording * Contains -> Contains a piece of (describe article) * [EN] Present perf. -> past perf. * Add XML docs * Fix arrow alignment * Clarify supported nullable type * Fixed a typo in ISnowflakeEntity * Added RestUser Documentation * Added RestInvite documentation * Add XML docs & minor optimizations * Minor optimization for doc rendering * Rollback font optimization changes * Amendments to RestUser * Added SocketDMChannel documentation * Added RestDMChannel documentation * Added RestGuild documentation * Adjustment to SocketDMChannel * Added minimal descriptions from the API documentation for Integration types * Added obsolete mention to the ReadMessages flag. * Added remarks about 2FA requirement for guild permissions * Added xmldoc for GuildPermission methods * Added xml doc for ToAllowList and ToDenyList * Added specification of how the bits of the color raw value are packed * Added discord API documentation to IConnection interface * I can spell :^) * Fix whitespace in ChannelPermission * fix spacing of values in guildpermission * Made changes to get field descriptions from feedback, added returns tag to IConnection * Added property get standard for IntegrationAccount * Added property get pattern to xml docs and identical returns tag. * Change all color class references to struct ...because it isn't a class. * Add XML docs * Rewrote the returns tags in IGuildIntegration, removed the ones I was unsure about. * Rewrote the rest of the returns tags * Amendments * Cleanup doc for c1d78189 * Added types to <returns> tags where missing * Added second sample for adding reactions * Added some class summaries * Missed a period * Amendments * restored the removed line break * Removed unnecessary see tag * Use consistent quotation marks around subscribers, the name for these users are dependant on the source of where they are integrated from (youtube or twitch), so we should not use a name that is specific to one platform * Add <remarks> tag to the IGuildIntegration xmldocs * Fix grammar issue * Update DescriptionGenerator * Cleanup of https://github.com/Still34/Discord.Net/pull/8 * Cleanup previous PR * Fix for misleading behaviour in the emoji guide + Original lines stated that sending a emoji wrapped in colon will not be parsed, but that was incorrect; replaced with reactions instead of sending messages as the example * Add strings for dictionary in DotSettings * Add XML docs * Fix lots of typos in comments + Geez, I didn't know there were so many. * Add XML docs & rewrite GetMessagesAsync docs This commit rewrites the remarks section of GetMessagesAsync, as well as adding examples to several methods. * Update 'Your First Bot' + This commit reflects the new changes made to the Discord Application Developer Portal after its major update * Initial optimization for DocFX render & add missing files * Add examples in message methods * Cleanup https://github.com/RogueException/Discord.Net/pull/1128 * Fix first bot note * Cleanup FAQ structure * Add XML docs * Update docfx plugins * Fix navbar collapsing issue * Fix broken xref * Cleanup FAQ section + Add introductory paragraphs to each FAQ section. + Add 'missing dependency' entry to commands FAQ. * Split commands FAQ to 'General' and 'DI' sections. * Cleanup https://github.com/RogueException/Discord.Net/pull/1139 * Fix missing namespace * Add missing highlighting css for the light theme * Add additional clarification for installing packages * Add indentation to example for clarity * Cleanup several articles to be more human-friendly and easier to read * Remove RPC-related notes * Cleanup slow-mode-related documentation strings * Add an additional note about cross-guild emote usage * Add CreateTextChannel sample * Add XMLDocs
6 years ago
docs: Main docs update (#1304) * Remove template in favor of official samples * Fixed a variable name copy pasta mistake line 35 was _database.GetData() instead of DBService.GetData() * Experimental theme change * Change paragraph, code, heading fonts * Widen viewport * Update DocFX.Plugins.LastModified v1.2.3 * Exclude Discord.API in docs * Add remarks for SocketReaction properties * Add examples for BaseSocketClient.Events * Add additional clarification for some methods * Move IUser and IGuildChannel examples * Clarify several guides samples with notes - Reword TypeReader comment to avoid giving the idea that the sample itself is "obsolete" - Remove CommandException logging comment regarding C#7.0 as the version is now the standard across VS2017 and up - Remove suggestion about handling result in command handler since it is now advised to use CommandExecuted instead + Add additional comment to clarify ctor for DI setup * Add/migrate code examples * Incorporate material design theme License @ https://github.com/ovasquez * Update installation and nightly guide * Fix improper indentations made obvious by the widen viewport * Fix minor grammar issues + Add installation for nightly build using dotnet CLI * Fix nav level indentation * Revise "Your First Bot" article * Merge some paragraphs to avoid clutter while keeping readability * Reword the use of command framework + Add additional warning/note about environment variable * Add additional indent level * Fix indentation text warping * Remove connections sample * Update logging sample Remove redundant part of the sample * Remove mention of RPC * Remove misleading section about commands - Remove command sample from complete snippet * Revise "Your First Bot" command paragraphs * Change wording to hint devs that additional command parser packages may be available, as more and more begin to crop up * Update themes * Add XML docs contribution guidelines Update guidelines * Update CommandExecuted remarks * Fix precondition remarks typo no one saw that ok * Fix permission sample in docfx * Fix IMessageChannel samples * Update docs/_template/light-dark-theme/styles/docfx.vendor.minify.css Co-Authored-By: Still34 <341464@gmail.com> * Update docs/_template/light-dark-theme/styles/material.css Co-Authored-By: Still34 <341464@gmail.com> * Update docs/_template/light-dark-theme/styles/material.css Co-Authored-By: Still34 <341464@gmail.com>
6 years ago
Documentation Overhaul (#1161) * Add XML docs * Clean up style switcher * Squash commits on branch docs/faq-n-patches * Fix broken theme selector * Add local image embed instruction * Add a bunch of XML docs * Add a bunch of XML docs * Fix broken search + DocFX by default ships with an older version of jQuery, switching to a newer version confuses parts of the DocFX Javascript. * Minor fixes for CONTRIBUTING.md and README.md * Clean up filterConfig.yml + New config exposes Discord.Net namespace since it has several common public exceptions that may be helpful to users * Add XML docs * Read token from Environment Variable instead of hardcode * Add XMLDocs * Compress some assets & add OAuth2 URL generator * Fix sample link & add missing pictures * Add tag examples * Fix embed docs consistency * Add details regarding userbot support * Add XML Docs * Add XML Docs * Add XML Docs * Minor fixes in documentations + Fix unescaped '<' + Fix typo * Fix seealso for preconditions and add missing descriptions * Add missing exceptions * Document exposed TypeReaders * Fix letter-casing for files * Add 'last modified' plugin Source: https://github.com/Still34/DocFx.Plugin.LastModified Licensed under MIT License * XML Docs * Fix minor consistencies & redundant impl * Add properties examples to overwrite * Fix missing Username prop * Add warning for bulk-delete endpoint * Replace note block * Add BaseSocketClient docs * Add XML docs * Replace langword null to code block null instead - Because DocFX sucks at rendering langword * Replace all langword placements with code block * Add more IGuild docs * Add details to SpotifyGame * Initial proofread of the articles * Add explanation for RunMode * Add event docs - MessageReceived - ChannelUpdated/Destroyed/Created * Fix light theme link color * Fix xml docs error * Add partial documentation for audit log impl * Add documentation for some REST-based objects * Add partial documentation for audit log objects * Add more XML comments to quotation mark alias map stuff, including an example * Add reference to CommandServiceConfig from the util docs' * Add explanation that if " is removed then it wont work * Fix missing service provider in example * Add documentation for new INestedChannel * Add documentation * Add documentation for new API version & few events * Revise guide paragraphs/samples + Fix various formatting. + Provide a more detailed walkthrough for dependency injection. + Add C# note at intro. * Fix typos & formatting * Improve group module example * Small amount to see if I'm doing it right * Remove/cleanup redundant variables * Fix EnterTypingState impl for doc inheritance * Fix Test to resolve changes made in 15b58e * Improve precondition documentation + Add precondition usage sample + Add precondition group usage sample + Move precondition samples to its own sample folder * Move samples to individual folders * Clarify token source * Cleanup styling of README.md for docs * Replace InvalidPathChars for NS1.3 * InvalidPathChars does not exist in NS1.3; replaced with GetInvalidPathChars instead. * Add a missing change for 2c7cc738 * Update LastModified to v1.1.0 & add license * Rewrite installation page for Core 2.1 * Fix anchor link * Bump post-processor to v1.1.1 * Add fixes to partial file & add license * Moved theme-switcher code to scripts partial file + Add author's MIT license to featherlight javascript * Remove unused bootstrap plugin * Bump LastModified plugin * Changed the path from 'lastmodified' to 'last-modified' for consistency * Cleanup README & Contribution guide * Changes to last pr * Fix GetCategoryAsync docs * Proofread and cleanup articles * Change passive voice in "Get Started" to active * Fix improper preposition in Commands Introduction page * Fix minor grammar mistakes in "Your First Bot" (future tense -> present tense/subjunctive mood -> indicative mood/proper noun casing/incorrect noun/add missing article) * Fix minor grammar mistakes in "Installation" (missing article) * no hablo ingles * Try try try again * I'm sure you're having as much fun as I am * Cleanup TOC & fix titles * Improve styling + Change title font to Noto Sans + Add materialized design for commit message box * Add DescriptionGenerator plugin * Add nightly section for clarification * Fix typos in Nightlies & Post-execution * Bump DescriptionGenerator to v1.1.0 + This build adds the functionality of generating managed references' summary into the description tag. * Initial emoji article draft * Add 'additional information' section for emoji article * Add cosmetic changes to the master css * Alter info box color + Add transition to article content * Add clarification in the emoji article * Emphasize that normal emoji string will not translate to its Unicode representation. * Clean up or add some of the samples featured in the article. + Add emoji/emote declaration section for clarification. + Add WebSocket emote sample. - Remove inconsistent styling ('wacky memes' proves to be too out of place). * Improve readability for nightlies article * Move 'Bundled Preconditions' section * Bump LastModified to fix UTC DateTime parsing * Add langwordMapping.yml * Add XML docs * Add VSC workspace rule * The root workspace limits the ruler to 120 characters for member documentations and excludes folders such as 'samples' and 'docs'. * The docs workspace limits the ruler to 70 characters for standard conceptual article to comply with documentation's CONTRIBUTING.md rule, and excludes temprorary folders created by DocFX. * Update CONTRIBUTING.md * Add documentation style rule * Fix styling of several member documentation * Fix ' />' caused by Agent Smith oddities * Fix styling to be more specific about the mention of IDs * Fix exception summary to comply with official Microsoft Docs style * References https://docs.microsoft.com/en-us/dotnet/api/system.argumentnullexception?view=netframework-4.7.2 https://docs.microsoft.com/en-us/dotnet/api/system.platformnotsupportedexception?view=netframework-4.7.2 https://docs.microsoft.com/en-us/dotnet/api/system.badimageformatexception?view=netframework-4.7.2 * Add XML documentations * Shift color return docs * Fix minor docs * Added documentation for SocketDMChannel, SocketGuildChannel, and SocketTextChannel * Add XML docs * Corrections to SocketGuildChannel * Corrections to SocketTextChannel * Corrections to SocketDMChannel * Swapped out 'id' for 'snowflake identifier * Swapped out 'id' for 'snowflake identifier' * SocketDMChannel amendments * SocketGuildChannel amendments * SocketTextChannel amendments * Add XML docs & patch return types + Starting from this commit, all return types for tasks will use style similar to most documentations featured on docs.microsoft.com References: https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.dbcontext.-ctor?view=efcore-2.1 https://docs.microsoft.com/en-us/dotnet/api/system.io.filestream.readasync?view=netcore-2.1 https://docs.microsoft.com/en-us/dotnet/api/system.io.textwriter.writelineasync?view=netcore-2.1#System_IO_TextWriter_WriteLineAsync_System_Char___ And many more other asynchronous method documentations featured in the latest BCL. * Added documentation for many audit log data types, fixed vowel indefinite articles * Change audit log data types to start with 'Contains' (verb) instead of an article * Fix some documentation issues and document some more audit log data types * Fix English posession * Add XML doc * Documented two more types * Documented RoleCreateAuditLogData * Document remaining audit log data types * Added RestDMChannel documentation * Added RestGuildChannel documentation * Added RestTextChannel documentation * Added RestVoiceChannel documentation * Added RestUser documentation * Added RestRole documentation * Added RestMessage documentation * Slightly better wording * Contains -> Contains a piece of (describe article) * [EN] Present perf. -> past perf. * Add XML docs * Fix arrow alignment * Clarify supported nullable type * Fixed a typo in ISnowflakeEntity * Added RestUser Documentation * Added RestInvite documentation * Add XML docs & minor optimizations * Minor optimization for doc rendering * Rollback font optimization changes * Amendments to RestUser * Added SocketDMChannel documentation * Added RestDMChannel documentation * Added RestGuild documentation * Adjustment to SocketDMChannel * Added minimal descriptions from the API documentation for Integration types * Added obsolete mention to the ReadMessages flag. * Added remarks about 2FA requirement for guild permissions * Added xmldoc for GuildPermission methods * Added xml doc for ToAllowList and ToDenyList * Added specification of how the bits of the color raw value are packed * Added discord API documentation to IConnection interface * I can spell :^) * Fix whitespace in ChannelPermission * fix spacing of values in guildpermission * Made changes to get field descriptions from feedback, added returns tag to IConnection * Added property get standard for IntegrationAccount * Added property get pattern to xml docs and identical returns tag. * Change all color class references to struct ...because it isn't a class. * Add XML docs * Rewrote the returns tags in IGuildIntegration, removed the ones I was unsure about. * Rewrote the rest of the returns tags * Amendments * Cleanup doc for c1d78189 * Added types to <returns> tags where missing * Added second sample for adding reactions * Added some class summaries * Missed a period * Amendments * restored the removed line break * Removed unnecessary see tag * Use consistent quotation marks around subscribers, the name for these users are dependant on the source of where they are integrated from (youtube or twitch), so we should not use a name that is specific to one platform * Add <remarks> tag to the IGuildIntegration xmldocs * Fix grammar issue * Update DescriptionGenerator * Cleanup of https://github.com/Still34/Discord.Net/pull/8 * Cleanup previous PR * Fix for misleading behaviour in the emoji guide + Original lines stated that sending a emoji wrapped in colon will not be parsed, but that was incorrect; replaced with reactions instead of sending messages as the example * Add strings for dictionary in DotSettings * Add XML docs * Fix lots of typos in comments + Geez, I didn't know there were so many. * Add XML docs & rewrite GetMessagesAsync docs This commit rewrites the remarks section of GetMessagesAsync, as well as adding examples to several methods. * Update 'Your First Bot' + This commit reflects the new changes made to the Discord Application Developer Portal after its major update * Initial optimization for DocFX render & add missing files * Add examples in message methods * Cleanup https://github.com/RogueException/Discord.Net/pull/1128 * Fix first bot note * Cleanup FAQ structure * Add XML docs * Update docfx plugins * Fix navbar collapsing issue * Fix broken xref * Cleanup FAQ section + Add introductory paragraphs to each FAQ section. + Add 'missing dependency' entry to commands FAQ. * Split commands FAQ to 'General' and 'DI' sections. * Cleanup https://github.com/RogueException/Discord.Net/pull/1139 * Fix missing namespace * Add missing highlighting css for the light theme * Add additional clarification for installing packages * Add indentation to example for clarity * Cleanup several articles to be more human-friendly and easier to read * Remove RPC-related notes * Cleanup slow-mode-related documentation strings * Add an additional note about cross-guild emote usage * Add CreateTextChannel sample * Add XMLDocs
6 years ago
docs: Main docs update (#1304) * Remove template in favor of official samples * Fixed a variable name copy pasta mistake line 35 was _database.GetData() instead of DBService.GetData() * Experimental theme change * Change paragraph, code, heading fonts * Widen viewport * Update DocFX.Plugins.LastModified v1.2.3 * Exclude Discord.API in docs * Add remarks for SocketReaction properties * Add examples for BaseSocketClient.Events * Add additional clarification for some methods * Move IUser and IGuildChannel examples * Clarify several guides samples with notes - Reword TypeReader comment to avoid giving the idea that the sample itself is "obsolete" - Remove CommandException logging comment regarding C#7.0 as the version is now the standard across VS2017 and up - Remove suggestion about handling result in command handler since it is now advised to use CommandExecuted instead + Add additional comment to clarify ctor for DI setup * Add/migrate code examples * Incorporate material design theme License @ https://github.com/ovasquez * Update installation and nightly guide * Fix improper indentations made obvious by the widen viewport * Fix minor grammar issues + Add installation for nightly build using dotnet CLI * Fix nav level indentation * Revise "Your First Bot" article * Merge some paragraphs to avoid clutter while keeping readability * Reword the use of command framework + Add additional warning/note about environment variable * Add additional indent level * Fix indentation text warping * Remove connections sample * Update logging sample Remove redundant part of the sample * Remove mention of RPC * Remove misleading section about commands - Remove command sample from complete snippet * Revise "Your First Bot" command paragraphs * Change wording to hint devs that additional command parser packages may be available, as more and more begin to crop up * Update themes * Add XML docs contribution guidelines Update guidelines * Update CommandExecuted remarks * Fix precondition remarks typo no one saw that ok * Fix permission sample in docfx * Fix IMessageChannel samples * Update docs/_template/light-dark-theme/styles/docfx.vendor.minify.css Co-Authored-By: Still34 <341464@gmail.com> * Update docs/_template/light-dark-theme/styles/material.css Co-Authored-By: Still34 <341464@gmail.com> * Update docs/_template/light-dark-theme/styles/material.css Co-Authored-By: Still34 <341464@gmail.com>
6 years ago
Documentation Overhaul (#1161) * Add XML docs * Clean up style switcher * Squash commits on branch docs/faq-n-patches * Fix broken theme selector * Add local image embed instruction * Add a bunch of XML docs * Add a bunch of XML docs * Fix broken search + DocFX by default ships with an older version of jQuery, switching to a newer version confuses parts of the DocFX Javascript. * Minor fixes for CONTRIBUTING.md and README.md * Clean up filterConfig.yml + New config exposes Discord.Net namespace since it has several common public exceptions that may be helpful to users * Add XML docs * Read token from Environment Variable instead of hardcode * Add XMLDocs * Compress some assets & add OAuth2 URL generator * Fix sample link & add missing pictures * Add tag examples * Fix embed docs consistency * Add details regarding userbot support * Add XML Docs * Add XML Docs * Add XML Docs * Minor fixes in documentations + Fix unescaped '<' + Fix typo * Fix seealso for preconditions and add missing descriptions * Add missing exceptions * Document exposed TypeReaders * Fix letter-casing for files * Add 'last modified' plugin Source: https://github.com/Still34/DocFx.Plugin.LastModified Licensed under MIT License * XML Docs * Fix minor consistencies & redundant impl * Add properties examples to overwrite * Fix missing Username prop * Add warning for bulk-delete endpoint * Replace note block * Add BaseSocketClient docs * Add XML docs * Replace langword null to code block null instead - Because DocFX sucks at rendering langword * Replace all langword placements with code block * Add more IGuild docs * Add details to SpotifyGame * Initial proofread of the articles * Add explanation for RunMode * Add event docs - MessageReceived - ChannelUpdated/Destroyed/Created * Fix light theme link color * Fix xml docs error * Add partial documentation for audit log impl * Add documentation for some REST-based objects * Add partial documentation for audit log objects * Add more XML comments to quotation mark alias map stuff, including an example * Add reference to CommandServiceConfig from the util docs' * Add explanation that if " is removed then it wont work * Fix missing service provider in example * Add documentation for new INestedChannel * Add documentation * Add documentation for new API version & few events * Revise guide paragraphs/samples + Fix various formatting. + Provide a more detailed walkthrough for dependency injection. + Add C# note at intro. * Fix typos & formatting * Improve group module example * Small amount to see if I'm doing it right * Remove/cleanup redundant variables * Fix EnterTypingState impl for doc inheritance * Fix Test to resolve changes made in 15b58e * Improve precondition documentation + Add precondition usage sample + Add precondition group usage sample + Move precondition samples to its own sample folder * Move samples to individual folders * Clarify token source * Cleanup styling of README.md for docs * Replace InvalidPathChars for NS1.3 * InvalidPathChars does not exist in NS1.3; replaced with GetInvalidPathChars instead. * Add a missing change for 2c7cc738 * Update LastModified to v1.1.0 & add license * Rewrite installation page for Core 2.1 * Fix anchor link * Bump post-processor to v1.1.1 * Add fixes to partial file & add license * Moved theme-switcher code to scripts partial file + Add author's MIT license to featherlight javascript * Remove unused bootstrap plugin * Bump LastModified plugin * Changed the path from 'lastmodified' to 'last-modified' for consistency * Cleanup README & Contribution guide * Changes to last pr * Fix GetCategoryAsync docs * Proofread and cleanup articles * Change passive voice in "Get Started" to active * Fix improper preposition in Commands Introduction page * Fix minor grammar mistakes in "Your First Bot" (future tense -> present tense/subjunctive mood -> indicative mood/proper noun casing/incorrect noun/add missing article) * Fix minor grammar mistakes in "Installation" (missing article) * no hablo ingles * Try try try again * I'm sure you're having as much fun as I am * Cleanup TOC & fix titles * Improve styling + Change title font to Noto Sans + Add materialized design for commit message box * Add DescriptionGenerator plugin * Add nightly section for clarification * Fix typos in Nightlies & Post-execution * Bump DescriptionGenerator to v1.1.0 + This build adds the functionality of generating managed references' summary into the description tag. * Initial emoji article draft * Add 'additional information' section for emoji article * Add cosmetic changes to the master css * Alter info box color + Add transition to article content * Add clarification in the emoji article * Emphasize that normal emoji string will not translate to its Unicode representation. * Clean up or add some of the samples featured in the article. + Add emoji/emote declaration section for clarification. + Add WebSocket emote sample. - Remove inconsistent styling ('wacky memes' proves to be too out of place). * Improve readability for nightlies article * Move 'Bundled Preconditions' section * Bump LastModified to fix UTC DateTime parsing * Add langwordMapping.yml * Add XML docs * Add VSC workspace rule * The root workspace limits the ruler to 120 characters for member documentations and excludes folders such as 'samples' and 'docs'. * The docs workspace limits the ruler to 70 characters for standard conceptual article to comply with documentation's CONTRIBUTING.md rule, and excludes temprorary folders created by DocFX. * Update CONTRIBUTING.md * Add documentation style rule * Fix styling of several member documentation * Fix ' />' caused by Agent Smith oddities * Fix styling to be more specific about the mention of IDs * Fix exception summary to comply with official Microsoft Docs style * References https://docs.microsoft.com/en-us/dotnet/api/system.argumentnullexception?view=netframework-4.7.2 https://docs.microsoft.com/en-us/dotnet/api/system.platformnotsupportedexception?view=netframework-4.7.2 https://docs.microsoft.com/en-us/dotnet/api/system.badimageformatexception?view=netframework-4.7.2 * Add XML documentations * Shift color return docs * Fix minor docs * Added documentation for SocketDMChannel, SocketGuildChannel, and SocketTextChannel * Add XML docs * Corrections to SocketGuildChannel * Corrections to SocketTextChannel * Corrections to SocketDMChannel * Swapped out 'id' for 'snowflake identifier * Swapped out 'id' for 'snowflake identifier' * SocketDMChannel amendments * SocketGuildChannel amendments * SocketTextChannel amendments * Add XML docs & patch return types + Starting from this commit, all return types for tasks will use style similar to most documentations featured on docs.microsoft.com References: https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.dbcontext.-ctor?view=efcore-2.1 https://docs.microsoft.com/en-us/dotnet/api/system.io.filestream.readasync?view=netcore-2.1 https://docs.microsoft.com/en-us/dotnet/api/system.io.textwriter.writelineasync?view=netcore-2.1#System_IO_TextWriter_WriteLineAsync_System_Char___ And many more other asynchronous method documentations featured in the latest BCL. * Added documentation for many audit log data types, fixed vowel indefinite articles * Change audit log data types to start with 'Contains' (verb) instead of an article * Fix some documentation issues and document some more audit log data types * Fix English posession * Add XML doc * Documented two more types * Documented RoleCreateAuditLogData * Document remaining audit log data types * Added RestDMChannel documentation * Added RestGuildChannel documentation * Added RestTextChannel documentation * Added RestVoiceChannel documentation * Added RestUser documentation * Added RestRole documentation * Added RestMessage documentation * Slightly better wording * Contains -> Contains a piece of (describe article) * [EN] Present perf. -> past perf. * Add XML docs * Fix arrow alignment * Clarify supported nullable type * Fixed a typo in ISnowflakeEntity * Added RestUser Documentation * Added RestInvite documentation * Add XML docs & minor optimizations * Minor optimization for doc rendering * Rollback font optimization changes * Amendments to RestUser * Added SocketDMChannel documentation * Added RestDMChannel documentation * Added RestGuild documentation * Adjustment to SocketDMChannel * Added minimal descriptions from the API documentation for Integration types * Added obsolete mention to the ReadMessages flag. * Added remarks about 2FA requirement for guild permissions * Added xmldoc for GuildPermission methods * Added xml doc for ToAllowList and ToDenyList * Added specification of how the bits of the color raw value are packed * Added discord API documentation to IConnection interface * I can spell :^) * Fix whitespace in ChannelPermission * fix spacing of values in guildpermission * Made changes to get field descriptions from feedback, added returns tag to IConnection * Added property get standard for IntegrationAccount * Added property get pattern to xml docs and identical returns tag. * Change all color class references to struct ...because it isn't a class. * Add XML docs * Rewrote the returns tags in IGuildIntegration, removed the ones I was unsure about. * Rewrote the rest of the returns tags * Amendments * Cleanup doc for c1d78189 * Added types to <returns> tags where missing * Added second sample for adding reactions * Added some class summaries * Missed a period * Amendments * restored the removed line break * Removed unnecessary see tag * Use consistent quotation marks around subscribers, the name for these users are dependant on the source of where they are integrated from (youtube or twitch), so we should not use a name that is specific to one platform * Add <remarks> tag to the IGuildIntegration xmldocs * Fix grammar issue * Update DescriptionGenerator * Cleanup of https://github.com/Still34/Discord.Net/pull/8 * Cleanup previous PR * Fix for misleading behaviour in the emoji guide + Original lines stated that sending a emoji wrapped in colon will not be parsed, but that was incorrect; replaced with reactions instead of sending messages as the example * Add strings for dictionary in DotSettings * Add XML docs * Fix lots of typos in comments + Geez, I didn't know there were so many. * Add XML docs & rewrite GetMessagesAsync docs This commit rewrites the remarks section of GetMessagesAsync, as well as adding examples to several methods. * Update 'Your First Bot' + This commit reflects the new changes made to the Discord Application Developer Portal after its major update * Initial optimization for DocFX render & add missing files * Add examples in message methods * Cleanup https://github.com/RogueException/Discord.Net/pull/1128 * Fix first bot note * Cleanup FAQ structure * Add XML docs * Update docfx plugins * Fix navbar collapsing issue * Fix broken xref * Cleanup FAQ section + Add introductory paragraphs to each FAQ section. + Add 'missing dependency' entry to commands FAQ. * Split commands FAQ to 'General' and 'DI' sections. * Cleanup https://github.com/RogueException/Discord.Net/pull/1139 * Fix missing namespace * Add missing highlighting css for the light theme * Add additional clarification for installing packages * Add indentation to example for clarity * Cleanup several articles to be more human-friendly and easier to read * Remove RPC-related notes * Cleanup slow-mode-related documentation strings * Add an additional note about cross-guild emote usage * Add CreateTextChannel sample * Add XMLDocs
6 years ago
docs: Main docs update (#1304) * Remove template in favor of official samples * Fixed a variable name copy pasta mistake line 35 was _database.GetData() instead of DBService.GetData() * Experimental theme change * Change paragraph, code, heading fonts * Widen viewport * Update DocFX.Plugins.LastModified v1.2.3 * Exclude Discord.API in docs * Add remarks for SocketReaction properties * Add examples for BaseSocketClient.Events * Add additional clarification for some methods * Move IUser and IGuildChannel examples * Clarify several guides samples with notes - Reword TypeReader comment to avoid giving the idea that the sample itself is "obsolete" - Remove CommandException logging comment regarding C#7.0 as the version is now the standard across VS2017 and up - Remove suggestion about handling result in command handler since it is now advised to use CommandExecuted instead + Add additional comment to clarify ctor for DI setup * Add/migrate code examples * Incorporate material design theme License @ https://github.com/ovasquez * Update installation and nightly guide * Fix improper indentations made obvious by the widen viewport * Fix minor grammar issues + Add installation for nightly build using dotnet CLI * Fix nav level indentation * Revise "Your First Bot" article * Merge some paragraphs to avoid clutter while keeping readability * Reword the use of command framework + Add additional warning/note about environment variable * Add additional indent level * Fix indentation text warping * Remove connections sample * Update logging sample Remove redundant part of the sample * Remove mention of RPC * Remove misleading section about commands - Remove command sample from complete snippet * Revise "Your First Bot" command paragraphs * Change wording to hint devs that additional command parser packages may be available, as more and more begin to crop up * Update themes * Add XML docs contribution guidelines Update guidelines * Update CommandExecuted remarks * Fix precondition remarks typo no one saw that ok * Fix permission sample in docfx * Fix IMessageChannel samples * Update docs/_template/light-dark-theme/styles/docfx.vendor.minify.css Co-Authored-By: Still34 <341464@gmail.com> * Update docs/_template/light-dark-theme/styles/material.css Co-Authored-By: Still34 <341464@gmail.com> * Update docs/_template/light-dark-theme/styles/material.css Co-Authored-By: Still34 <341464@gmail.com>
6 years ago
Documentation Overhaul (#1161) * Add XML docs * Clean up style switcher * Squash commits on branch docs/faq-n-patches * Fix broken theme selector * Add local image embed instruction * Add a bunch of XML docs * Add a bunch of XML docs * Fix broken search + DocFX by default ships with an older version of jQuery, switching to a newer version confuses parts of the DocFX Javascript. * Minor fixes for CONTRIBUTING.md and README.md * Clean up filterConfig.yml + New config exposes Discord.Net namespace since it has several common public exceptions that may be helpful to users * Add XML docs * Read token from Environment Variable instead of hardcode * Add XMLDocs * Compress some assets & add OAuth2 URL generator * Fix sample link & add missing pictures * Add tag examples * Fix embed docs consistency * Add details regarding userbot support * Add XML Docs * Add XML Docs * Add XML Docs * Minor fixes in documentations + Fix unescaped '<' + Fix typo * Fix seealso for preconditions and add missing descriptions * Add missing exceptions * Document exposed TypeReaders * Fix letter-casing for files * Add 'last modified' plugin Source: https://github.com/Still34/DocFx.Plugin.LastModified Licensed under MIT License * XML Docs * Fix minor consistencies & redundant impl * Add properties examples to overwrite * Fix missing Username prop * Add warning for bulk-delete endpoint * Replace note block * Add BaseSocketClient docs * Add XML docs * Replace langword null to code block null instead - Because DocFX sucks at rendering langword * Replace all langword placements with code block * Add more IGuild docs * Add details to SpotifyGame * Initial proofread of the articles * Add explanation for RunMode * Add event docs - MessageReceived - ChannelUpdated/Destroyed/Created * Fix light theme link color * Fix xml docs error * Add partial documentation for audit log impl * Add documentation for some REST-based objects * Add partial documentation for audit log objects * Add more XML comments to quotation mark alias map stuff, including an example * Add reference to CommandServiceConfig from the util docs' * Add explanation that if " is removed then it wont work * Fix missing service provider in example * Add documentation for new INestedChannel * Add documentation * Add documentation for new API version & few events * Revise guide paragraphs/samples + Fix various formatting. + Provide a more detailed walkthrough for dependency injection. + Add C# note at intro. * Fix typos & formatting * Improve group module example * Small amount to see if I'm doing it right * Remove/cleanup redundant variables * Fix EnterTypingState impl for doc inheritance * Fix Test to resolve changes made in 15b58e * Improve precondition documentation + Add precondition usage sample + Add precondition group usage sample + Move precondition samples to its own sample folder * Move samples to individual folders * Clarify token source * Cleanup styling of README.md for docs * Replace InvalidPathChars for NS1.3 * InvalidPathChars does not exist in NS1.3; replaced with GetInvalidPathChars instead. * Add a missing change for 2c7cc738 * Update LastModified to v1.1.0 & add license * Rewrite installation page for Core 2.1 * Fix anchor link * Bump post-processor to v1.1.1 * Add fixes to partial file & add license * Moved theme-switcher code to scripts partial file + Add author's MIT license to featherlight javascript * Remove unused bootstrap plugin * Bump LastModified plugin * Changed the path from 'lastmodified' to 'last-modified' for consistency * Cleanup README & Contribution guide * Changes to last pr * Fix GetCategoryAsync docs * Proofread and cleanup articles * Change passive voice in "Get Started" to active * Fix improper preposition in Commands Introduction page * Fix minor grammar mistakes in "Your First Bot" (future tense -> present tense/subjunctive mood -> indicative mood/proper noun casing/incorrect noun/add missing article) * Fix minor grammar mistakes in "Installation" (missing article) * no hablo ingles * Try try try again * I'm sure you're having as much fun as I am * Cleanup TOC & fix titles * Improve styling + Change title font to Noto Sans + Add materialized design for commit message box * Add DescriptionGenerator plugin * Add nightly section for clarification * Fix typos in Nightlies & Post-execution * Bump DescriptionGenerator to v1.1.0 + This build adds the functionality of generating managed references' summary into the description tag. * Initial emoji article draft * Add 'additional information' section for emoji article * Add cosmetic changes to the master css * Alter info box color + Add transition to article content * Add clarification in the emoji article * Emphasize that normal emoji string will not translate to its Unicode representation. * Clean up or add some of the samples featured in the article. + Add emoji/emote declaration section for clarification. + Add WebSocket emote sample. - Remove inconsistent styling ('wacky memes' proves to be too out of place). * Improve readability for nightlies article * Move 'Bundled Preconditions' section * Bump LastModified to fix UTC DateTime parsing * Add langwordMapping.yml * Add XML docs * Add VSC workspace rule * The root workspace limits the ruler to 120 characters for member documentations and excludes folders such as 'samples' and 'docs'. * The docs workspace limits the ruler to 70 characters for standard conceptual article to comply with documentation's CONTRIBUTING.md rule, and excludes temprorary folders created by DocFX. * Update CONTRIBUTING.md * Add documentation style rule * Fix styling of several member documentation * Fix ' />' caused by Agent Smith oddities * Fix styling to be more specific about the mention of IDs * Fix exception summary to comply with official Microsoft Docs style * References https://docs.microsoft.com/en-us/dotnet/api/system.argumentnullexception?view=netframework-4.7.2 https://docs.microsoft.com/en-us/dotnet/api/system.platformnotsupportedexception?view=netframework-4.7.2 https://docs.microsoft.com/en-us/dotnet/api/system.badimageformatexception?view=netframework-4.7.2 * Add XML documentations * Shift color return docs * Fix minor docs * Added documentation for SocketDMChannel, SocketGuildChannel, and SocketTextChannel * Add XML docs * Corrections to SocketGuildChannel * Corrections to SocketTextChannel * Corrections to SocketDMChannel * Swapped out 'id' for 'snowflake identifier * Swapped out 'id' for 'snowflake identifier' * SocketDMChannel amendments * SocketGuildChannel amendments * SocketTextChannel amendments * Add XML docs & patch return types + Starting from this commit, all return types for tasks will use style similar to most documentations featured on docs.microsoft.com References: https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.dbcontext.-ctor?view=efcore-2.1 https://docs.microsoft.com/en-us/dotnet/api/system.io.filestream.readasync?view=netcore-2.1 https://docs.microsoft.com/en-us/dotnet/api/system.io.textwriter.writelineasync?view=netcore-2.1#System_IO_TextWriter_WriteLineAsync_System_Char___ And many more other asynchronous method documentations featured in the latest BCL. * Added documentation for many audit log data types, fixed vowel indefinite articles * Change audit log data types to start with 'Contains' (verb) instead of an article * Fix some documentation issues and document some more audit log data types * Fix English posession * Add XML doc * Documented two more types * Documented RoleCreateAuditLogData * Document remaining audit log data types * Added RestDMChannel documentation * Added RestGuildChannel documentation * Added RestTextChannel documentation * Added RestVoiceChannel documentation * Added RestUser documentation * Added RestRole documentation * Added RestMessage documentation * Slightly better wording * Contains -> Contains a piece of (describe article) * [EN] Present perf. -> past perf. * Add XML docs * Fix arrow alignment * Clarify supported nullable type * Fixed a typo in ISnowflakeEntity * Added RestUser Documentation * Added RestInvite documentation * Add XML docs & minor optimizations * Minor optimization for doc rendering * Rollback font optimization changes * Amendments to RestUser * Added SocketDMChannel documentation * Added RestDMChannel documentation * Added RestGuild documentation * Adjustment to SocketDMChannel * Added minimal descriptions from the API documentation for Integration types * Added obsolete mention to the ReadMessages flag. * Added remarks about 2FA requirement for guild permissions * Added xmldoc for GuildPermission methods * Added xml doc for ToAllowList and ToDenyList * Added specification of how the bits of the color raw value are packed * Added discord API documentation to IConnection interface * I can spell :^) * Fix whitespace in ChannelPermission * fix spacing of values in guildpermission * Made changes to get field descriptions from feedback, added returns tag to IConnection * Added property get standard for IntegrationAccount * Added property get pattern to xml docs and identical returns tag. * Change all color class references to struct ...because it isn't a class. * Add XML docs * Rewrote the returns tags in IGuildIntegration, removed the ones I was unsure about. * Rewrote the rest of the returns tags * Amendments * Cleanup doc for c1d78189 * Added types to <returns> tags where missing * Added second sample for adding reactions * Added some class summaries * Missed a period * Amendments * restored the removed line break * Removed unnecessary see tag * Use consistent quotation marks around subscribers, the name for these users are dependant on the source of where they are integrated from (youtube or twitch), so we should not use a name that is specific to one platform * Add <remarks> tag to the IGuildIntegration xmldocs * Fix grammar issue * Update DescriptionGenerator * Cleanup of https://github.com/Still34/Discord.Net/pull/8 * Cleanup previous PR * Fix for misleading behaviour in the emoji guide + Original lines stated that sending a emoji wrapped in colon will not be parsed, but that was incorrect; replaced with reactions instead of sending messages as the example * Add strings for dictionary in DotSettings * Add XML docs * Fix lots of typos in comments + Geez, I didn't know there were so many. * Add XML docs & rewrite GetMessagesAsync docs This commit rewrites the remarks section of GetMessagesAsync, as well as adding examples to several methods. * Update 'Your First Bot' + This commit reflects the new changes made to the Discord Application Developer Portal after its major update * Initial optimization for DocFX render & add missing files * Add examples in message methods * Cleanup https://github.com/RogueException/Discord.Net/pull/1128 * Fix first bot note * Cleanup FAQ structure * Add XML docs * Update docfx plugins * Fix navbar collapsing issue * Fix broken xref * Cleanup FAQ section + Add introductory paragraphs to each FAQ section. + Add 'missing dependency' entry to commands FAQ. * Split commands FAQ to 'General' and 'DI' sections. * Cleanup https://github.com/RogueException/Discord.Net/pull/1139 * Fix missing namespace * Add missing highlighting css for the light theme * Add additional clarification for installing packages * Add indentation to example for clarity * Cleanup several articles to be more human-friendly and easier to read * Remove RPC-related notes * Cleanup slow-mode-related documentation strings * Add an additional note about cross-guild emote usage * Add CreateTextChannel sample * Add XMLDocs
6 years ago
docs: Main docs update (#1304) * Remove template in favor of official samples * Fixed a variable name copy pasta mistake line 35 was _database.GetData() instead of DBService.GetData() * Experimental theme change * Change paragraph, code, heading fonts * Widen viewport * Update DocFX.Plugins.LastModified v1.2.3 * Exclude Discord.API in docs * Add remarks for SocketReaction properties * Add examples for BaseSocketClient.Events * Add additional clarification for some methods * Move IUser and IGuildChannel examples * Clarify several guides samples with notes - Reword TypeReader comment to avoid giving the idea that the sample itself is "obsolete" - Remove CommandException logging comment regarding C#7.0 as the version is now the standard across VS2017 and up - Remove suggestion about handling result in command handler since it is now advised to use CommandExecuted instead + Add additional comment to clarify ctor for DI setup * Add/migrate code examples * Incorporate material design theme License @ https://github.com/ovasquez * Update installation and nightly guide * Fix improper indentations made obvious by the widen viewport * Fix minor grammar issues + Add installation for nightly build using dotnet CLI * Fix nav level indentation * Revise "Your First Bot" article * Merge some paragraphs to avoid clutter while keeping readability * Reword the use of command framework + Add additional warning/note about environment variable * Add additional indent level * Fix indentation text warping * Remove connections sample * Update logging sample Remove redundant part of the sample * Remove mention of RPC * Remove misleading section about commands - Remove command sample from complete snippet * Revise "Your First Bot" command paragraphs * Change wording to hint devs that additional command parser packages may be available, as more and more begin to crop up * Update themes * Add XML docs contribution guidelines Update guidelines * Update CommandExecuted remarks * Fix precondition remarks typo no one saw that ok * Fix permission sample in docfx * Fix IMessageChannel samples * Update docs/_template/light-dark-theme/styles/docfx.vendor.minify.css Co-Authored-By: Still34 <341464@gmail.com> * Update docs/_template/light-dark-theme/styles/material.css Co-Authored-By: Still34 <341464@gmail.com> * Update docs/_template/light-dark-theme/styles/material.css Co-Authored-By: Still34 <341464@gmail.com>
6 years ago
Documentation Overhaul (#1161) * Add XML docs * Clean up style switcher * Squash commits on branch docs/faq-n-patches * Fix broken theme selector * Add local image embed instruction * Add a bunch of XML docs * Add a bunch of XML docs * Fix broken search + DocFX by default ships with an older version of jQuery, switching to a newer version confuses parts of the DocFX Javascript. * Minor fixes for CONTRIBUTING.md and README.md * Clean up filterConfig.yml + New config exposes Discord.Net namespace since it has several common public exceptions that may be helpful to users * Add XML docs * Read token from Environment Variable instead of hardcode * Add XMLDocs * Compress some assets & add OAuth2 URL generator * Fix sample link & add missing pictures * Add tag examples * Fix embed docs consistency * Add details regarding userbot support * Add XML Docs * Add XML Docs * Add XML Docs * Minor fixes in documentations + Fix unescaped '<' + Fix typo * Fix seealso for preconditions and add missing descriptions * Add missing exceptions * Document exposed TypeReaders * Fix letter-casing for files * Add 'last modified' plugin Source: https://github.com/Still34/DocFx.Plugin.LastModified Licensed under MIT License * XML Docs * Fix minor consistencies & redundant impl * Add properties examples to overwrite * Fix missing Username prop * Add warning for bulk-delete endpoint * Replace note block * Add BaseSocketClient docs * Add XML docs * Replace langword null to code block null instead - Because DocFX sucks at rendering langword * Replace all langword placements with code block * Add more IGuild docs * Add details to SpotifyGame * Initial proofread of the articles * Add explanation for RunMode * Add event docs - MessageReceived - ChannelUpdated/Destroyed/Created * Fix light theme link color * Fix xml docs error * Add partial documentation for audit log impl * Add documentation for some REST-based objects * Add partial documentation for audit log objects * Add more XML comments to quotation mark alias map stuff, including an example * Add reference to CommandServiceConfig from the util docs' * Add explanation that if " is removed then it wont work * Fix missing service provider in example * Add documentation for new INestedChannel * Add documentation * Add documentation for new API version & few events * Revise guide paragraphs/samples + Fix various formatting. + Provide a more detailed walkthrough for dependency injection. + Add C# note at intro. * Fix typos & formatting * Improve group module example * Small amount to see if I'm doing it right * Remove/cleanup redundant variables * Fix EnterTypingState impl for doc inheritance * Fix Test to resolve changes made in 15b58e * Improve precondition documentation + Add precondition usage sample + Add precondition group usage sample + Move precondition samples to its own sample folder * Move samples to individual folders * Clarify token source * Cleanup styling of README.md for docs * Replace InvalidPathChars for NS1.3 * InvalidPathChars does not exist in NS1.3; replaced with GetInvalidPathChars instead. * Add a missing change for 2c7cc738 * Update LastModified to v1.1.0 & add license * Rewrite installation page for Core 2.1 * Fix anchor link * Bump post-processor to v1.1.1 * Add fixes to partial file & add license * Moved theme-switcher code to scripts partial file + Add author's MIT license to featherlight javascript * Remove unused bootstrap plugin * Bump LastModified plugin * Changed the path from 'lastmodified' to 'last-modified' for consistency * Cleanup README & Contribution guide * Changes to last pr * Fix GetCategoryAsync docs * Proofread and cleanup articles * Change passive voice in "Get Started" to active * Fix improper preposition in Commands Introduction page * Fix minor grammar mistakes in "Your First Bot" (future tense -> present tense/subjunctive mood -> indicative mood/proper noun casing/incorrect noun/add missing article) * Fix minor grammar mistakes in "Installation" (missing article) * no hablo ingles * Try try try again * I'm sure you're having as much fun as I am * Cleanup TOC & fix titles * Improve styling + Change title font to Noto Sans + Add materialized design for commit message box * Add DescriptionGenerator plugin * Add nightly section for clarification * Fix typos in Nightlies & Post-execution * Bump DescriptionGenerator to v1.1.0 + This build adds the functionality of generating managed references' summary into the description tag. * Initial emoji article draft * Add 'additional information' section for emoji article * Add cosmetic changes to the master css * Alter info box color + Add transition to article content * Add clarification in the emoji article * Emphasize that normal emoji string will not translate to its Unicode representation. * Clean up or add some of the samples featured in the article. + Add emoji/emote declaration section for clarification. + Add WebSocket emote sample. - Remove inconsistent styling ('wacky memes' proves to be too out of place). * Improve readability for nightlies article * Move 'Bundled Preconditions' section * Bump LastModified to fix UTC DateTime parsing * Add langwordMapping.yml * Add XML docs * Add VSC workspace rule * The root workspace limits the ruler to 120 characters for member documentations and excludes folders such as 'samples' and 'docs'. * The docs workspace limits the ruler to 70 characters for standard conceptual article to comply with documentation's CONTRIBUTING.md rule, and excludes temprorary folders created by DocFX. * Update CONTRIBUTING.md * Add documentation style rule * Fix styling of several member documentation * Fix ' />' caused by Agent Smith oddities * Fix styling to be more specific about the mention of IDs * Fix exception summary to comply with official Microsoft Docs style * References https://docs.microsoft.com/en-us/dotnet/api/system.argumentnullexception?view=netframework-4.7.2 https://docs.microsoft.com/en-us/dotnet/api/system.platformnotsupportedexception?view=netframework-4.7.2 https://docs.microsoft.com/en-us/dotnet/api/system.badimageformatexception?view=netframework-4.7.2 * Add XML documentations * Shift color return docs * Fix minor docs * Added documentation for SocketDMChannel, SocketGuildChannel, and SocketTextChannel * Add XML docs * Corrections to SocketGuildChannel * Corrections to SocketTextChannel * Corrections to SocketDMChannel * Swapped out 'id' for 'snowflake identifier * Swapped out 'id' for 'snowflake identifier' * SocketDMChannel amendments * SocketGuildChannel amendments * SocketTextChannel amendments * Add XML docs & patch return types + Starting from this commit, all return types for tasks will use style similar to most documentations featured on docs.microsoft.com References: https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.dbcontext.-ctor?view=efcore-2.1 https://docs.microsoft.com/en-us/dotnet/api/system.io.filestream.readasync?view=netcore-2.1 https://docs.microsoft.com/en-us/dotnet/api/system.io.textwriter.writelineasync?view=netcore-2.1#System_IO_TextWriter_WriteLineAsync_System_Char___ And many more other asynchronous method documentations featured in the latest BCL. * Added documentation for many audit log data types, fixed vowel indefinite articles * Change audit log data types to start with 'Contains' (verb) instead of an article * Fix some documentation issues and document some more audit log data types * Fix English posession * Add XML doc * Documented two more types * Documented RoleCreateAuditLogData * Document remaining audit log data types * Added RestDMChannel documentation * Added RestGuildChannel documentation * Added RestTextChannel documentation * Added RestVoiceChannel documentation * Added RestUser documentation * Added RestRole documentation * Added RestMessage documentation * Slightly better wording * Contains -> Contains a piece of (describe article) * [EN] Present perf. -> past perf. * Add XML docs * Fix arrow alignment * Clarify supported nullable type * Fixed a typo in ISnowflakeEntity * Added RestUser Documentation * Added RestInvite documentation * Add XML docs & minor optimizations * Minor optimization for doc rendering * Rollback font optimization changes * Amendments to RestUser * Added SocketDMChannel documentation * Added RestDMChannel documentation * Added RestGuild documentation * Adjustment to SocketDMChannel * Added minimal descriptions from the API documentation for Integration types * Added obsolete mention to the ReadMessages flag. * Added remarks about 2FA requirement for guild permissions * Added xmldoc for GuildPermission methods * Added xml doc for ToAllowList and ToDenyList * Added specification of how the bits of the color raw value are packed * Added discord API documentation to IConnection interface * I can spell :^) * Fix whitespace in ChannelPermission * fix spacing of values in guildpermission * Made changes to get field descriptions from feedback, added returns tag to IConnection * Added property get standard for IntegrationAccount * Added property get pattern to xml docs and identical returns tag. * Change all color class references to struct ...because it isn't a class. * Add XML docs * Rewrote the returns tags in IGuildIntegration, removed the ones I was unsure about. * Rewrote the rest of the returns tags * Amendments * Cleanup doc for c1d78189 * Added types to <returns> tags where missing * Added second sample for adding reactions * Added some class summaries * Missed a period * Amendments * restored the removed line break * Removed unnecessary see tag * Use consistent quotation marks around subscribers, the name for these users are dependant on the source of where they are integrated from (youtube or twitch), so we should not use a name that is specific to one platform * Add <remarks> tag to the IGuildIntegration xmldocs * Fix grammar issue * Update DescriptionGenerator * Cleanup of https://github.com/Still34/Discord.Net/pull/8 * Cleanup previous PR * Fix for misleading behaviour in the emoji guide + Original lines stated that sending a emoji wrapped in colon will not be parsed, but that was incorrect; replaced with reactions instead of sending messages as the example * Add strings for dictionary in DotSettings * Add XML docs * Fix lots of typos in comments + Geez, I didn't know there were so many. * Add XML docs & rewrite GetMessagesAsync docs This commit rewrites the remarks section of GetMessagesAsync, as well as adding examples to several methods. * Update 'Your First Bot' + This commit reflects the new changes made to the Discord Application Developer Portal after its major update * Initial optimization for DocFX render & add missing files * Add examples in message methods * Cleanup https://github.com/RogueException/Discord.Net/pull/1128 * Fix first bot note * Cleanup FAQ structure * Add XML docs * Update docfx plugins * Fix navbar collapsing issue * Fix broken xref * Cleanup FAQ section + Add introductory paragraphs to each FAQ section. + Add 'missing dependency' entry to commands FAQ. * Split commands FAQ to 'General' and 'DI' sections. * Cleanup https://github.com/RogueException/Discord.Net/pull/1139 * Fix missing namespace * Add missing highlighting css for the light theme * Add additional clarification for installing packages * Add indentation to example for clarity * Cleanup several articles to be more human-friendly and easier to read * Remove RPC-related notes * Cleanup slow-mode-related documentation strings * Add an additional note about cross-guild emote usage * Add CreateTextChannel sample * Add XMLDocs
6 years ago
docs: Main docs update (#1304) * Remove template in favor of official samples * Fixed a variable name copy pasta mistake line 35 was _database.GetData() instead of DBService.GetData() * Experimental theme change * Change paragraph, code, heading fonts * Widen viewport * Update DocFX.Plugins.LastModified v1.2.3 * Exclude Discord.API in docs * Add remarks for SocketReaction properties * Add examples for BaseSocketClient.Events * Add additional clarification for some methods * Move IUser and IGuildChannel examples * Clarify several guides samples with notes - Reword TypeReader comment to avoid giving the idea that the sample itself is "obsolete" - Remove CommandException logging comment regarding C#7.0 as the version is now the standard across VS2017 and up - Remove suggestion about handling result in command handler since it is now advised to use CommandExecuted instead + Add additional comment to clarify ctor for DI setup * Add/migrate code examples * Incorporate material design theme License @ https://github.com/ovasquez * Update installation and nightly guide * Fix improper indentations made obvious by the widen viewport * Fix minor grammar issues + Add installation for nightly build using dotnet CLI * Fix nav level indentation * Revise "Your First Bot" article * Merge some paragraphs to avoid clutter while keeping readability * Reword the use of command framework + Add additional warning/note about environment variable * Add additional indent level * Fix indentation text warping * Remove connections sample * Update logging sample Remove redundant part of the sample * Remove mention of RPC * Remove misleading section about commands - Remove command sample from complete snippet * Revise "Your First Bot" command paragraphs * Change wording to hint devs that additional command parser packages may be available, as more and more begin to crop up * Update themes * Add XML docs contribution guidelines Update guidelines * Update CommandExecuted remarks * Fix precondition remarks typo no one saw that ok * Fix permission sample in docfx * Fix IMessageChannel samples * Update docs/_template/light-dark-theme/styles/docfx.vendor.minify.css Co-Authored-By: Still34 <341464@gmail.com> * Update docs/_template/light-dark-theme/styles/material.css Co-Authored-By: Still34 <341464@gmail.com> * Update docs/_template/light-dark-theme/styles/material.css Co-Authored-By: Still34 <341464@gmail.com>
6 years ago
Documentation Overhaul (#1161) * Add XML docs * Clean up style switcher * Squash commits on branch docs/faq-n-patches * Fix broken theme selector * Add local image embed instruction * Add a bunch of XML docs * Add a bunch of XML docs * Fix broken search + DocFX by default ships with an older version of jQuery, switching to a newer version confuses parts of the DocFX Javascript. * Minor fixes for CONTRIBUTING.md and README.md * Clean up filterConfig.yml + New config exposes Discord.Net namespace since it has several common public exceptions that may be helpful to users * Add XML docs * Read token from Environment Variable instead of hardcode * Add XMLDocs * Compress some assets & add OAuth2 URL generator * Fix sample link & add missing pictures * Add tag examples * Fix embed docs consistency * Add details regarding userbot support * Add XML Docs * Add XML Docs * Add XML Docs * Minor fixes in documentations + Fix unescaped '<' + Fix typo * Fix seealso for preconditions and add missing descriptions * Add missing exceptions * Document exposed TypeReaders * Fix letter-casing for files * Add 'last modified' plugin Source: https://github.com/Still34/DocFx.Plugin.LastModified Licensed under MIT License * XML Docs * Fix minor consistencies & redundant impl * Add properties examples to overwrite * Fix missing Username prop * Add warning for bulk-delete endpoint * Replace note block * Add BaseSocketClient docs * Add XML docs * Replace langword null to code block null instead - Because DocFX sucks at rendering langword * Replace all langword placements with code block * Add more IGuild docs * Add details to SpotifyGame * Initial proofread of the articles * Add explanation for RunMode * Add event docs - MessageReceived - ChannelUpdated/Destroyed/Created * Fix light theme link color * Fix xml docs error * Add partial documentation for audit log impl * Add documentation for some REST-based objects * Add partial documentation for audit log objects * Add more XML comments to quotation mark alias map stuff, including an example * Add reference to CommandServiceConfig from the util docs' * Add explanation that if " is removed then it wont work * Fix missing service provider in example * Add documentation for new INestedChannel * Add documentation * Add documentation for new API version & few events * Revise guide paragraphs/samples + Fix various formatting. + Provide a more detailed walkthrough for dependency injection. + Add C# note at intro. * Fix typos & formatting * Improve group module example * Small amount to see if I'm doing it right * Remove/cleanup redundant variables * Fix EnterTypingState impl for doc inheritance * Fix Test to resolve changes made in 15b58e * Improve precondition documentation + Add precondition usage sample + Add precondition group usage sample + Move precondition samples to its own sample folder * Move samples to individual folders * Clarify token source * Cleanup styling of README.md for docs * Replace InvalidPathChars for NS1.3 * InvalidPathChars does not exist in NS1.3; replaced with GetInvalidPathChars instead. * Add a missing change for 2c7cc738 * Update LastModified to v1.1.0 & add license * Rewrite installation page for Core 2.1 * Fix anchor link * Bump post-processor to v1.1.1 * Add fixes to partial file & add license * Moved theme-switcher code to scripts partial file + Add author's MIT license to featherlight javascript * Remove unused bootstrap plugin * Bump LastModified plugin * Changed the path from 'lastmodified' to 'last-modified' for consistency * Cleanup README & Contribution guide * Changes to last pr * Fix GetCategoryAsync docs * Proofread and cleanup articles * Change passive voice in "Get Started" to active * Fix improper preposition in Commands Introduction page * Fix minor grammar mistakes in "Your First Bot" (future tense -> present tense/subjunctive mood -> indicative mood/proper noun casing/incorrect noun/add missing article) * Fix minor grammar mistakes in "Installation" (missing article) * no hablo ingles * Try try try again * I'm sure you're having as much fun as I am * Cleanup TOC & fix titles * Improve styling + Change title font to Noto Sans + Add materialized design for commit message box * Add DescriptionGenerator plugin * Add nightly section for clarification * Fix typos in Nightlies & Post-execution * Bump DescriptionGenerator to v1.1.0 + This build adds the functionality of generating managed references' summary into the description tag. * Initial emoji article draft * Add 'additional information' section for emoji article * Add cosmetic changes to the master css * Alter info box color + Add transition to article content * Add clarification in the emoji article * Emphasize that normal emoji string will not translate to its Unicode representation. * Clean up or add some of the samples featured in the article. + Add emoji/emote declaration section for clarification. + Add WebSocket emote sample. - Remove inconsistent styling ('wacky memes' proves to be too out of place). * Improve readability for nightlies article * Move 'Bundled Preconditions' section * Bump LastModified to fix UTC DateTime parsing * Add langwordMapping.yml * Add XML docs * Add VSC workspace rule * The root workspace limits the ruler to 120 characters for member documentations and excludes folders such as 'samples' and 'docs'. * The docs workspace limits the ruler to 70 characters for standard conceptual article to comply with documentation's CONTRIBUTING.md rule, and excludes temprorary folders created by DocFX. * Update CONTRIBUTING.md * Add documentation style rule * Fix styling of several member documentation * Fix ' />' caused by Agent Smith oddities * Fix styling to be more specific about the mention of IDs * Fix exception summary to comply with official Microsoft Docs style * References https://docs.microsoft.com/en-us/dotnet/api/system.argumentnullexception?view=netframework-4.7.2 https://docs.microsoft.com/en-us/dotnet/api/system.platformnotsupportedexception?view=netframework-4.7.2 https://docs.microsoft.com/en-us/dotnet/api/system.badimageformatexception?view=netframework-4.7.2 * Add XML documentations * Shift color return docs * Fix minor docs * Added documentation for SocketDMChannel, SocketGuildChannel, and SocketTextChannel * Add XML docs * Corrections to SocketGuildChannel * Corrections to SocketTextChannel * Corrections to SocketDMChannel * Swapped out 'id' for 'snowflake identifier * Swapped out 'id' for 'snowflake identifier' * SocketDMChannel amendments * SocketGuildChannel amendments * SocketTextChannel amendments * Add XML docs & patch return types + Starting from this commit, all return types for tasks will use style similar to most documentations featured on docs.microsoft.com References: https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.dbcontext.-ctor?view=efcore-2.1 https://docs.microsoft.com/en-us/dotnet/api/system.io.filestream.readasync?view=netcore-2.1 https://docs.microsoft.com/en-us/dotnet/api/system.io.textwriter.writelineasync?view=netcore-2.1#System_IO_TextWriter_WriteLineAsync_System_Char___ And many more other asynchronous method documentations featured in the latest BCL. * Added documentation for many audit log data types, fixed vowel indefinite articles * Change audit log data types to start with 'Contains' (verb) instead of an article * Fix some documentation issues and document some more audit log data types * Fix English posession * Add XML doc * Documented two more types * Documented RoleCreateAuditLogData * Document remaining audit log data types * Added RestDMChannel documentation * Added RestGuildChannel documentation * Added RestTextChannel documentation * Added RestVoiceChannel documentation * Added RestUser documentation * Added RestRole documentation * Added RestMessage documentation * Slightly better wording * Contains -> Contains a piece of (describe article) * [EN] Present perf. -> past perf. * Add XML docs * Fix arrow alignment * Clarify supported nullable type * Fixed a typo in ISnowflakeEntity * Added RestUser Documentation * Added RestInvite documentation * Add XML docs & minor optimizations * Minor optimization for doc rendering * Rollback font optimization changes * Amendments to RestUser * Added SocketDMChannel documentation * Added RestDMChannel documentation * Added RestGuild documentation * Adjustment to SocketDMChannel * Added minimal descriptions from the API documentation for Integration types * Added obsolete mention to the ReadMessages flag. * Added remarks about 2FA requirement for guild permissions * Added xmldoc for GuildPermission methods * Added xml doc for ToAllowList and ToDenyList * Added specification of how the bits of the color raw value are packed * Added discord API documentation to IConnection interface * I can spell :^) * Fix whitespace in ChannelPermission * fix spacing of values in guildpermission * Made changes to get field descriptions from feedback, added returns tag to IConnection * Added property get standard for IntegrationAccount * Added property get pattern to xml docs and identical returns tag. * Change all color class references to struct ...because it isn't a class. * Add XML docs * Rewrote the returns tags in IGuildIntegration, removed the ones I was unsure about. * Rewrote the rest of the returns tags * Amendments * Cleanup doc for c1d78189 * Added types to <returns> tags where missing * Added second sample for adding reactions * Added some class summaries * Missed a period * Amendments * restored the removed line break * Removed unnecessary see tag * Use consistent quotation marks around subscribers, the name for these users are dependant on the source of where they are integrated from (youtube or twitch), so we should not use a name that is specific to one platform * Add <remarks> tag to the IGuildIntegration xmldocs * Fix grammar issue * Update DescriptionGenerator * Cleanup of https://github.com/Still34/Discord.Net/pull/8 * Cleanup previous PR * Fix for misleading behaviour in the emoji guide + Original lines stated that sending a emoji wrapped in colon will not be parsed, but that was incorrect; replaced with reactions instead of sending messages as the example * Add strings for dictionary in DotSettings * Add XML docs * Fix lots of typos in comments + Geez, I didn't know there were so many. * Add XML docs & rewrite GetMessagesAsync docs This commit rewrites the remarks section of GetMessagesAsync, as well as adding examples to several methods. * Update 'Your First Bot' + This commit reflects the new changes made to the Discord Application Developer Portal after its major update * Initial optimization for DocFX render & add missing files * Add examples in message methods * Cleanup https://github.com/RogueException/Discord.Net/pull/1128 * Fix first bot note * Cleanup FAQ structure * Add XML docs * Update docfx plugins * Fix navbar collapsing issue * Fix broken xref * Cleanup FAQ section + Add introductory paragraphs to each FAQ section. + Add 'missing dependency' entry to commands FAQ. * Split commands FAQ to 'General' and 'DI' sections. * Cleanup https://github.com/RogueException/Discord.Net/pull/1139 * Fix missing namespace * Add missing highlighting css for the light theme * Add additional clarification for installing packages * Add indentation to example for clarity * Cleanup several articles to be more human-friendly and easier to read * Remove RPC-related notes * Cleanup slow-mode-related documentation strings * Add an additional note about cross-guild emote usage * Add CreateTextChannel sample * Add XMLDocs
6 years ago
docs: Main docs update (#1304) * Remove template in favor of official samples * Fixed a variable name copy pasta mistake line 35 was _database.GetData() instead of DBService.GetData() * Experimental theme change * Change paragraph, code, heading fonts * Widen viewport * Update DocFX.Plugins.LastModified v1.2.3 * Exclude Discord.API in docs * Add remarks for SocketReaction properties * Add examples for BaseSocketClient.Events * Add additional clarification for some methods * Move IUser and IGuildChannel examples * Clarify several guides samples with notes - Reword TypeReader comment to avoid giving the idea that the sample itself is "obsolete" - Remove CommandException logging comment regarding C#7.0 as the version is now the standard across VS2017 and up - Remove suggestion about handling result in command handler since it is now advised to use CommandExecuted instead + Add additional comment to clarify ctor for DI setup * Add/migrate code examples * Incorporate material design theme License @ https://github.com/ovasquez * Update installation and nightly guide * Fix improper indentations made obvious by the widen viewport * Fix minor grammar issues + Add installation for nightly build using dotnet CLI * Fix nav level indentation * Revise "Your First Bot" article * Merge some paragraphs to avoid clutter while keeping readability * Reword the use of command framework + Add additional warning/note about environment variable * Add additional indent level * Fix indentation text warping * Remove connections sample * Update logging sample Remove redundant part of the sample * Remove mention of RPC * Remove misleading section about commands - Remove command sample from complete snippet * Revise "Your First Bot" command paragraphs * Change wording to hint devs that additional command parser packages may be available, as more and more begin to crop up * Update themes * Add XML docs contribution guidelines Update guidelines * Update CommandExecuted remarks * Fix precondition remarks typo no one saw that ok * Fix permission sample in docfx * Fix IMessageChannel samples * Update docs/_template/light-dark-theme/styles/docfx.vendor.minify.css Co-Authored-By: Still34 <341464@gmail.com> * Update docs/_template/light-dark-theme/styles/material.css Co-Authored-By: Still34 <341464@gmail.com> * Update docs/_template/light-dark-theme/styles/material.css Co-Authored-By: Still34 <341464@gmail.com>
6 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
Squashed commit of the following: commit 73740e41690a63797d340af90649ad8a07ba9d0e Author: quin lynch <lynchquin@gmail.com> Date: Wed Aug 4 23:17:04 2021 -0300 add sharded events commit dac6ba3603af21f2e4d6f4a3d1397763bf8be62f Merge: 22e3a529 39b7e715 Author: quin lynch <lynchquin@gmail.com> Date: Wed Aug 4 22:16:12 2021 -0300 Merge branch 'feature/stage-channels' of https://github.com/Discord-Net-Labs/Discord.Net-Labs into feature/stage-channels commit 22e3a529e0f997f18f10ed589a645091bdbc423f Author: quin lynch <lynchquin@gmail.com> Date: Wed Aug 4 22:15:03 2021 -0300 Threads pre 2 commit 39b7e715f34f1330c7ba892992a89af961b406f1 Author: Quin Lynch <49576606+quinchs@users.noreply.github.com> Date: Tue Aug 3 20:43:21 2021 -0300 Update README.md commit 56536f64481759b1a49054d18953f96e2daa8573 Author: Quin Lynch <49576606+quinchs@users.noreply.github.com> Date: Tue Aug 3 20:28:27 2021 -0300 Update README.md commit d98e79452c547c3186269c846e2d9df326742926 Author: quin lynch <lynchquin@gmail.com> Date: Sat Jul 31 21:22:56 2021 -0300 Request to speak stuff commit 950fe80cecfceba50e4325c325872ca55a97346b Author: quin lynch <lynchquin@gmail.com> Date: Sat Jul 31 20:59:11 2021 -0300 Rest stage channels commit 360b9436bbcd4e2dd40d11705890b31c4c1a2d7c Author: quin lynch <lynchquin@gmail.com> Date: Sat Jul 31 20:29:38 2021 -0300 Stage channel socket side commit 928edaa03bf24e7536dc0ef1a14835d9a1adcd62 Author: quin lynch <lynchquin@gmail.com> Date: Sat Jul 31 19:19:40 2021 -0300 Add models commit ec58a9b7e8de7cf99560d89bfbfa65ad74c58986 Author: quin lynch <lynchquin@gmail.com> Date: Sat Jul 31 18:59:09 2021 -0300 initial stage channel events
3 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Threading.Tasks;
  4. namespace Discord.WebSocket
  5. {
  6. public partial class BaseSocketClient
  7. {
  8. #region Channels
  9. /// <summary> Fired when a channel is created. </summary>
  10. /// <remarks>
  11. /// <para>
  12. /// This event is fired when a generic channel has been created. The event handler must return a
  13. /// <see cref="Task"/> and accept a <see cref="SocketChannel"/> as its parameter.
  14. /// </para>
  15. /// <para>
  16. /// The newly created channel is passed into the event handler parameter. The given channel type may
  17. /// include, but not limited to, Private Channels (DM, Group), Guild Channels (Text, Voice, Category);
  18. /// see the derived classes of <see cref="SocketChannel"/> for more details.
  19. /// </para>
  20. /// </remarks>
  21. /// <example>
  22. /// <code language="cs" region="ChannelCreated"
  23. /// source="..\Discord.Net.Examples\WebSocket\BaseSocketClient.Events.Examples.cs"/>
  24. /// </example>
  25. public event Func<SocketChannel, Task> ChannelCreated
  26. {
  27. add { _channelCreatedEvent.Add(value); }
  28. remove { _channelCreatedEvent.Remove(value); }
  29. }
  30. internal readonly AsyncEvent<Func<SocketChannel, Task>> _channelCreatedEvent = new AsyncEvent<Func<SocketChannel, Task>>();
  31. /// <summary> Fired when a channel is destroyed. </summary>
  32. /// <remarks>
  33. /// <para>
  34. /// This event is fired when a generic channel has been destroyed. The event handler must return a
  35. /// <see cref="Task"/> and accept a <see cref="SocketChannel"/> as its parameter.
  36. /// </para>
  37. /// <para>
  38. /// The destroyed channel is passed into the event handler parameter. The given channel type may
  39. /// include, but not limited to, Private Channels (DM, Group), Guild Channels (Text, Voice, Category);
  40. /// see the derived classes of <see cref="SocketChannel"/> for more details.
  41. /// </para>
  42. /// </remarks>
  43. /// <example>
  44. /// <code language="cs" region="ChannelDestroyed"
  45. /// source="..\Discord.Net.Examples\WebSocket\BaseSocketClient.Events.Examples.cs"/>
  46. /// </example>
  47. public event Func<SocketChannel, Task> ChannelDestroyed
  48. {
  49. add { _channelDestroyedEvent.Add(value); }
  50. remove { _channelDestroyedEvent.Remove(value); }
  51. }
  52. internal readonly AsyncEvent<Func<SocketChannel, Task>> _channelDestroyedEvent = new AsyncEvent<Func<SocketChannel, Task>>();
  53. /// <summary> Fired when a channel is updated. </summary>
  54. /// <remarks>
  55. /// <para>
  56. /// This event is fired when a generic channel has been destroyed. The event handler must return a
  57. /// <see cref="Task"/> and accept 2 <see cref="SocketChannel"/> as its parameters.
  58. /// </para>
  59. /// <para>
  60. /// The original (prior to update) channel is passed into the first <see cref="SocketChannel"/>, while
  61. /// the updated channel is passed into the second. The given channel type may include, but not limited
  62. /// to, Private Channels (DM, Group), Guild Channels (Text, Voice, Category); see the derived classes of
  63. /// <see cref="SocketChannel"/> for more details.
  64. /// </para>
  65. /// </remarks>
  66. /// <example>
  67. /// <code language="cs" region="ChannelUpdated"
  68. /// source="..\Discord.Net.Examples\WebSocket\BaseSocketClient.Events.Examples.cs"/>
  69. /// </example>
  70. public event Func<SocketChannel, SocketChannel, Task> ChannelUpdated
  71. {
  72. add { _channelUpdatedEvent.Add(value); }
  73. remove { _channelUpdatedEvent.Remove(value); }
  74. }
  75. internal readonly AsyncEvent<Func<SocketChannel, SocketChannel, Task>> _channelUpdatedEvent = new AsyncEvent<Func<SocketChannel, SocketChannel, Task>>();
  76. #endregion
  77. #region Messages
  78. /// <summary> Fired when a message is received. </summary>
  79. /// <remarks>
  80. /// <para>
  81. /// This event is fired when a message is received. The event handler must return a
  82. /// <see cref="Task"/> and accept a <see cref="SocketMessage"/> as its parameter.
  83. /// </para>
  84. /// <para>
  85. /// The message that is sent to the client is passed into the event handler parameter as
  86. /// <see cref="SocketMessage"/>. This message may be a system message (i.e.
  87. /// <see cref="SocketSystemMessage"/>) or a user message (i.e. <see cref="SocketUserMessage"/>. See the
  88. /// derived classes of <see cref="SocketMessage"/> for more details.
  89. /// </para>
  90. /// </remarks>
  91. /// <example>
  92. /// <para>The example below checks if the newly received message contains the target user.</para>
  93. /// <code language="cs" region="MessageReceived"
  94. /// source="..\Discord.Net.Examples\WebSocket\BaseSocketClient.Events.Examples.cs"/>
  95. /// </example>
  96. public event Func<SocketMessage, Task> MessageReceived
  97. {
  98. add { _messageReceivedEvent.Add(value); }
  99. remove { _messageReceivedEvent.Remove(value); }
  100. }
  101. internal readonly AsyncEvent<Func<SocketMessage, Task>> _messageReceivedEvent = new AsyncEvent<Func<SocketMessage, Task>>();
  102. /// <summary> Fired when a message is deleted. </summary>
  103. /// <remarks>
  104. /// <para>
  105. /// This event is fired when a message is deleted. The event handler must return a
  106. /// <see cref="Task"/> and accept a <see cref="Cacheable{TEntity,TId}"/> and
  107. /// <see cref="ISocketMessageChannel"/> as its parameters.
  108. /// </para>
  109. /// <para>
  110. /// <note type="important">
  111. /// It is not possible to retrieve the message via
  112. /// <see cref="Cacheable{TEntity,TId}.DownloadAsync"/>; the message cannot be retrieved by Discord
  113. /// after the message has been deleted.
  114. /// </note>
  115. /// If caching is enabled via <see cref="DiscordSocketConfig"/>, the
  116. /// <see cref="Cacheable{TEntity,TId}"/> entity will contain the deleted message; otherwise, in event
  117. /// that the message cannot be retrieved, the snowflake ID of the message is preserved in the
  118. /// <see cref="ulong"/>.
  119. /// </para>
  120. /// <para>
  121. /// The source channel of the removed message will be passed into the
  122. /// <see cref="ISocketMessageChannel"/> parameter.
  123. /// </para>
  124. /// </remarks>
  125. /// <example>
  126. /// <code language="cs" region="MessageDeleted"
  127. /// source="..\Discord.Net.Examples\WebSocket\BaseSocketClient.Events.Examples.cs" />
  128. /// </example>
  129. public event Func<Cacheable<IMessage, ulong>, Cacheable<IMessageChannel, ulong>, Task> MessageDeleted
  130. {
  131. add { _messageDeletedEvent.Add(value); }
  132. remove { _messageDeletedEvent.Remove(value); }
  133. }
  134. internal readonly AsyncEvent<Func<Cacheable<IMessage, ulong>, Cacheable<IMessageChannel, ulong>, Task>> _messageDeletedEvent = new AsyncEvent<Func<Cacheable<IMessage, ulong>, Cacheable<IMessageChannel, ulong>, Task>>();
  135. /// <summary> Fired when multiple messages are bulk deleted. </summary>
  136. /// <remarks>
  137. /// <note>
  138. /// The <see cref="MessageDeleted"/> event will not be fired for individual messages contained in this event.
  139. /// </note>
  140. /// <para>
  141. /// This event is fired when multiple messages are bulk deleted. The event handler must return a
  142. /// <see cref="Task"/> and accept an <see cref="IReadOnlyCollection{Cacheable}"/> and
  143. /// <see cref="ISocketMessageChannel"/> as its parameters.
  144. /// </para>
  145. /// <para>
  146. /// <note type="important">
  147. /// It is not possible to retrieve the message via
  148. /// <see cref="Cacheable{TEntity,TId}.DownloadAsync"/>; the message cannot be retrieved by Discord
  149. /// after the message has been deleted.
  150. /// </note>
  151. /// If caching is enabled via <see cref="DiscordSocketConfig"/>, the
  152. /// <see cref="Cacheable{TEntity,TId}"/> entity will contain the deleted message; otherwise, in event
  153. /// that the message cannot be retrieved, the snowflake ID of the message is preserved in the
  154. /// <see cref="ulong"/>.
  155. /// </para>
  156. /// <para>
  157. /// The source channel of the removed message will be passed into the
  158. /// <see cref="ISocketMessageChannel"/> parameter.
  159. /// </para>
  160. /// </remarks>
  161. public event Func<IReadOnlyCollection<Cacheable<IMessage, ulong>>, Cacheable<IMessageChannel, ulong>, Task> MessagesBulkDeleted
  162. {
  163. add { _messagesBulkDeletedEvent.Add(value); }
  164. remove { _messagesBulkDeletedEvent.Remove(value); }
  165. }
  166. internal readonly AsyncEvent<Func<IReadOnlyCollection<Cacheable<IMessage, ulong>>, Cacheable<IMessageChannel, ulong>, Task>> _messagesBulkDeletedEvent = new AsyncEvent<Func<IReadOnlyCollection<Cacheable<IMessage, ulong>>, Cacheable<IMessageChannel, ulong>, Task>>();
  167. /// <summary> Fired when a message is updated. </summary>
  168. /// <remarks>
  169. /// <para>
  170. /// This event is fired when a message is updated. The event handler must return a
  171. /// <see cref="Task"/> and accept a <see cref="Cacheable{TEntity,TId}"/>, <see cref="SocketMessage"/>,
  172. /// and <see cref="ISocketMessageChannel"/> as its parameters.
  173. /// </para>
  174. /// <para>
  175. /// If caching is enabled via <see cref="DiscordSocketConfig"/>, the
  176. /// <see cref="Cacheable{TEntity,TId}"/> entity will contain the original message; otherwise, in event
  177. /// that the message cannot be retrieved, the snowflake ID of the message is preserved in the
  178. /// <see cref="ulong"/>.
  179. /// </para>
  180. /// <para>
  181. /// The updated message will be passed into the <see cref="SocketMessage"/> parameter.
  182. /// </para>
  183. /// <para>
  184. /// The source channel of the updated message will be passed into the
  185. /// <see cref="ISocketMessageChannel"/> parameter.
  186. /// </para>
  187. /// </remarks>
  188. public event Func<Cacheable<IMessage, ulong>, SocketMessage, ISocketMessageChannel, Task> MessageUpdated
  189. {
  190. add { _messageUpdatedEvent.Add(value); }
  191. remove { _messageUpdatedEvent.Remove(value); }
  192. }
  193. internal readonly AsyncEvent<Func<Cacheable<IMessage, ulong>, SocketMessage, ISocketMessageChannel, Task>> _messageUpdatedEvent = new AsyncEvent<Func<Cacheable<IMessage, ulong>, SocketMessage, ISocketMessageChannel, Task>>();
  194. /// <summary> Fired when a reaction is added to a message. </summary>
  195. /// <remarks>
  196. /// <para>
  197. /// This event is fired when a reaction is added to a user message. The event handler must return a
  198. /// <see cref="Task"/> and accept a <see cref="Cacheable{TEntity,TId}"/>, an
  199. /// <see cref="ISocketMessageChannel"/>, and a <see cref="SocketReaction"/> as its parameter.
  200. /// </para>
  201. /// <para>
  202. /// If caching is enabled via <see cref="DiscordSocketConfig"/>, the
  203. /// <see cref="Cacheable{TEntity,TId}"/> entity will contain the original message; otherwise, in event
  204. /// that the message cannot be retrieved, the snowflake ID of the message is preserved in the
  205. /// <see cref="ulong"/>.
  206. /// </para>
  207. /// <para>
  208. /// The source channel of the reaction addition will be passed into the
  209. /// <see cref="ISocketMessageChannel"/> parameter.
  210. /// </para>
  211. /// <para>
  212. /// The reaction that was added will be passed into the <see cref="SocketReaction"/> parameter.
  213. /// </para>
  214. /// <note>
  215. /// When fetching the reaction from this event, a user may not be provided under
  216. /// <see cref="SocketReaction.User"/>. Please see the documentation of the property for more
  217. /// information.
  218. /// </note>
  219. /// </remarks>
  220. /// <example>
  221. /// <code language="cs" region="ReactionAdded"
  222. /// source="..\Discord.Net.Examples\WebSocket\BaseSocketClient.Events.Examples.cs"/>
  223. /// </example>
  224. public event Func<Cacheable<IUserMessage, ulong>, Cacheable<IMessageChannel, ulong>, SocketReaction, Task> ReactionAdded
  225. {
  226. add { _reactionAddedEvent.Add(value); }
  227. remove { _reactionAddedEvent.Remove(value); }
  228. }
  229. internal readonly AsyncEvent<Func<Cacheable<IUserMessage, ulong>, Cacheable<IMessageChannel, ulong>, SocketReaction, Task>> _reactionAddedEvent = new AsyncEvent<Func<Cacheable<IUserMessage, ulong>, Cacheable<IMessageChannel, ulong>, SocketReaction, Task>>();
  230. /// <summary> Fired when a reaction is removed from a message. </summary>
  231. public event Func<Cacheable<IUserMessage, ulong>, Cacheable<IMessageChannel, ulong>, SocketReaction, Task> ReactionRemoved
  232. {
  233. add { _reactionRemovedEvent.Add(value); }
  234. remove { _reactionRemovedEvent.Remove(value); }
  235. }
  236. internal readonly AsyncEvent<Func<Cacheable<IUserMessage, ulong>, Cacheable<IMessageChannel, ulong>, SocketReaction, Task>> _reactionRemovedEvent = new AsyncEvent<Func<Cacheable<IUserMessage, ulong>, Cacheable<IMessageChannel, ulong>, SocketReaction, Task>>();
  237. /// <summary> Fired when all reactions to a message are cleared. </summary>
  238. public event Func<Cacheable<IUserMessage, ulong>, Cacheable<IMessageChannel, ulong>, Task> ReactionsCleared
  239. {
  240. add { _reactionsClearedEvent.Add(value); }
  241. remove { _reactionsClearedEvent.Remove(value); }
  242. }
  243. internal readonly AsyncEvent<Func<Cacheable<IUserMessage, ulong>, Cacheable<IMessageChannel, ulong>, Task>> _reactionsClearedEvent = new AsyncEvent<Func<Cacheable<IUserMessage, ulong>, Cacheable<IMessageChannel, ulong>, Task>>();
  244. /// <summary>
  245. /// Fired when all reactions to a message with a specific emote are removed.
  246. /// </summary>
  247. /// <remarks>
  248. /// <para>
  249. /// This event is fired when all reactions to a message with a specific emote are removed.
  250. /// The event handler must return a <see cref="Task"/> and accept a <see cref="ISocketMessageChannel"/> and
  251. /// a <see cref="IEmote"/> as its parameters.
  252. /// </para>
  253. /// <para>
  254. /// The channel where this message was sent will be passed into the <see cref="ISocketMessageChannel"/> parameter.
  255. /// </para>
  256. /// <para>
  257. /// The emoji that all reactions had and were removed will be passed into the <see cref="IEmote"/> parameter.
  258. /// </para>
  259. /// </remarks>
  260. public event Func<Cacheable<IUserMessage, ulong>, Cacheable<IMessageChannel, ulong>, IEmote, Task> ReactionsRemovedForEmote
  261. {
  262. add { _reactionsRemovedForEmoteEvent.Add(value); }
  263. remove { _reactionsRemovedForEmoteEvent.Remove(value); }
  264. }
  265. internal readonly AsyncEvent<Func<Cacheable<IUserMessage, ulong>, Cacheable<IMessageChannel, ulong>, IEmote, Task>> _reactionsRemovedForEmoteEvent = new AsyncEvent<Func<Cacheable<IUserMessage, ulong>, Cacheable<IMessageChannel, ulong>, IEmote, Task>>();
  266. #endregion
  267. #region Roles
  268. /// <summary> Fired when a role is created. </summary>
  269. public event Func<SocketRole, Task> RoleCreated
  270. {
  271. add { _roleCreatedEvent.Add(value); }
  272. remove { _roleCreatedEvent.Remove(value); }
  273. }
  274. internal readonly AsyncEvent<Func<SocketRole, Task>> _roleCreatedEvent = new AsyncEvent<Func<SocketRole, Task>>();
  275. /// <summary> Fired when a role is deleted. </summary>
  276. public event Func<SocketRole, Task> RoleDeleted
  277. {
  278. add { _roleDeletedEvent.Add(value); }
  279. remove { _roleDeletedEvent.Remove(value); }
  280. }
  281. internal readonly AsyncEvent<Func<SocketRole, Task>> _roleDeletedEvent = new AsyncEvent<Func<SocketRole, Task>>();
  282. /// <summary> Fired when a role is updated. </summary>
  283. public event Func<SocketRole, SocketRole, Task> RoleUpdated
  284. {
  285. add { _roleUpdatedEvent.Add(value); }
  286. remove { _roleUpdatedEvent.Remove(value); }
  287. }
  288. internal readonly AsyncEvent<Func<SocketRole, SocketRole, Task>> _roleUpdatedEvent = new AsyncEvent<Func<SocketRole, SocketRole, Task>>();
  289. #endregion
  290. #region Guilds
  291. /// <summary> Fired when the connected account joins a guild. </summary>
  292. public event Func<SocketGuild, Task> JoinedGuild
  293. {
  294. add { _joinedGuildEvent.Add(value); }
  295. remove { _joinedGuildEvent.Remove(value); }
  296. }
  297. internal readonly AsyncEvent<Func<SocketGuild, Task>> _joinedGuildEvent = new AsyncEvent<Func<SocketGuild, Task>>();
  298. /// <summary> Fired when the connected account leaves a guild. </summary>
  299. public event Func<SocketGuild, Task> LeftGuild
  300. {
  301. add { _leftGuildEvent.Add(value); }
  302. remove { _leftGuildEvent.Remove(value); }
  303. }
  304. internal readonly AsyncEvent<Func<SocketGuild, Task>> _leftGuildEvent = new AsyncEvent<Func<SocketGuild, Task>>();
  305. /// <summary> Fired when a guild becomes available. </summary>
  306. public event Func<SocketGuild, Task> GuildAvailable
  307. {
  308. add { _guildAvailableEvent.Add(value); }
  309. remove { _guildAvailableEvent.Remove(value); }
  310. }
  311. internal readonly AsyncEvent<Func<SocketGuild, Task>> _guildAvailableEvent = new AsyncEvent<Func<SocketGuild, Task>>();
  312. /// <summary> Fired when a guild becomes unavailable. </summary>
  313. public event Func<SocketGuild, Task> GuildUnavailable
  314. {
  315. add { _guildUnavailableEvent.Add(value); }
  316. remove { _guildUnavailableEvent.Remove(value); }
  317. }
  318. internal readonly AsyncEvent<Func<SocketGuild, Task>> _guildUnavailableEvent = new AsyncEvent<Func<SocketGuild, Task>>();
  319. /// <summary> Fired when offline guild members are downloaded. </summary>
  320. public event Func<SocketGuild, Task> GuildMembersDownloaded
  321. {
  322. add { _guildMembersDownloadedEvent.Add(value); }
  323. remove { _guildMembersDownloadedEvent.Remove(value); }
  324. }
  325. internal readonly AsyncEvent<Func<SocketGuild, Task>> _guildMembersDownloadedEvent = new AsyncEvent<Func<SocketGuild, Task>>();
  326. /// <summary> Fired when a guild is updated. </summary>
  327. public event Func<SocketGuild, SocketGuild, Task> GuildUpdated
  328. {
  329. add { _guildUpdatedEvent.Add(value); }
  330. remove { _guildUpdatedEvent.Remove(value); }
  331. }
  332. internal readonly AsyncEvent<Func<SocketGuild, SocketGuild, Task>> _guildUpdatedEvent = new AsyncEvent<Func<SocketGuild, SocketGuild, Task>>();
  333. #endregion
  334. #region Users
  335. /// <summary> Fired when a user joins a guild. </summary>
  336. public event Func<SocketGuildUser, Task> UserJoined
  337. {
  338. add { _userJoinedEvent.Add(value); }
  339. remove { _userJoinedEvent.Remove(value); }
  340. }
  341. internal readonly AsyncEvent<Func<SocketGuildUser, Task>> _userJoinedEvent = new AsyncEvent<Func<SocketGuildUser, Task>>();
  342. /// <summary> Fired when a user leaves a guild. </summary>
  343. public event Func<SocketGuildUser, Task> UserLeft
  344. {
  345. add { _userLeftEvent.Add(value); }
  346. remove { _userLeftEvent.Remove(value); }
  347. }
  348. internal readonly AsyncEvent<Func<SocketGuildUser, Task>> _userLeftEvent = new AsyncEvent<Func<SocketGuildUser, Task>>();
  349. /// <summary> Fired when a user is banned from a guild. </summary>
  350. public event Func<SocketUser, SocketGuild, Task> UserBanned
  351. {
  352. add { _userBannedEvent.Add(value); }
  353. remove { _userBannedEvent.Remove(value); }
  354. }
  355. internal readonly AsyncEvent<Func<SocketUser, SocketGuild, Task>> _userBannedEvent = new AsyncEvent<Func<SocketUser, SocketGuild, Task>>();
  356. /// <summary> Fired when a user is unbanned from a guild. </summary>
  357. public event Func<SocketUser, SocketGuild, Task> UserUnbanned
  358. {
  359. add { _userUnbannedEvent.Add(value); }
  360. remove { _userUnbannedEvent.Remove(value); }
  361. }
  362. internal readonly AsyncEvent<Func<SocketUser, SocketGuild, Task>> _userUnbannedEvent = new AsyncEvent<Func<SocketUser, SocketGuild, Task>>();
  363. /// <summary> Fired when a user is updated. </summary>
  364. public event Func<SocketUser, SocketUser, Task> UserUpdated
  365. {
  366. add { _userUpdatedEvent.Add(value); }
  367. remove { _userUpdatedEvent.Remove(value); }
  368. }
  369. internal readonly AsyncEvent<Func<SocketUser, SocketUser, Task>> _userUpdatedEvent = new AsyncEvent<Func<SocketUser, SocketUser, Task>>();
  370. /// <summary> Fired when a guild member is updated, or a member presence is updated. </summary>
  371. public event Func<Cacheable<SocketGuildUser, ulong>, SocketGuildUser, Task> GuildMemberUpdated
  372. {
  373. add { _guildMemberUpdatedEvent.Add(value); }
  374. remove { _guildMemberUpdatedEvent.Remove(value); }
  375. }
  376. internal readonly AsyncEvent<Func<Cacheable<SocketGuildUser, ulong>, SocketGuildUser, Task>> _guildMemberUpdatedEvent = new AsyncEvent<Func<Cacheable<SocketGuildUser, ulong>, SocketGuildUser, Task>>();
  377. /// <summary> Fired when a user joins, leaves, or moves voice channels. </summary>
  378. public event Func<SocketUser, SocketVoiceState, SocketVoiceState, Task> UserVoiceStateUpdated
  379. {
  380. add { _userVoiceStateUpdatedEvent.Add(value); }
  381. remove { _userVoiceStateUpdatedEvent.Remove(value); }
  382. }
  383. internal readonly AsyncEvent<Func<SocketUser, SocketVoiceState, SocketVoiceState, Task>> _userVoiceStateUpdatedEvent = new AsyncEvent<Func<SocketUser, SocketVoiceState, SocketVoiceState, Task>>();
  384. /// <summary> Fired when the bot connects to a Discord voice server. </summary>
  385. public event Func<SocketVoiceServer, Task> VoiceServerUpdated
  386. {
  387. add { _voiceServerUpdatedEvent.Add(value); }
  388. remove { _voiceServerUpdatedEvent.Remove(value); }
  389. }
  390. internal readonly AsyncEvent<Func<SocketVoiceServer, Task>> _voiceServerUpdatedEvent = new AsyncEvent<Func<SocketVoiceServer, Task>>();
  391. /// <summary> Fired when the connected account is updated. </summary>
  392. public event Func<SocketSelfUser, SocketSelfUser, Task> CurrentUserUpdated
  393. {
  394. add { _selfUpdatedEvent.Add(value); }
  395. remove { _selfUpdatedEvent.Remove(value); }
  396. }
  397. internal readonly AsyncEvent<Func<SocketSelfUser, SocketSelfUser, Task>> _selfUpdatedEvent = new AsyncEvent<Func<SocketSelfUser, SocketSelfUser, Task>>();
  398. /// <summary> Fired when a user starts typing. </summary>
  399. public event Func<Cacheable<IUser, ulong>, Cacheable<IMessageChannel, ulong>, Task> UserIsTyping
  400. {
  401. add { _userIsTypingEvent.Add(value); }
  402. remove { _userIsTypingEvent.Remove(value); }
  403. }
  404. internal readonly AsyncEvent<Func<Cacheable<IUser, ulong>, Cacheable<IMessageChannel, ulong>, Task>> _userIsTypingEvent = new AsyncEvent<Func<Cacheable<IUser, ulong>, Cacheable<IMessageChannel, ulong>, Task>>();
  405. /// <summary> Fired when a user joins a group channel. </summary>
  406. public event Func<SocketGroupUser, Task> RecipientAdded
  407. {
  408. add { _recipientAddedEvent.Add(value); }
  409. remove { _recipientAddedEvent.Remove(value); }
  410. }
  411. internal readonly AsyncEvent<Func<SocketGroupUser, Task>> _recipientAddedEvent = new AsyncEvent<Func<SocketGroupUser, Task>>();
  412. /// <summary> Fired when a user is removed from a group channel. </summary>
  413. public event Func<SocketGroupUser, Task> RecipientRemoved
  414. {
  415. add { _recipientRemovedEvent.Add(value); }
  416. remove { _recipientRemovedEvent.Remove(value); }
  417. }
  418. internal readonly AsyncEvent<Func<SocketGroupUser, Task>> _recipientRemovedEvent = new AsyncEvent<Func<SocketGroupUser, Task>>();
  419. #endregion
  420. #region Invites
  421. /// <summary>
  422. /// Fired when an invite is created.
  423. /// </summary>
  424. /// <remarks>
  425. /// <para>
  426. /// This event is fired when an invite is created. The event handler must return a
  427. /// <see cref="Task"/> and accept a <see cref="SocketInvite"/> as its parameter.
  428. /// </para>
  429. /// <para>
  430. /// The invite created will be passed into the <see cref="SocketInvite"/> parameter.
  431. /// </para>
  432. /// </remarks>
  433. public event Func<SocketInvite, Task> InviteCreated
  434. {
  435. add { _inviteCreatedEvent.Add(value); }
  436. remove { _inviteCreatedEvent.Remove(value); }
  437. }
  438. internal readonly AsyncEvent<Func<SocketInvite, Task>> _inviteCreatedEvent = new AsyncEvent<Func<SocketInvite, Task>>();
  439. /// <summary>
  440. /// Fired when an invite is deleted.
  441. /// </summary>
  442. /// <remarks>
  443. /// <para>
  444. /// This event is fired when an invite is deleted. The event handler must return
  445. /// a <see cref="Task"/> and accept a <see cref="SocketGuildChannel"/> and
  446. /// <see cref="string"/> as its parameter.
  447. /// </para>
  448. /// <para>
  449. /// The channel where this invite was created will be passed into the <see cref="SocketGuildChannel"/> parameter.
  450. /// </para>
  451. /// <para>
  452. /// The code of the deleted invite will be passed into the <see cref="string"/> parameter.
  453. /// </para>
  454. /// </remarks>
  455. public event Func<SocketGuildChannel, string, Task> InviteDeleted
  456. {
  457. add { _inviteDeletedEvent.Add(value); }
  458. remove { _inviteDeletedEvent.Remove(value); }
  459. }
  460. internal readonly AsyncEvent<Func<SocketGuildChannel, string, Task>> _inviteDeletedEvent = new AsyncEvent<Func<SocketGuildChannel, string, Task>>();
  461. #endregion
  462. #region Interactions
  463. /// <summary>
  464. /// Fired when an Interaction is created. This event covers all types of interactions including but not limited to: buttons, select menus, slash commands.
  465. /// </summary>
  466. /// <remarks>
  467. /// <para>
  468. /// This event is fired when an interaction is created. The event handler must return a
  469. /// <see cref="Task"/> and accept a <see cref="SocketInteraction"/> as its parameter.
  470. /// </para>
  471. /// <para>
  472. /// The interaction created will be passed into the <see cref="SocketInteraction"/> parameter.
  473. /// </para>
  474. /// </remarks>
  475. public event Func<SocketInteraction, Task> InteractionCreated
  476. {
  477. add { _interactionCreatedEvent.Add(value); }
  478. remove { _interactionCreatedEvent.Remove(value); }
  479. }
  480. internal readonly AsyncEvent<Func<SocketInteraction, Task>> _interactionCreatedEvent = new AsyncEvent<Func<SocketInteraction, Task>>();
  481. /// <summary>
  482. /// Fired when a button is clicked and its interaction is received.
  483. /// </summary>
  484. public event Func<SocketMessageComponent, Task> ButtonExecuted
  485. {
  486. add => _buttonExecuted.Add(value);
  487. remove => _buttonExecuted.Remove(value);
  488. }
  489. internal readonly AsyncEvent<Func<SocketMessageComponent, Task>> _buttonExecuted = new AsyncEvent<Func<SocketMessageComponent, Task>>();
  490. /// <summary>
  491. /// Fired when a select menu is used and its interaction is received.
  492. /// </summary>
  493. public event Func<SocketMessageComponent, Task> SelectMenuExecuted
  494. {
  495. add => _selectMenuExecuted.Add(value);
  496. remove => _selectMenuExecuted.Remove(value);
  497. }
  498. internal readonly AsyncEvent<Func<SocketMessageComponent, Task>> _selectMenuExecuted = new AsyncEvent<Func<SocketMessageComponent, Task>>();
  499. /// <summary>
  500. /// Fired when a slash command is used and its interaction is received.
  501. /// </summary>
  502. public event Func<SocketSlashCommand, Task> SlashCommandExecuted
  503. {
  504. add => _slashCommandExecuted.Add(value);
  505. remove => _slashCommandExecuted.Remove(value);
  506. }
  507. internal readonly AsyncEvent<Func<SocketSlashCommand, Task>> _slashCommandExecuted = new AsyncEvent<Func<SocketSlashCommand, Task>>();
  508. /// <summary>
  509. /// Fired when a user command is used and its interaction is received.
  510. /// </summary>
  511. public event Func<SocketUserCommand, Task> UserCommandExecuted
  512. {
  513. add => _userCommandExecuted.Add(value);
  514. remove => _userCommandExecuted.Remove(value);
  515. }
  516. internal readonly AsyncEvent<Func<SocketUserCommand, Task>> _userCommandExecuted = new AsyncEvent<Func<SocketUserCommand, Task>>();
  517. /// <summary>
  518. /// Fired when a message command is used and its interaction is received.
  519. /// </summary>
  520. public event Func<SocketMessageCommand, Task> MessageCommandExecuted
  521. {
  522. add => _messageCommandExecuted.Add(value);
  523. remove => _messageCommandExecuted.Remove(value);
  524. }
  525. internal readonly AsyncEvent<Func<SocketMessageCommand, Task>> _messageCommandExecuted = new AsyncEvent<Func<SocketMessageCommand, Task>>();
  526. /// <summary>
  527. /// Fired when a guild application command is created.
  528. ///</summary>
  529. ///<remarks>
  530. /// <para>
  531. /// This event is fired when an application command is created. The event handler must return a
  532. /// <see cref="Task"/> and accept a <see cref="SocketApplicationCommand"/> as its parameter.
  533. /// </para>
  534. /// <para>
  535. /// The command that was deleted will be passed into the <see cref="SocketApplicationCommand"/> parameter.
  536. /// </para>
  537. /// <note>
  538. /// <b>This event is an undocumented discord event and may break at any time, its not recommended to rely on this event</b>
  539. /// </note>
  540. /// </remarks>
  541. public event Func<SocketApplicationCommand, Task> ApplicationCommandCreated
  542. {
  543. add { _applicationCommandCreated.Add(value); }
  544. remove { _applicationCommandCreated.Remove(value); }
  545. }
  546. internal readonly AsyncEvent<Func<SocketApplicationCommand, Task>> _applicationCommandCreated = new AsyncEvent<Func<SocketApplicationCommand, Task>>();
  547. /// <summary>
  548. /// Fired when a guild application command is updated.
  549. /// </summary>
  550. /// <remarks>
  551. /// <para>
  552. /// This event is fired when an application command is updated. The event handler must return a
  553. /// <see cref="Task"/> and accept a <see cref="SocketApplicationCommand"/> as its parameter.
  554. /// </para>
  555. /// <para>
  556. /// The command that was deleted will be passed into the <see cref="SocketApplicationCommand"/> parameter.
  557. /// </para>
  558. /// <note>
  559. /// <b>This event is an undocumented discord event and may break at any time, its not recommended to rely on this event</b>
  560. /// </note>
  561. /// </remarks>
  562. public event Func<SocketApplicationCommand, Task> ApplicationCommandUpdated
  563. {
  564. add { _applicationCommandUpdated.Add(value); }
  565. remove { _applicationCommandUpdated.Remove(value); }
  566. }
  567. internal readonly AsyncEvent<Func<SocketApplicationCommand, Task>> _applicationCommandUpdated = new AsyncEvent<Func<SocketApplicationCommand, Task>>();
  568. /// <summary>
  569. /// Fired when a guild application command is deleted.
  570. /// </summary>
  571. /// <remarks>
  572. /// <para>
  573. /// This event is fired when an application command is deleted. The event handler must return a
  574. /// <see cref="Task"/> and accept a <see cref="SocketApplicationCommand"/> as its parameter.
  575. /// </para>
  576. /// <para>
  577. /// The command that was deleted will be passed into the <see cref="SocketApplicationCommand"/> parameter.
  578. /// </para>
  579. /// <note>
  580. /// <b>This event is an undocumented discord event and may break at any time, its not recommended to rely on this event</b>
  581. /// </note>
  582. /// </remarks>
  583. public event Func<SocketApplicationCommand, Task> ApplicationCommandDeleted
  584. {
  585. add { _applicationCommandDeleted.Add(value); }
  586. remove { _applicationCommandDeleted.Remove(value); }
  587. }
  588. internal readonly AsyncEvent<Func<SocketApplicationCommand, Task>> _applicationCommandDeleted = new AsyncEvent<Func<SocketApplicationCommand, Task>>();
  589. /// <summary>
  590. /// Fired when a thread is created within a guild, or when the current user is added to a thread.
  591. /// </summary>
  592. public event Func<SocketThreadChannel, Task> ThreadCreated
  593. {
  594. add { _threadCreated.Add(value); }
  595. remove { _threadCreated.Remove(value); }
  596. }
  597. internal readonly AsyncEvent<Func<SocketThreadChannel, Task>> _threadCreated = new AsyncEvent<Func<SocketThreadChannel, Task>>();
  598. /// <summary>
  599. /// Fired when a thread is updated within a guild.
  600. /// </summary>
  601. public event Func<Cacheable<SocketThreadChannel, ulong>, SocketThreadChannel, Task> ThreadUpdated
  602. {
  603. add { _threadUpdated.Add(value); }
  604. remove { _threadUpdated.Remove(value); }
  605. }
  606. internal readonly AsyncEvent<Func<Cacheable<SocketThreadChannel, ulong>, SocketThreadChannel, Task>> _threadUpdated = new();
  607. /// <summary>
  608. /// Fired when a thread is deleted.
  609. /// </summary>
  610. public event Func<Cacheable<SocketThreadChannel, ulong>, Task> ThreadDeleted
  611. {
  612. add { _threadDeleted.Add(value); }
  613. remove { _threadDeleted.Remove(value); }
  614. }
  615. internal readonly AsyncEvent<Func<Cacheable<SocketThreadChannel, ulong>, Task>> _threadDeleted = new AsyncEvent<Func<Cacheable<SocketThreadChannel, ulong>, Task>>();
  616. /// <summary>
  617. /// Fired when a user joins a thread
  618. /// </summary>
  619. public event Func<SocketThreadUser, Task> ThreadMemberJoined
  620. {
  621. add { _threadMemberJoined.Add(value); }
  622. remove { _threadMemberJoined.Remove(value); }
  623. }
  624. internal readonly AsyncEvent<Func<SocketThreadUser, Task>> _threadMemberJoined = new AsyncEvent<Func<SocketThreadUser, Task>>();
  625. /// <summary>
  626. /// Fired when a user leaves a thread
  627. /// </summary>
  628. public event Func<SocketThreadUser, Task> ThreadMemberLeft
  629. {
  630. add { _threadMemberLeft.Add(value); }
  631. remove { _threadMemberLeft.Remove(value); }
  632. }
  633. internal readonly AsyncEvent<Func<SocketThreadUser, Task>> _threadMemberLeft = new AsyncEvent<Func<SocketThreadUser, Task>>();
  634. /// <summary>
  635. /// Fired when a stage is started.
  636. /// </summary>
  637. public event Func<SocketStageChannel, Task> StageStarted
  638. {
  639. add { _stageStarted.Add(value); }
  640. remove { _stageStarted.Remove(value); }
  641. }
  642. internal readonly AsyncEvent<Func<SocketStageChannel, Task>> _stageStarted = new AsyncEvent<Func<SocketStageChannel, Task>>();
  643. /// <summary>
  644. /// Fired when a stage ends.
  645. /// </summary>
  646. public event Func<SocketStageChannel, Task> StageEnded
  647. {
  648. add { _stageEnded.Add(value); }
  649. remove { _stageEnded.Remove(value); }
  650. }
  651. internal readonly AsyncEvent<Func<SocketStageChannel, Task>> _stageEnded = new AsyncEvent<Func<SocketStageChannel, Task>>();
  652. /// <summary>
  653. /// Fired when a stage is updated.
  654. /// </summary>
  655. public event Func<SocketStageChannel, SocketStageChannel, Task> StageUpdated
  656. {
  657. add { _stageUpdated.Add(value); }
  658. remove { _stageUpdated.Remove(value); }
  659. }
  660. internal readonly AsyncEvent<Func<SocketStageChannel, SocketStageChannel, Task>> _stageUpdated = new AsyncEvent<Func<SocketStageChannel, SocketStageChannel, Task>>();
  661. /// <summary>
  662. /// Fired when a user requests to speak within a stage channel.
  663. /// </summary>
  664. public event Func<SocketStageChannel, SocketGuildUser, Task> RequestToSpeak
  665. {
  666. add { _requestToSpeak.Add(value); }
  667. remove { _requestToSpeak.Remove(value); }
  668. }
  669. internal readonly AsyncEvent<Func<SocketStageChannel, SocketGuildUser, Task>> _requestToSpeak = new AsyncEvent<Func<SocketStageChannel, SocketGuildUser, Task>>();
  670. /// <summary>
  671. /// Fired when a speaker is added in a stage channel.
  672. /// </summary>
  673. public event Func<SocketStageChannel, SocketGuildUser, Task> SpeakerAdded
  674. {
  675. add { _speakerAdded.Add(value); }
  676. remove { _speakerAdded.Remove(value); }
  677. }
  678. internal readonly AsyncEvent<Func<SocketStageChannel, SocketGuildUser, Task>> _speakerAdded = new AsyncEvent<Func<SocketStageChannel, SocketGuildUser, Task>>();
  679. /// <summary>
  680. /// Fired when a speaker is removed from a stage channel.
  681. /// </summary>
  682. public event Func<SocketStageChannel, SocketGuildUser, Task> SpeakerRemoved
  683. {
  684. add { _speakerRemoved.Add(value); }
  685. remove { _speakerRemoved.Remove(value); }
  686. }
  687. internal readonly AsyncEvent<Func<SocketStageChannel, SocketGuildUser, Task>> _speakerRemoved = new AsyncEvent<Func<SocketStageChannel, SocketGuildUser, Task>>();
  688. /// <summary>
  689. /// Fired when a sticker in a guild is created.
  690. /// </summary>
  691. public event Func<SocketCustomSticker, Task> GuildStickerCreated
  692. {
  693. add { _guildStickerCreated.Add(value); }
  694. remove { _guildStickerCreated.Remove(value); }
  695. }
  696. internal readonly AsyncEvent<Func<SocketCustomSticker, Task>> _guildStickerCreated = new AsyncEvent<Func<SocketCustomSticker, Task>>();
  697. /// <summary>
  698. /// Fired when a sticker in a guild is updated.
  699. /// </summary>
  700. public event Func<SocketCustomSticker, SocketCustomSticker, Task> GuildStickerUpdated
  701. {
  702. add { _guildStickerUpdated.Add(value); }
  703. remove { _guildStickerUpdated.Remove(value); }
  704. }
  705. internal readonly AsyncEvent<Func<SocketCustomSticker, SocketCustomSticker, Task>> _guildStickerUpdated = new AsyncEvent<Func<SocketCustomSticker, SocketCustomSticker, Task>>();
  706. /// <summary>
  707. /// Fired when a sticker in a guild is deleted.
  708. /// </summary>
  709. public event Func<SocketCustomSticker, Task> GuildStickerDeleted
  710. {
  711. add { _guildStickerDeleted.Add(value); }
  712. remove { _guildStickerDeleted.Remove(value); }
  713. }
  714. internal readonly AsyncEvent<Func<SocketCustomSticker, Task>> _guildStickerDeleted = new AsyncEvent<Func<SocketCustomSticker, Task>>();
  715. #endregion
  716. }
  717. }