Commit Graph

3403 Commits

Author SHA1 Message Date
Quin Lynch
a1cfa41953 Fix stream access exception when ratelimited (#2117) 2022-02-16 11:13:36 -04:00
Quin Lynch
92445fb247 meta: bump version 2022-02-16 10:54:21 -04:00
Quin Lynch
84eeb780d1 Revert "Fixes unused creation of REST clients for DiscordShardedClient shards. (#2109)" (#2116)
This reverts commit 6039378c52.
2022-02-16 10:43:04 -04:00
Armano den Boef
1ffe9eeca9 Add DisplayAvatar to IGuildUser (#2115) 2022-02-16 09:49:55 -04:00
Armano den Boef
9a33aa4371 Update bugreport.yml (#2112)
Updates the bugreport format to include heading to the discussions for non-bug related issues
2022-02-16 09:11:40 -04:00
Quin Lynch
62d4598fc9 meta: bump version 2022-02-16 08:40:56 -04:00
Quin Lynch
b2598d37b6 fix: Implement correct ratelimit handles for 429's (#2110)
* init

* fix errors
2022-02-16 08:20:57 -04:00
Armano den Boef
abfba3c4bb Add DisplayName property to IGuildUser. (#2107) 2022-02-16 07:52:08 -04:00
Armano den Boef
169d54f1df Fix being unable to modify AllowedMentions with no embeds set.(#2108) 2022-02-16 07:51:40 -04:00
Armano den Boef
6039378c52 Fixes unused creation of REST clients for DiscordShardedClient shards. (#2109)
* Init

* Remove unnecessary length check

* Swap out for any check

* Final; Check if parentclient was passed
2022-02-16 07:51:15 -04:00
Quin Lynch
fad217e8bc Fix crosspost ratelimits (#2100) 2022-02-12 06:51:36 -04:00
Quin Lynch
503d32aa7e Update interaction summaries (#2099)
* init

* Update RestMessageComponentData.cs

* Update src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommandOption.cs

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommandOption.cs

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommand.cs

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommand.cs

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>
2022-02-12 06:51:14 -04:00
Sean
69da238a0f prefer shortened linq update (#2093) 2022-02-11 21:45:54 -04:00
Armano den Boef
01735c82fb Fix ToString() on CommandInfo (#2094) 2022-02-11 21:45:36 -04:00
Quin Lynch
7e1b8c9db0 Fix channel being null in DMs on Interactions (#2098) 2022-02-11 21:43:32 -04:00
Quin Lynch
0352374e74 meta: bump 3.3.0 2022-02-09 00:33:37 -04:00
Quin Lynch
c8f175e11a Feature: Implement modals (#2087)
* Implement Modals (#428)

* Socket Modal Support

* fix shareded client support

* Properly use `HasResponded` instead of `_hasResponded`

* `ModalBuilder` and `TextInputBuilder` validation.

* make orginisation more consistant.

* Rest Modals.

* Docs + add missing methods

* fix message signatures and missing abstract members

* modal changes

* um?????

* update modal docs

* update docs - again for some reason

* cleanup

* fix message signatures

* add modal commands support to interaction service

* Fix _hasResponded

* update to new unsupported standard.

* Sending modals with Interaction service.

* fix spelling in ComponentBuilder

* sending IModals when responding to interactions

* interaction service modals

* fix rest modals

* spelling and minor improvements.

* improve interaction service modal proformance

* use precompiled lambda for interaction service modals

* respect user compiled lambda choice

* changes to modals in the interaction service (more)

* support compiled lambdas in modal properties.

* modal interactions tweaks

* fix inline doc

* more modal docs

* configure responce to faild modal component

* init

* solve runtime errors

* solve build errors

* add default value parsing

* make modal info caching static

* make ModalUtils static

* add inline docs

* fix build errors

* code cleanup

* Introduce Required and Label properties as seperate attributes.

* replace internal dictionary of ModalInfo with a list

* change input building logic of modals

* update RespondWithModalAsync method

* add initial value parameter back to ModalTextInput and fix optional modal field

* add missing inline docs

* dispose the reference modal instance after building

* code cleanup on modalcommandbuilder

* Update docs/guides/int_basics/message-components/text-input.md

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update docs/guides/int_basics/message-components/text-input.md

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update docs/guides/int_basics/modals/intro.md

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update docs/guides/int_basics/modals/intro.md

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update docs/guides/int_basics/modals/intro.md

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update docs/guides/int_basics/modals/intro.md

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update docs/guides/int_basics/modals/intro.md

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update docs/guides/int_basics/modals/intro.md

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update docs/guides/int_basics/modals/intro.md

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update docs/guides/int_framework/intro.md

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update docs/guides/int_framework/intro.md

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update docs/guides/int_framework/samples/intro/modal.cs

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update src/Discord.Net.Core/Entities/Interactions/MessageComponents/IComponentInteractionData.cs

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update src/Discord.Net.Core/Entities/Interactions/MessageComponents/TextInputComponent.cs

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update src/Discord.Net.Core/Entities/Interactions/Modals/IModalInteraction.cs

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update src/Discord.Net.Core/Entities/Interactions/Modals/ModalBuilder.cs

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update src/Discord.Net.Core/Entities/Interactions/Modals/ModalBuilder.cs

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update src/Discord.Net.Core/Entities/Interactions/Modals/ModalBuilder.cs

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update src/Discord.Net.Core/Entities/Interactions/Modals/ModalBuilder.cs

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update src/Discord.Net.Core/Entities/Interactions/Modals/ModalBuilder.cs

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update src/Discord.Net.Core/Entities/Interactions/Modals/ModalBuilder.cs

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update src/Discord.Net.Interactions/Attributes/Commands/ModalInteractionAttribute.cs

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update src/Discord.Net.Interactions/Attributes/Modals/RequiredInputAttribute.cs

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update src/Discord.Net.Interactions/InteractionServiceConfig.cs

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update src/Discord.Net.WebSocket/Entities/Interaction/MessageComponents/SocketMessageComponentData.cs

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Update src/Discord.Net.WebSocket/Entities/Interaction/Modals/SocketModalData.cs

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* update interaction service modal docs

* implements ExitOnMissingmModalField config option and adds Type field to modal info

* Add WithValue to text input builders

* Fix rare NRE on component enumeration

* Fix RequestOptions being required in some methods

* Use 'OfType' instead of 'Where'

* Remove android unsported warning

* Change publicity of properties in IInputComponeontBuilder.cs

Co-authored-by: Cenk Ergen <57065323+Cenngo@users.noreply.github.com>
Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Remove complex parameter ref

Co-authored-by: CottageDwellingCat <80918250+CottageDwellingCat@users.noreply.github.com>
Co-authored-by: Cenk Ergen <57065323+Cenngo@users.noreply.github.com>
Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>
2022-02-09 00:17:56 -04:00
Quin Lynch
33efd8981d Add support for attachments (#2088)
* Enforce valid button styles

* support command option type 11

* missing '.'

* Added type converter.

Co-authored-by: Cat <lumitydev@gmail.com>
Co-authored-by: CottageDwellingCat <80918250+CottageDwellingCat@users.noreply.github.com>

Co-authored-by: FeroxFoxxo <feroxfoxxo@gmail.com>
Co-authored-by: Cat <lumitydev@gmail.com>
Co-authored-by: CottageDwellingCat <80918250+CottageDwellingCat@users.noreply.github.com>
2022-02-09 00:13:15 -04:00
Quin Lynch
d142710d2a fix guild feature enum (#2089) 2022-02-09 00:12:54 -04:00
Quin Lynch
6290f75359 Fix attempts to fetch channels in interactions (#2090)
* fix attempts to fetch channels in interactions

* remove test case
2022-02-09 00:12:41 -04:00
Quin Lynch
97e54e1047 Feature: Allow modifying attachments on interactions and extend the module base (#2091) 2022-02-09 00:12:22 -04:00
Quin Lynch
b424bb2019 Fix Current user null on reconnect (#2092) 2022-02-09 00:12:07 -04:00
Quin Lynch
75e94feab0 Add IEnumerable collection parameters instead of arrays for MessageExtensions (#2079) 2022-02-08 21:45:48 -04:00
Armano den Boef
0a672addcf Create bugreport.yml (#2080)
* Create bugreport.yml

Grabbed from Discord.Net-Labs, original by @CottageDwellingCat

* Append faq link

Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>

* Append migration guide

Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>

* Append version change

Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>

* Append body

Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>

* Fix 5/???

smh I was tired when I committed this and didnt bother making changes assuming it was already good :'')

Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>

Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>
2022-02-08 21:44:55 -04:00
AlFas
43b20bc73e Simplify code in DiscordComparers (#1713) 2022-02-03 14:34:39 -04:00
Armano den Boef
b45aebf506 fix: Rest message components cannot pass through execute method (#2076)
Line 60 should be equal to line 42 here. Currently rest interactions cant execute the messagecomponent handlers.
2022-02-03 14:04:23 -04:00
Armano den Boef
7d6f4f3b6c fix: Clone being created on updated entity (#2077)
* Patch clone being created on updated entity

* Clone globaluser as its not within the same instance

* Clone the globaluser alongside the guilduser

* Patch, non-assigned

* Update user entities for globaluser setter
2022-02-03 14:03:22 -04:00
quin lynch
9116c9a97c meta: changelog 2022-01-30 03:19:07 -04:00
quin lynch
e19ad2832a Merge branch 'dev' of https://github.com/discord-net/Discord.Net into dev 2022-01-30 03:10:41 -04:00
quin lynch
fddaac9a21 meta: bump version 2022-01-30 03:10:29 -04:00
Quin Lynch
09eb9facba Fix thread member download on create (#2072) 2022-01-30 03:09:41 -04:00
Quin Lynch
82f3879aaf Fix logging a TaskCanceledException out of users control (#2030) 2022-01-30 02:55:32 -04:00
Cenk Ergen
1917961ee3 Fix Channel Types Attribute (#2066)
* fix channeltypes attribute

* fix channeltypes attribute
2022-01-30 02:54:48 -04:00
Quin Lynch
37ada59639 Fix attempt to get application info for non-bot tokens (#2071) 2022-01-30 01:54:19 -04:00
Armano den Boef
f52513188f Fix markdown formatting in Glossary (#2064) 2022-01-27 10:12:04 -04:00
Christoph L
6dada66992 Set Stream.Position in FileAttachment-ctor to 0 (#2063)
Co-authored-by: Christoph Liebender <c.liebender@vision4quality.de>
2022-01-27 09:55:40 -04:00
Nikita Petko
5773b8e66d Update HttpException to display inner-errors on the HttpException.Message for better debugging (#2059)
Update HttpException.cs
2022-01-27 09:52:46 -04:00
Armano den Boef
3475bd8d6f Add missing IThreadUser interface (#2055)
* Implement

* Add IMentionable to RestThreadUser

* Rather move mentionable to interface for consistency.

* Further consistency
2022-01-27 09:51:30 -04:00
Armano den Boef
b14af1c008 Adding Entity guides, flowcharts, better sample system. (#2054)
* initial

* Interaction glossary entry

* Sharded Interaction sample

* Renames into solution

* Debugging samples

* Modify target location for webhookclient

* Finalizing docs work, resolving docfx errors.

* Adding threaduser to user chart

* Add branch info to readme.

* Edits to user chart

* Resolve format for glossary entries

* Patch sln target

* Issue with file naming fixed

* Patch 1/x for builds

* Appending suggestions
2022-01-27 09:50:49 -04:00
Rob Aguilar
b0f59e3eb9 Update creating-context-menu-commands.md (#2061)
Fix typo
Add missing semicolon
2022-01-27 09:50:26 -04:00
quin lynch
5897dc5a45 chore: update year and version 2022-01-15 06:42:01 -04:00
quin lynch
3108e312aa meta: 3.2.0 2022-01-15 06:11:26 -04:00
Quin Lynch
bcd5fa450b Fix ThreadMember null ref (#2046) 2022-01-15 05:52:59 -04:00
Quin Lynch
a07531f655 Fix argument null exception on Message Create (#2045) 2022-01-15 05:52:46 -04:00
Quin Lynch
c6825647f2 Use ApplicationId for interactions (#2044) 2022-01-15 05:44:55 -04:00
Quin Lynch
7f4feea96d Fix exception when uploading files (#2034) 2022-01-14 07:57:02 -04:00
Quin Lynch
64423a0653 Add GetChannelType extension method (#2035) 2022-01-14 07:56:42 -04:00
Quin Lynch
7075d4ee35 Add missing guild features (#2036) 2022-01-14 07:56:20 -04:00
Quin Lynch
4d9389b3aa Add default ratelimit callback (#2037) 2022-01-14 07:55:57 -04:00
Quin Lynch
3429cf99c8 Add AddRow and WithRows to ComponentBuilder (#2038) 2022-01-14 07:55:36 -04:00