Commit Graph

50 Commits

Author SHA1 Message Date
Christopher Felegy
91aec9ff93 add idn debugger
where is my foxboat
2020-04-14 20:47:36 -04:00
Still Hsu
fd3810e9fe docs: September 2019 Documentation Update (#1379)
* docs: adjust wording of ActivityType.Watching enum

Adjusts the xmldoc summary wording of the ActivityType.Watching enum to
fix a wording issue.

* Add D.NET Logo to Open Graph meta tags

* Update DescriptionGenerator
...And update color to suit the logo better

* Disable smooth scrolling due to user complaints

* Remove unnecessary spacing in sideaffix

* Update footer version

* Remove featherlight plugin

As it is unnecessary and can break image tags

* Adjust wordings regarding safe-handling of secrets

* Fix formatting for first bot token sample

* Add badges to homepage

* Minor wording fixes on terminal

* Update to higher quality PNG

* Add Discord.Net.Example in sln for build validation

* Clarify all instances of IAsnycEnumerable

* Clarify overridden props in SocketNewsChannel

* Add returns and params docs for SyncPermissionsAsync

* Remove/fix invalid XMLdoc strings

* Remove AppVeyor and add GitHub badge
2019-09-22 19:06:57 -04:00
Chris Johnston
a797be9ca0 test: Split Unit and Integration tests into separate projects (#1290)
* Squashed commit of test rewrite changes

fix missing priority speaker flag

rewrite the TestChannelPermissionModify test

add test for GuildPermission modify

separate unit and integration tests, start writing channel and guild permission tests

copy over the color tests

copy over the emote tests

copy the token utils tests

make the mocked entities sealed classes

copy the TypeReaderTests class

properly dispose the CommandService in the TypeReaderTests

start writing tests for EmbedBuilder and related classes

test that properties throw ArgumentException when invalid

add tests for the embed length property

add withFooter tests

finish adding tests to EmbedBuilder

fix bug in value validation of EmbedFieldBuilder

hey, these tests actually found a bug!

add tests for the MentionUtils class

add tests for the Format util class

remove all of the old tests

add analyzer tests (copied from old tests)

add tests for the SnowflakeUtils class

add integration tests

these get around the issue of state persisting between tests by creating and deleting a guild for each set of tests. these shouldn't be run excessively because of the rate limits, but should be fine every now and then

remove unnecessary launchSettings.json

update outdated string

don't create a new guild each time, as that can result in errors

this can happen if a bot creates too many guilds without properly deleting them

add some tests that show that guild can be modified

await async assert

add more measures that created channels are deleted when done

remove "Test" prefix from test method names

I think that this prefix when already displayed under a class with a suffix of "Tests" is redundant

Remove mention of old test project

fix an issue from forgetting to await Assert.ThrowsAsync

explicitly disable parallelization on integration tests

add test for GuildPermission modify

separate unit and integration tests, start writing channel and guild permission tests

copy over the color tests

copy over the emote tests

make the mocked entities sealed classes

properly dispose the CommandService in the TypeReaderTests

fix bug in value validation of EmbedFieldBuilder

hey, these tests actually found a bug!

add tests for the MentionUtils class

add tests for the Format util class

remove all of the old tests

add analyzer tests (copied from old tests)

add tests for the SnowflakeUtils class

add integration tests

these get around the issue of state persisting between tests by creating and deleting a guild for each set of tests. these shouldn't be run excessively because of the rate limits, but should be fine every now and then

remove unnecessary launchSettings.json

update outdated string

don't create a new guild each time, as that can result in errors

this can happen if a bot creates too many guilds without properly deleting them

add more measures that created channels are deleted when done

remove "Test" prefix from test method names

I think that this prefix when already displayed under a class with a suffix of "Tests" is redundant

Remove mention of old test project

fix an issue from forgetting to await Assert.ThrowsAsync

explicitly disable parallelization on integration tests

update the azure CI build script

separate execution of test projects so that if one fails the other will not pass

one of the unit tests failed, but the analzyer tests passed

fix test that would break in different timezones

enable the integration tests (only on dev branch)

* Squashed commit of test rewrite changes

fix missing priority speaker flag

rewrite the TestChannelPermissionModify test

add test for GuildPermission modify

separate unit and integration tests, start writing channel and guild permission tests

copy over the color tests

copy over the emote tests

copy the token utils tests

make the mocked entities sealed classes

copy the TypeReaderTests class

properly dispose the CommandService in the TypeReaderTests

start writing tests for EmbedBuilder and related classes

test that properties throw ArgumentException when invalid

add tests for the embed length property

add withFooter tests

finish adding tests to EmbedBuilder

fix bug in value validation of EmbedFieldBuilder

hey, these tests actually found a bug!

add tests for the MentionUtils class

add tests for the Format util class

remove all of the old tests

add analyzer tests (copied from old tests)

add tests for the SnowflakeUtils class

add integration tests

these get around the issue of state persisting between tests by creating and deleting a guild for each set of tests. these shouldn't be run excessively because of the rate limits, but should be fine every now and then

remove unnecessary launchSettings.json

update outdated string

don't create a new guild each time, as that can result in errors

this can happen if a bot creates too many guilds without properly deleting them

add some tests that show that guild can be modified

await async assert

add more measures that created channels are deleted when done

remove "Test" prefix from test method names

I think that this prefix when already displayed under a class with a suffix of "Tests" is redundant

Remove mention of old test project

fix an issue from forgetting to await Assert.ThrowsAsync

explicitly disable parallelization on integration tests

add test for GuildPermission modify

separate unit and integration tests, start writing channel and guild permission tests

copy over the color tests

copy over the emote tests

make the mocked entities sealed classes

properly dispose the CommandService in the TypeReaderTests

fix bug in value validation of EmbedFieldBuilder

hey, these tests actually found a bug!

add tests for the MentionUtils class

add tests for the Format util class

remove all of the old tests

add analyzer tests (copied from old tests)

add tests for the SnowflakeUtils class

add integration tests

these get around the issue of state persisting between tests by creating and deleting a guild for each set of tests. these shouldn't be run excessively because of the rate limits, but should be fine every now and then

remove unnecessary launchSettings.json

update outdated string

don't create a new guild each time, as that can result in errors

this can happen if a bot creates too many guilds without properly deleting them

add more measures that created channels are deleted when done

remove "Test" prefix from test method names

I think that this prefix when already displayed under a class with a suffix of "Tests" is redundant

Remove mention of old test project

fix an issue from forgetting to await Assert.ThrowsAsync

explicitly disable parallelization on integration tests

update the azure CI build script

separate execution of test projects so that if one fails the other will not pass

one of the unit tests failed, but the analzyer tests passed

fix test that would break in different timezones

enable the integration tests (only on dev branch)

* Update mocked channels for changed SendFileAsync signature

* comment out the integration tests from the build script

no bot token is provided to this script, and use of integration tests in CI is questionable here

* force rebuild because Azure linux build broke
2019-06-12 16:08:03 -04:00
Alex Gravely
655a0069a1 docs: Add Webhook example. (#1241)
* Add Webhook example.

* Fix spacing.

* Update to use webhook URL ctor.
2019-05-18 17:24:06 -04:00
Still Hsu
4309550ca0 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>
2019-05-13 18:29:47 -04:00
Alex Gravely
00097d3c27 Add DiscordShardedClient sample project & Client FAQ entry. (#1177)
* Add DiscordShardedClient sample project & Client FAQ entry.

* Revise language, fix typo, add xrefs

* Adjust placement of message handler.

* Resolve DI issue with initialized client; properly initialize command handling service.
2018-10-20 10:02:25 -04:00
Christopher F
217ec34ef0 Add sample bots to the solution (#972)
* Add sample bots to the solution

* Fix missing attributes, show use of preconditions
2018-04-29 11:16:27 -04:00
Joe4evr
f69ef2a8ca Add API Analyzer Assembly (#906)
* Start on API analyzers

* Finish GuildAccessAnalyzer

* Update build script (will this do?)

* Correct slashes

* Extrapolate DerivesFromModuleBase() to an extension method

* Quick refactoring

* Add doc file
2018-01-13 22:54:47 -05:00
Christopher F
b30af57b7f Remove RPC from main distribution (#925) 2018-01-05 20:23:19 -05:00
Hsu Still
22d79c1004 Improve library documentation (#826)
* Improve the Command Service documentation

The following changes have been added to this PR:
•	Fix minor grammatical errors.
•	Capitalize terms such as Commands, Modules and such, as the context is specific to the lib.
•	Wrap methods and properties in code blocks.

The docs page currently has several issues that remains to be fixed.

1. 
```md
>[!WARNING]
>This article is out of date and has not been rewritten yet.
Information is not guaranteed to be accurate.
```

The docs doesn't necessarily seem "out of date" as the warning claims. The basics seem pretty relevant to the latest version of the lib.

2.
>“To manually load a module, invoke [CommandService.AddModuleAsync], by passing in the generic type of your module and optionally, a dependency map.”

The latter part of the sentence seems off. Where should the user pass the dependency map to? It seems to suggest that `AddModuleAsync` has an argument to pass the dependency to. If it is referring to `AddModuleAsync(Type type)`, then I feel like it should be clarified here - or perhaps change the wording of the sentence.

3.
>“First, you need to create an @System.IServiceProvider You may create your own IServiceProvider if you wish.” 

Any mention of @System.IServiceProvider is currently broken on the docs.

4.
>“Submodules are Modules that reside within another one. Typically, submodules are used to create nested groups (although not required to create nested groups).”

Clarification on the part after "although?"

5.
>“Finally, pass the map into the LoadAssembly method. Your modules will automatically be loaded with this dependency map.”

Where is this `LoadAssembly` method?

6.
```md
>[!NOTE]
>Preconditions can be applied to Modules, Groups, or Commands.
```

The docs should mention `ParameterPreconditionAttribute`'s existence.

* Update line breaks to comply with docs standard

* Change "you should..." to "instead, ..."

* Trim trailing spaces

* Change "inherits" to "inherit"

* Fix Context warning note and add ReplyAsync xref

* Fix broken xrefs

* Fix [Command Service] xref

* Fix consistency between TypeReaders and Preconditions returns

* Add missing semi-colons in ServiceProvider sample

* Change CommandContext to SocketCommandContext & change variable naming

* Cleanup TypeReader section

* Wrap [DontInject] in code block

* Fix commands docs linking in intro

* Improve Getting Started - Installation

- Fix character misalignment to comply with docs standard.
- Fix image numbering issues by moving the tooltips above some of the steps.
- Add codeblocks to search terms like `Discord.Net`.
- Remove broken `addons` reference.
- Specify `.NET 4.6.1` as `.NET Framework 4.6.1`.
- Minor cross-reference cleanup.

* Fix Getting Started - Intro

- Minor grammartical fixes.
- Wrap mentions of the methods, properties, and events in code block.
- Replace `Discord.Net` to `Discord.NET`.
- Fix steps numbering under `Creating a Discord Bot` and `Adding your bot to a server`.
- Change `Task-based Asynchronous Pattern ([TAP])` linking to mark the entire term instead.
- Change code block of `Pong!` to quotation mark instead.

* Fix cross references in Sending Voice

* Mention parameter precondition attribute

* Change `Discord.NET` to `Discord.Net` for consistency

* Wrap project names in code blocks & minor fixes in Terminology

* Change `add-ons` to `addons` for consistency

* Fix cross references in Logging

* Fix minor grammatical issues in "Working with Events"

* Missed a tilda

* Remove out-of-date warning in Commands

* Minor grammatical fixes for Entities

* Fix broken xref in Logging

* Adjust service collection sample

...according to f89aecb7bf (r141530227)

* Update Command Handler sample

- Update Main for C# 7.1.
- Inject CommandService and DiscordSocketClient into the service collection.
- Add Async suffix to asynchronous methods.

* Minor grammatical fixes in Events

* Revert 2 incorrect grammar corrections

* Revert async Main sample

* Add hardcode token notice in sample

* Fix missing method for Command Handler

* Modify module samples to use SocketCommandContext instead

* Emphasize CommandContext and SocketCommandContext

* Fix formatting for module sample

* Add SocketCommandContext for Groups sample

* Remove comma

* Fix DepMap sample formatting

* Replace [DontInject] with DontInjectAttribute with cross reference

* Remove connection logic note

There is no reason that this note should still be here since Ready event exists.

* Add a new warning message informing the users the existence of CommandService

* Make command handler private

excellent change
2017-10-03 16:48:05 -04:00
RogueException
9954536fcc Removed UDP Provider 2017-04-26 12:19:50 -03:00
RogueException
41d9788411 Isolated Analyzers and Relay projects 2017-04-25 09:25:19 -03:00
RogueException
b5d817f171 Cleaned up csprojs, added support for tag builds. 2017-04-01 11:11:09 -03:00
Christopher F
83bd16f329 Don't attempt to convert Embed entities to models if the entity is null
Allows null embeds to be passed into ModifyAsync
2017-03-18 20:36:06 -04:00
RogueException
587ec65e79 Added Discord.Net.Webhook 2017-03-16 05:35:01 -03:00
RogueException
8630185ac9 Started Discord.Net.Relay 2017-02-25 16:07:22 -04:00
RogueException
34139c9b59 Converted Discord.Net to a metapackage 2017-01-26 10:43:32 -04:00
RogueException
3046b62c94 Cleaned up csproj/sln/scripts 2017-01-25 12:41:38 -04:00
RogueException
9fb413952f Fixed solution errors 2017-01-24 13:47:56 -04:00
RogueException
8326d01f62 Isolated API definitions to their own library 2016-12-23 16:57:29 -04:00
RogueException
50688384ca Added WS4Net Provider 2016-12-16 07:33:54 -04:00
RogueException
0f674d2404 Updated dependencies to .NET Core 1.1 2016-11-17 17:30:51 -04:00
ObsidianMinor
ddca1bc6a4 Migrated projects to Visual Studio 2017 2016-11-17 10:05:30 -06:00
RogueException
ab5279dd14 Merge branch 'concrete2' into dev 2016-10-12 02:10:51 -03:00
RogueException
dd86f03306 Started converting websocket and rpc classes 2016-09-28 04:12:47 -03:00
RogueException
683f0d5013 Merged changed from dev branch 2016-09-22 21:31:48 -03:00
RogueException
6319933ed0 Concrete class prototype 2016-09-22 21:15:37 -03:00
RogueException
ae186f8d9e Updated solution 2016-09-20 17:46:32 -03:00
RogueException
5ad63563c1 Added initial commands project 2016-06-13 20:06:44 -03:00
RogueException
06fd96a72c Fixed missing project reference 2016-06-11 18:14:09 -03:00
RogueException
1ec2e7bc11 Fixed a path 2016-05-08 02:29:32 -03:00
RogueException
b45a0ebe6e 1.0 REST Preview 2 2016-05-08 01:31:07 -03:00
RogueException
5bdd6a7ff3 Early 1.0 REST Preview 2016-04-04 20:15:16 -03:00
RogueException
c19a353549 Fixed typo in project path 2015-12-31 04:23:02 -04:00
RogueException
54b2353012 Changed dotnet folder to netplatform, fixed reference to Shared 2015-12-07 10:04:50 -04:00
RogueException
ca25af5b8a Changed preprocessor conditions for new monikers and updated packages. 2015-11-28 23:02:02 -04:00
RogueException
ab9368f565 Removed TestingProject 2015-11-02 14:06:50 -04:00
Googie2149
c729eaae8b Revamped CommandsPlugin
This uses a dictionary for the commands list, if a command has a max
args set it'll only get that amount, will call the UnkownCommand event,
and now has a built in help command that can be optionally enabled.
CommandChar is now a list, but a single character can still be used.
Externally, not much should have changed, but commands can be hidden
from the help command and a description can be set. There's probably
more that I've forgotten about.
2015-11-01 23:29:40 -04:00
Brandon Smith
cc04f7eb55 Added Modules project 2015-10-26 09:20:21 -03:00
RogueException
bd67e1dc53 Fixed project references 2015-10-18 08:45:20 -03:00
Brandon Smith
dd19a625e3 Updated ToolsVersion to 14 2015-09-25 21:34:36 -03:00
RogueException
024ef7d1de Added DataWebSocket Events 2015-09-15 04:58:01 -03:00
RogueException
4529ad3d4a Refactor all the things! 2015-09-13 11:46:26 -03:00
RogueException
9d06e2b48d Clean all the things! 2015-08-26 16:14:19 -03:00
Brandon Smith
827ffc3e29 Updated Solution 2015-08-25 02:15:39 -03:00
Brandon Smith
60f74d088a Project restructure, Added .Net Core support, Fixed some bugs 2015-08-17 18:57:44 -03:00
Brandon Smith
7d7c14eb9d Added gitattributes 2015-08-09 11:36:55 -03:00
Brandon Smith
d9d4d6d621 Added Kick/Ban/Mute/Deaf, cleaned Http Helper, removed a few leftovers from 0.1 2015-08-08 11:27:53 -03:00
Brandon Smith
1c366c078b Major cleanup, added message and role caches, added a few events, added test placeholder 2015-08-07 23:22:45 -03:00
Brandon Smith
7b29abc2bf Initial Commit - V0.1.0 2015-08-04 14:34:50 -03:00