Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

01 #1

Merged
merged 22 commits into from
Jun 29, 2020
Merged

01 #1

merged 22 commits into from
Jun 29, 2020

Conversation

vrachv
Copy link
Owner

@vrachv vrachv commented Jun 29, 2020

No description provided.

FiniteReality and others added 22 commits May 18, 2020 16:48
If the current reset time is in the past, then somebody else in the
current bucket must have made a request before we were able to. To
prevent accidental ratelimits, we fall-back to the second sleep
branch, as if the reset time wasn't specified at all.

Additionally Extracts the minimum sleep time to a constant, and also
bumps it to 750ms.
* Added PublishAsync to Messages.

* Added missing implementation.

* 1. Aligned with naming standards
2. Clarified xml docs
3. Properly threw exceptions instead of failing silently.

* Additional documentation included.

* Removed un-needed comments.

Co-authored-by: Matt Smith <v-matsm@microsoft.com>
* Updating webhook regex for discord.com

Updates webhook URL regex matching for discordapp.com and discord.com

* Fixing comment

* Whitespace
* Add GetUsersAsync to SocketGuild

* Fix IGuild return

* Do not download unless needed
* Check Dictionary

Check Dictionary instead of creating a new IReadOnlyCollection and looping in it

* Add Remark to MutualGuilds
## Summary

If PartyId isn't present, Discord.Net will throw an InvalidOperationException and not raise `MessageReceived`.
Got this a few times with my bot, stacktrace:
```
System.InvalidOperationException: This property has no value set.
   at Discord.Optional`1.get_Value() in ...\Discord.Net\src\Discord.Net.Core\Utils\Optional.cs:line 20
   at Discord.WebSocket.SocketMessage.Update(ClientState state, Message model) in ...\Discord.Net\src\Discord.Net.WebSocket\Entities\Messages\SocketMessage.cs:line 157
   at Discord.WebSocket.SocketUserMessage.Update(ClientState state, Message model) in ...\Discord.Net\src\Discord.Net.WebSocket\Entities\Messages\SocketUserMessage.cs:line 58
   at Discord.WebSocket.SocketUserMessage.Create(DiscordSocketClient discord, ClientState state, SocketUser author, ISocketMessageChannel channel, Message model) in ...\Discord.Net\src\Discord.Net.WebSocket\Entities\Messages\SocketUserMessage.cs:line 53
   at Discord.WebSocket.DiscordSocketClient.ProcessMessageAsync(GatewayOpCode opCode, Nullable`1 seq, String type, Object payload) in ...\Discord.Net\src\Discord.Net.WebSocket\DiscordSocketClient.cs:line 1210
```

After looking all properties, this is the only one that could be blamed and was already fixed for `RestMessage`s, see #1337 

## Changes

- `Value` to `GetValueOrDefault()` for `PartyId`
…moteAsync (#1544)

* Add event and method

* Simplify convert to IEmote
The GuildHelper.CreateRoleAsync() was sending 2 requests to create a role. One to create the role, and one to modify the role that was created. This can be done in one request. So i have moved it to a single request to lower the amount of requests send to the api. This will also solve issue #1451.
CreateGuildRoleParams is identical to ModifyGuildRoleParams, so just use
the latter when creating new roles.
* Give proper values to flag enum

* Add zero value

* Initialize lists

* Update xml docs
* Support Gateway Intents

Allows supplying gateway intents through DiscordSocketConfig which will be passed through the IDENTIFY payload, in order to choose what gateway events you want to receive.

* Fixing enum casing

* Feedback

* Updating comment for GuildSubscriptions

* Comment update
* Add Direction.Around to GetMessagesAsync

* Reuse the method

* Reuse GetMany

* Fix limit when getting from cache without message id

* Fix limit when getting from rest without message id

* Change cache return

It will return in a similar way to REST
* Add AllowedMentions to SendFileAsync

* Update xml reference and mocked channels
…dUsers (#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>
* Updating comments for privileged intents

* Moving updated comments to remarks

* Formatting
* Update build.yml

* Update azure-pipelines.yml

* Update examples to NC3.1
@vrachv vrachv merged commit 9f08cde into vrachv:dev Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants