Commit Graph

477 Commits

Author SHA1 Message Date
moiph
8afef8245c fix: Cached message emoji cleanup at MESSAGE_REACTION_REMOVE_EMOJI (#1835)
MESSAGE_REACTION_REMOVE_EMOJI events were triggering REST calls by invoking `RemoveAllReactionsForEmoteAsync` instead of `RemoveReactionsForEmote`, the latter being to handle cached message state cleanup.
2021-05-08 15:45:53 -03:00
Zack Broderson
4c9910cf71 (ifcbrk) feature: Add ability to add/remove roles by id (#1757)
* Scaffold Add/Remove roles by id. (needs impl & docs)

* Add docs

* Add implementation

* Expose Add/Remove role endpoints

* Formatting

* Fix wrong method call
2021-04-29 11:34:52 -03:00
Paulo
365a848f7a (ifcbrk) feature: Add ModifyMessageAsync to IMessageChannel (#1830) 2021-04-29 11:33:39 -03:00
NeKz
df23d57458 feature: Add GetEmotesAsync to IGuild (#1781) 2021-04-28 11:08:56 -03:00
Waterball
0715d7db96 Feature: Add missing property to MESSAGE_REACTION_ADD event (#1801)
* Add guild member property for reaction

* Use the guild member provided by the event when present
2021-04-28 10:59:31 -03:00
Paulo
91a906397a feature: Add stickers (#1726) 2021-04-28 10:11:28 -03:00
Paulo
51b7afe2a6 misc: Add remark regarding CustomStatus as the activity (#1774)
* Throw exception with CustomStatus

* Add remark instead of exception

* Change wording
2021-03-10 16:07:31 -03:00
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>
2021-01-31 03:13:09 -03:00
quinchs
8b25c9bbfb feature: Add GuildUser IsPending property (#1731)
* Implemented Pending property

* Implemented changes
2020-12-23 12:47:54 -03:00
Paulo
225550dc5a feature: Add MessageFlags and AllowedMentions to message modify (#1724)
* feature: Add MessageFlags and AllowedMentions to Modify

* Change exception message
2020-12-23 12:47:20 -03:00
Paulo
c683b2901d feature: Add user public flags (#1722) 2020-12-23 12:46:42 -03:00
Paulo
6a62c4770c feature: Add role tags (#1721) 2020-12-23 12:46:27 -03:00
Paulo
5934c7949a misc: VoiceRegions and related changes (#1720) 2020-12-23 12:46:12 -03:00
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>
2020-12-19 11:39:09 -03:00
Still Hsu
2cd1880228 docs: Add minor tweaks to DiscordSocketConfig docs strings 2020-12-14 12:18:58 +08:00
Still Hsu
e31cdc7586 docs: Fix MaxWaitBetweenGuildAvailablesBeforeReady docs string
Signed-off-by: Still Hsu <dev@stillu.cc>
2020-12-14 12:07:24 +08:00
Still Hsu
e0f8737c35 Add initial StyleCops style enforcement 2020-12-14 12:00:53 +08:00
Still Hsu
833ee42a1f Cleanup GatewayReconnectException docs 2020-12-14 11:59:33 +08:00
Still Hsu
13a41f8754 Mark null as a specific langword in summary 2020-12-14 11:59:32 +08:00
Still Hsu
62539f0391 Move bulk deletes remarks from <summary> to <remarks> 2020-12-14 11:59:32 +08:00
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
2020-12-14 03:55:03 +00:00
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>
2020-12-14 03:54:31 +00:00
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.
2020-12-14 03:42:04 +00:00
Paulo
9d7cb39faa fix: Rollback Activities to Game (#1702) 2020-12-01 02:47:20 -03:00
Paulo
1e9b252e64 fix: Wrong author for SocketUserMessage.ReferencedMessage 2020-11-29 21:18:52 -03:00
Paulo
5ed01a30b6 fix: UserMentions throwing NullRef 2020-11-26 14:30:58 -03:00
Paulo
5213916903 fix: Possible NullReferenceException when receiving InvalidSession (#1695) 2020-11-25 14:27:26 -03:00
Paulo
e3850e1e8f feature: Add inline replies (#1659)
* Add inline replies

* Missed a few things

* Change xml docs, IUserMessage, and other changes

* Missed one when changing

* Fix referencedMessage author
2020-11-22 00:43:38 -03:00
Paulo
25d5d36772 feature: Send presence on Identify payload (#1688)
* Send presence on identify

* Change CurrentUser presence
2020-11-22 00:42:48 -03:00
Paulo
ec673e1863 feature: Implement gateway ratelimit (#1537)
* Implement gateway ratelimit

* Remove unused code

* Share WebSocketRequestQueue between clients

* Add global limit and a way to change gateway limits

* Refactoring variable to fit lib standards

* Update xml docs

* Update xml docs

* Move warning to remarks

* Remove specific RequestQueue for WebSocket and other changes

The only account limit is for identify that is dealt in a different way (exclusive semaphore), so websocket queues can be shared with REST and don't need to be shared between clients anymore.

Also added the ratelimit for presence updates.

* Add summary to IdentifySemaphoreName

* Fix spacing

* Add max_concurrency and other fixes

- Add session_start_limit to GetBotGatewayResponse
- Add GetBotGatewayAsync to IDiscordClient
- Add master/slave semaphores to enable concurrency
- Not store semaphore name as static
- Clone GatewayLimits when cloning the Config

* Add missing RequestQueue parameter and wrong nullable

* Add RequeueQueue paramater to Webhook

* Better xml documentation

* Remove GatewayLimits class and other changes

- Remove GatewayLimits
- Transfer a few properties to DiscordSocketConfig
- Remove unnecessary usings

* Remove unnecessary using and wording

* Remove more unnecessary usings

* Change named Semaphores to SemaphoreSlim

* Remove unused using

* Update branch

* Fix merge conflicts and update to new ratelimit

* Fixing merge, ignore limit for heartbeat, and dispose

* Missed one place and better xml docs.

* Wait identify before opening the connection

* Only request identify ticket when needed

* Move identify control to sharded client

* Better description for IdentifyMaxConcurrency

* Add lock to InvalidSession
2020-11-18 23:40:09 -03:00
Paulo
97e71cd5e5 fix: Revert PremiumSubscriptionCount type (#1686) 2020-11-18 14:52:00 -03:00
Paulo
ec212b175d feature: Add missing properties to Guild and deprecate GuildEmbed (#1573)
* Add missing properties to Guild, related methods, and deprecate GuildEmbed endpoints

- Add missing guild properties: `discovery_splash`, `widget_enabled`, `widget_channel_id`, `rules_channel_id`, `max_presences`, `max_presences`, `max_members`, `public_updates_channel_id`, `max_video_channel_users`, `approximate_member_count`, `approximate_presence_count`
- Update guild properties: `embed_enabled`, `embed_channel_id`
- Add `GetGuildDiscoverySplashUrl` to `CDN`
- Add classes related to the guild widget
- Add `withCounts` parameter to `GetGuild(s)Async`
- Make GuildEmbed related methods obsolete with a message redirecting to widget ones

* Change xml docs and PremiumSubscriptionCount type

* Changed some xml docs
2020-11-17 05:23:45 -03:00
Paulo
3a1001830b misc: Missing summary tag 2020-11-17 02:11:02 -03:00
Paulo
9134443494 fix: Crosspost throwing InvalidOperationException (#1671)
* Add INewsChannel

* Renaming variable to match the new type
2020-11-08 19:29:15 -03:00
Jack Fox
1e012ac0b8 feature: Add GetStreams to AudioClient (#1588)
* Added GetStreams

* Change return type

* Change return type on the interface

Co-authored-by: Paulo <pnmanjos@hotmail.com>
2020-11-08 18:21:51 -03:00
Paulo
1ab670b3fc feature: Add INVITE_CREATE and INVITE_DELETE events (#1491)
* Add invite events (create and delete)

* Removed unused using

* Fixing IInviteMetadata properties

* Add two new fields to the gateway event

* Better event summary and remarks

* Change how to assign to target variable

Co-Authored-By: Joe4evr <jii.geugten@gmail.com>

* Applying suggested changes to TargetUserType

* Renaming NotDefined to Undefined

* Fixing xml docs

* Changed the summary style format

Co-authored-by: Joe4evr <jii.geugten@gmail.com>
2020-11-08 17:33:37 -03:00
Paulo
a2af9857ca fix: Audio stream dispose (#1667)
* Fix audio dispose

* Missed a few
2020-11-07 16:15:46 -03:00
Radka Gustavsson
a80e5ff940 (ifcbrk) feature: Add includeRoleIds to PruneUsersAsync (#1581)
* Implemented include_roles for guilds/id/prune get&post

* Unnecessary using

Co-authored-by: Paulo <pnmanjos@hotmail.com>
2020-11-07 15:55:14 -03:00
Paulo
084db253f3 fix: limit request members batch size
Discord is actually enforcing v8 limits on v6 according to https://github.com/discord/discord-api-docs/issues/2184
2020-11-06 11:30:42 -03:00
Paulo
f396cd9b92 fix: Cancel reconnection when 4014 (#1603)
* Cancel reconnection when 4014

* Missed an else
2020-10-14 18:23:00 -04:00
Paulo
fa5ef5e1c6 fix: handicap member downloading for verified bots (#1647) 2020-10-14 18:20:30 -04:00
Paulo
3085e883b7 fix: Invoke UserUpdated from GuildMemberUpdated if needed (#1623) 2020-10-14 18:05:35 -04:00
Paulo
3860da002f fix: Do not update overwrite cache locally (#1622) 2020-10-14 18:04:43 -04:00
Samuel
c1d04b4d1a fix: Handle null PreferredLocale in rare cases (#1624)
Sometimes Discord messes up and leaves a guild with a null PreferredLocale, causing an error to be thrown. This fixes that from Discord.Net's end even though it's Discord's fault.
2020-10-14 18:03:13 -04:00
Paulo
366ca9a562 fix: Parse mentions from message payload (#1621) 2020-10-14 18:02:33 -04:00
Bram
df8a0f7cd6 Fix: Not using the new domain name. (#1571)
* Fix: Using the correct discord domain.

* Fix: Using the correct discord domain.

* Docs: Using the correct discord domain.

* Fix: Changed canary and ptb to the new domain.
2020-09-04 17:56:05 +01:00
Paulo
421a0c12cc feature: support reading multiple activities (#1520) 2020-08-01 12:43:56 -04:00
Paulo
b8fa464125 fix: Stop TaskCanceledException from bubbling up (#1580) 2020-07-10 00:13:01 -04:00
Paulo
dc8c95931e fix: Incomplete Ready, DownloadUsersAsync, and optimize AlwaysDownloadUsers (#1548)
* Fix Ready and AlwaysDownloadUsers

Ready could fire before downloading all guild data and downloading guild users one guild per time without gateway intents is a waste of a gateway request that can support up to 1000.

* Reduce batchSize and fix count

* Fix typo

* Split xml docs line

Co-authored-by: Christopher Felegy <cfelegy@riseup.net>
2020-06-18 00:00:10 -04:00
Paulo
ab32607bcc (ifcbrk) fix: Add AllowedMentions to SendFileAsync (#1531)
* Add AllowedMentions to SendFileAsync

* Update xml reference and mocked channels
2020-06-17 23:51:50 -04:00