emorell96
8137ca1eca
added documentation to this method.
5 years ago
emorell96
67ace364a4
changed AddTransient to AddScoped when adding HttpClientFactoryRestClientProvider as a service in the AddScopedDiscordRestClient to stay consistent. AddScopedDiscordRestClient adds scoped services, AddTransientDiscordRestClient adds transient services.
5 years ago
emorell96
1c31bc8abe
renamed names to follow convention HttpClientFactory + RestClient or RestClientProvider.
5 years ago
emorell96
67d833a8b5
removed modifications made to this project while thinking of how to implement my changes.
5 years ago
emorell96
75c1e41a63
added the blazor simple sample with the new IServiceCollection extension usage example. Hopefully it shows what I mean of how much it simplifies handling DI with the library. I think the greatest benefits are the user could use polly or it could be integrated dirrectly into the library, or also for thing like ASP.NET projects where usually you'd use ScopedServices for each page, you could inject a DiscordRestClient safely.
5 years ago
emorell96
b745a3cd6d
Added two Extension methods "AddScopedDiscordRestClient" and "AddTransientDiscordRestClient" to allow for easier addition of scoped, and transient DiscordRestClients, it's left up to the user which one is more convenient to use for his/her application, and at the end of the day it doesn't risk running out of sockets since it uses IHttpClientFactory under the hood.
This means that it moves the useProxy boolean parameter here, not sure how much that affects the rest of the library. def an addition to consider. And something that more accustomed users/contributors will be able to answer.
The main advantage of having such a method in the future could be adding resiliency. Major resiliency by for example using Polly in a simple way see: https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/implement-http-call-retries-exponential-backoff-polly for example.
Of course this means that the user would have to use DI (which is anyways a good practice), but I left the other default ones so that it wouldn't bring any breaking changes.
5 years ago
emorell96
7ce31408be
added a dependency in Microsoft.Extensions.DependencyInjection.Abstractions and Microsoft.Extensions.Http to add an extension method to make it easy to add DiscordRestClients without risking socket exhaustation.
5 years ago
emorell96
87f530c2f1
added a HttpClientFactoryClient and HttpClientFactoryClientProvider that use IHttpClientFactory to create HttpClients to avoid having to recreate an HtppClient every time a DiscordRestClient is created which could lead to socket exhaustation.
5 years ago
emorell96
dc589653df
added simple blazor project as a sample using only Discord.Net.Core and Discord.Net.Rest. No websockets.
5 years ago
Paulo
1b64d19c84
meta: 2.3.1 ( #1795 )
5 years ago
Paulo
d41aeee4fe
fix: Audit log UserId can be null ( #1794 )
5 years ago
Alex Gravely
d2518db9a8
fix: Update Webhook ChannelId from model change ( #1791 )
5 years ago
Paulo
51b7afe2a6
misc: Add remark regarding CustomStatus as the activity ( #1774 )
* Throw exception with CustomStatus
* Add remark instead of exception
* Change wording
5 years ago
NeKz
f794163ffa
fix: NullReferenceException in pin/unpin audit logs ( #1780 )
5 years ago
NeKz
6ac5ea1cbb
fix: Add ChannelType property to ChannelInfo audit log ( #1786 )
5 years ago
Antonio Zdravkov Nikolov
0fc713a897
fix: Private methods aren't added as commands ( #1773 )
Fix breaking change introduced by #1521
5 years ago
Yeba
73e5cc2fbc
fix: Deadlock in DiscordShardedClient when Ready is never received ( #1761 )
* fixed a deadlock in DiscordShardedClient during a failed Identify due to InvalidSession
* fixed log
* Don't wait ready before releasing semaphore
Co-authored-by: Paulo <pnmanjos@hotmail.com>
5 years ago
Paulo
83e88f4fb9
meta: Bump version to 2.3.1-dev
5 years ago
Paulo
6bb54577ab
meta: 2.3.0
5 years ago
Paulo
2095701665
fix: Missing MessageReference when sending files
5 years ago
quinchs
8b25c9bbfb
feature: Add GuildUser IsPending property ( #1731 )
* Implemented Pending property
* Implemented changes
5 years ago
Paulo
225550dc5a
feature: Add MessageFlags and AllowedMentions to message modify ( #1724 )
* feature: Add MessageFlags and AllowedMentions to Modify
* Change exception message
5 years ago
Paulo
c683b2901d
feature: Add user public flags ( #1722 )
5 years ago
Paulo
6a62c4770c
feature: Add role tags ( #1721 )
5 years ago
Paulo
5934c7949a
misc: VoiceRegions and related changes ( #1720 )
5 years ago
Paulo
4a7f8fec93
fix: Move and fix internal AllowedMentions object ( #1727 )
5 years ago
Paulo
a4d32d366d
fix: IMessage.Embeds docs remarks
5 years ago
Still Hsu
accd3510df
docs: Add alternative documentation link
5 years ago
Fyers
dd2e524ff9
fix: Invite and InviteMetadata properties ( #1639 )
* fixes #1495
* keep obsolete properties and return types for compatibility
* missing properties for SocketInvite
* Restore xml docs and change obsolete message
Co-authored-by: Paulo <pnmanjos@hotmail.com>
5 years ago
Still Hsu
36de7b25f3
Temporarily disable StyleCops until all the fixes are impl'd
5 years ago
Still Hsu
a48e46de52
docs: Fix the missing "In This Article" section
5 years ago
Still Hsu
2cd1880228
docs: Add minor tweaks to DiscordSocketConfig docs strings
5 years ago
Still Hsu
e31cdc7586
docs: Fix MaxWaitBetweenGuildAvailablesBeforeReady docs string
Signed-off-by: Still Hsu <dev@stillu.cc>
5 years ago
Still Hsu
4988a0764d
Update framework version for tests to Core 3.1 to comply with LTS
5 years ago
Still Hsu
e0f8737c35
Add initial StyleCops style enforcement
5 years ago
Still Hsu
8f8078e969
Update project link
5 years ago
Still Hsu
d761846638
Add updated libraries for LastModified
Signed-off-by: Still Hsu <5843208+Still34@users.noreply.github.com>
5 years ago
Still Hsu
28a6f97d62
Update Docfx.Plugins.LastModified to v1.2.4
Signed-off-by: Still Hsu <5843208+Still34@users.noreply.github.com>
5 years ago
Still Hsu
833ee42a1f
Cleanup GatewayReconnectException docs
5 years ago
Still Hsu
13a41f8754
Mark null as a specific langword in summary
5 years ago
Still Hsu
62539f0391
Move bulk deletes remarks from <summary> to <remarks>
5 years ago
Still Hsu
9ea3291ef1
Resolve inheritdocs warning
5 years ago
Still Hsu
38f6186cd0
Add missing asset
Signed-off-by: Still Hsu <5843208+Still34@users.noreply.github.com>
5 years ago
Still Hsu
857ef77b41
Add new method of role ID copy
Signed-off-by: Still Hsu <5843208+Still34@users.noreply.github.com>
5 years ago
Daniel Baynton
47f571ef1c
fix: SocketGuild.HasAllMembers is false if a user left a guild ( #1683 )
* Fix: HasAllMembers is false if a user left
* Fix: Correct boolean logic
5 years ago
vrachv
aacfea05ea
feature: Add max bitrate value to SocketGuild
* Update SocketGuild.cs
* Fix returns value docs
Signed-off-by: Still Hsu <dev@stillu.cc>
Co-authored-by: Still Hsu <dev@stillu.cc>
5 years ago
Joel Liechti
e385c40fc7
docs: Update summary of SocketVoiceChannel.Users ( #1714 )
The inherited summary incorrectly stated that all users who _see_ the channel are returned when in reality only the ones _connected_ are.
5 years ago
Paulo
9d7cb39faa
fix: Rollback Activities to Game ( #1702 )
5 years ago
Paulo
1e9b252e64
fix: Wrong author for SocketUserMessage.ReferencedMessage
5 years ago
Paulo
5ed01a30b6
fix: UserMentions throwing NullRef
5 years ago