Commit Graph

3193 Commits

Author SHA1 Message Date
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
04389a4f3e fix: Emoji url encode (#1681) 2020-11-17 05:11:25 -03:00
Paulo
3a1001830b misc: Missing summary tag 2020-11-17 02:11:02 -03:00
Paulo
47ed806418 misc: Change ratelimit messages (#1678) 2020-11-15 13:20:08 -03:00
Paulo
be60d813f7 fix: Team is nullable, not optional (#1672) 2020-11-09 15:39:08 -03:00
Paulo
05a1f0a709 fix: Discord sends null when there's no team 2020-11-09 12:31:17 -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
10fcde0a32 feature: Add missing application properties (including Teams) (#1604)
* Add missing application properties

Add IsBotPublic, BotRequiresCodeGrant, and Team properties to IApplication

* To immutable list

* Change list to array
2020-11-08 18:13:41 -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
bakabaka.bunbun
2592264acb feature: Add "View Guild Insights" to GuildPermission (#1619)
* feature: Add "View Guild Insights" permission

* Add missing summary

Co-authored-by: Paulo <pnmanjos@hotmail.com>
2020-11-07 16:10:13 -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
Matt Smith
971d519e35 fix: GuildEmbed.ChannelId as nullable per API documentation (#1532) 2020-11-07 15:44:33 -03:00
Samuel
e40ca4a422 fix: Missing AddReactions permission for DM channels. (#1244)
Co-authored-by: Samuel <33796679+Samrux@users.noreply.github.com>
2020-11-07 15:26:33 -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
ae9fff6380 fix: Check error 404 and return null for GetBanAsync (#1614) 2020-10-28 18:03:08 -03:00
Paulo
bd4516b035 (ifcbrk) fix: Add AllowedMentions to webhooks (#1602) 2020-10-28 17:52:06 -03:00
Paulo
43c8fc0535 fix: Voice overwrites and CategoryId remarks (#1608)
* Add overwrites to voice and change CategoryId docs

* Let's not forget another one
2020-10-28 17:51:16 -03:00
Alex Howe
03b831e691 fix: Update README.MD to reflect new discord domain (#1652)
The first link does not point to the correct discord domain, it seems the commit that should have fixed this missed this link.
2020-10-28 15:26:48 -04:00
Paulo
f396cd9b92 fix: Cancel reconnection when 4014 (#1603)
* Cancel reconnection when 4014

* Missed an else
2020-10-14 18:23:00 -04:00
mathewsjwh
e3925a77a3 feature: Added CultureInvariant RegexOption to WebhookUrlRegex (#1637)
Co-authored-by: Jake Mathews <jwm5vv@virginia.edu>
2020-10-14 18:21:42 -04:00
Paulo
fa5ef5e1c6 fix: handicap member downloading for verified bots (#1647) 2020-10-14 18:20:30 -04:00
Paulo
4b389f3ecf fix: Add missing permissions (#1642) 2020-10-14 18:05:59 -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
b95b95bdcb fix: Invite audit log without inviter (#1599)
* Fix possible invite without inviter

* Prevent the same for InviteCreate

* Update Creator property docs
2020-08-05 20:16:59 -04:00
Paulo
2f6c0175c8 fix: Different ratelimits for the same route (implement discord buckets) (#1546)
* Don't disable when there's no resetTick

Sometimes Discord won't send any ratelimit headers, disabling the semaphore for endpoints that should have them.

* Undo changes and change comment

* Add HttpMethod to BucketIds

* Add X-RateLimit-Bucket

* BucketId changes

- BucketId is it's own class now
- Add WebhookId as a major parameter
- Add shared buckets using the hash and major parameters

* Add webhookId to BucketIds

* Update BucketId and redirect requests

* General bugfixes

* Assign semaphore and follow the same standard as Reset for ResetAfter
2020-08-05 20:16:21 -04:00
Paulo
421a0c12cc feature: support reading multiple activities (#1520) 2020-08-01 12:43:56 -04:00
Paulo
2d80037f6b feature: Add missing channel properties (#1596) 2020-08-01 01:26:24 -04:00
Paulo
42ba3720e3 fix: Trim token before passing it to the authorization header (#1578)
* Trim token

* Trim when assigning to AuthToken
2020-07-18 13:52:23 -04:00
Mustafa Salih ASLIM
468f8264d0 fix: unsupported property causes an exception (#1469)
fix for: https://github.com/discord-net/Discord.Net/issues/1436

`SlowModeInterval` property causes an exception for Announcement Channel feature if it is enabled on discord. Should be checked whether it is specified or not before set to property.
2020-07-10 00:13:46 -04:00
Paulo
b8fa464125 fix: Stop TaskCanceledException from bubbling up (#1580) 2020-07-10 00:13:01 -04:00
JT
4fa6393329 meta: Fix CI/CD (#1583)
* Update build.yml

* Update azure-pipelines.yml

* Update examples to NC3.1
2020-06-27 15:20:30 -04:00
moiph
c42bfa6f4f docs: updating comments for privileged intents (#1576)
* Updating comments for privileged intents

* Moving updated comments to remarks

* Formatting
2020-06-20 19:48:55 -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
OhB00
a51cdf60a2 feature: allow for inherited commands in modules (#1521) 2020-06-17 23:53:26 -04:00