Commit Graph

623 Commits

Author SHA1 Message Date
Quin Lynch
88f6168eeb fix: NRE with bot scope and user parameters (#2320) 2022-05-24 02:47:03 -03:00
Quin Lynch
7a07fd62e4 feature: Forum channels (#2316)
* initial implementation

* Update SocketForumChannel.cs

* rest forum channel and remove message builder for 4.x

* Update src/Discord.Net.Core/DiscordConfig.cs

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

* Update src/Discord.Net.Core/Entities/Channels/IForumChannel.cs

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

* Update src/Discord.Net.Core/DiscordConfig.cs

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

* Update src/Discord.Net.Core/Entities/Channels/IForumChannel.cs

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

* Update src/Discord.Net.Core/Entities/Channels/IForumChannel.cs

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

* Update src/Discord.Net.Core/Entities/Channels/IForumChannel.cs

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

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>
2022-05-24 02:30:25 -03:00
sabihoshi
f47f3190d0 fix: Use IDiscordClient.GetUserAsync impl in DiscordSocketClient (#2319) 2022-05-24 02:29:16 -03:00
Armano den Boef
1f01881beb feature: Add DefaultArchiveDuration to ITextChannel (#2295) 2022-05-18 04:51:37 -03:00
Nhea
b333de2237 feature: add UpdateAsync to SocketModal (#2289) 2022-05-13 21:59:38 -03:00
Quin Lynch
23656e844e feature: Text-In-Voice (#2269)
* Initial implementation

* Remove blocking webhooks

* add safeguard for tiv

* fix tests
2022-05-09 22:57:28 -03:00
Quin Lynch
e136759073 feature: Treat warnings as errors and set warning level to 5 (#2270) 2022-05-09 22:56:22 -03:00
moiph
0ec8938a67 feature: Support FailIfNotExists on MessageReference (#2283)
Fixes #2282
2022-05-09 22:55:17 -03:00
Quin Lynch
f2bb55e804 fix: null user on interaction without bot scope (#2271) 2022-04-30 19:02:57 -03:00
Cenk Ergen
a8f607553b fix: Permissions v2 Invalid Operation Exception (#2267)
* implement fix

* implement fix
2022-04-29 11:53:14 -03:00
Quin Lynch
d98b3cc495 feature: V2 Permissions (#2222)
* Initial V2 permissions

* add perms-v2 attributes and properties, add deprecation messages

* add perms-v2 properties to command info classes

* add perms-v2 fields to Rest/SocketApplicationCommand entities and IApplicationCommand

* fix json name of DmPermission field

Co-authored-by: Cenngo <cenk.ergen1@gmail.com>
2022-04-28 08:47:52 -03:00
Cenk Ergen
4ce1801bdf feature: Passing CustomId matches into contexts (#2136)
* add logic for passing the wild card captures into the context

* move concrete impl of IRouteSegmentMatch to internal

* Apply suggestions from code review

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

* fix build errors

* Apply suggestions from code review

Co-authored-by: Armano den Boef <68127614+Rozen4334@users.noreply.github.com>

Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>
Co-authored-by: Armano den Boef <68127614+Rozen4334@users.noreply.github.com>
2022-04-27 11:09:30 -03:00
Alex Thomson
275b833205 Fix browser property (#2254) 2022-04-27 11:07:35 -03:00
Alex Thomson
daba58cdd4 Fix SocketGuild not returning the AudioClient (#2248) 2022-04-18 03:52:32 -03:00
Armano den Boef
d8757a5afa feature: Update bans to support pagination (#2223)
* Cacheless impl

* Ignore cache impl

* Update src/Discord.Net.Core/Entities/Channels/Direction.cs

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

* Update src/Discord.Net.Core/Entities/Channels/Direction.cs

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

* Update src/Discord.Net.Core/Entities/Channels/Direction.cs

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

* Update src/Discord.Net.Core/Entities/Guilds/IGuild.cs

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

* Update src/Discord.Net.Core/Entities/Guilds/IGuild.cs

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

* Update src/Discord.Net.Core/Entities/Guilds/IGuild.cs

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

* Update src/Discord.Net.Core/Entities/Guilds/IGuild.cs

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

* Implement xmldoc consistency

Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>
2022-04-05 14:13:16 -03:00
Quin Lynch
bfd0d9bede fix: GuildMemberUpdated cacheable before entity incorrect (#2225) 2022-04-04 19:17:18 -03:00
Armano den Boef
e38104bb32 feature: Make bidirectional formatting optional (#2204)
* Init

* Clearing up comment on config entry.

* Update user entities to remove storage of the setting

Co-authored-by: Quin Lynch <lynchquin@gmail.com>
2022-04-04 18:21:11 -03:00
Armano den Boef
8522447c27 Fix gateway interactions not running without bot scope. (#2217)
* Init

* Implement public channelId
2022-04-04 18:16:13 -03:00
Armano den Boef
c4131cfc8b Fix: ShardedClients not pushing PresenceUpdates (#2219) 2022-03-31 16:24:36 -03:00
FeroxFoxxo
305d7f9e13 Fix: Integration model from GuildIntegration and added INTEGRATION gateway events (#2168)
* fix integration models; add integration events

* fix description on IGUILD for integration

* fix typo in integration documentation

* fix documentation in connection visibility

* removed public identitiers from app and connection

* Removed REST endpoints that are not part of the API.

* Added documentation for rest integrations

* added optional types

* Fixed rest interaction field with not being IsSpecified
2022-03-26 09:52:31 -03:00
Armano den Boef
d48a7bd348 Fix: serialization error on thread creation timestamp. (#2188) 2022-03-26 09:45:54 -03:00
d4n
741ed809d6 Add missing methods to IComponentInteraction (#2201) 2022-03-26 09:44:13 -03:00
Armano den Boef
82473bce69 Update GuildMemberUpdated comment regarding presence (#2193) 2022-03-26 09:43:16 -03:00
Quin Lynch
25aaa4948a fix: thread owner always null (#2182) 2022-03-09 17:29:24 -04:00
Quin Lynch
f8ec3c79c2 Fix/ambigiuous reference (#2181)
* fix: Ambigiuous reference when creating roles

* Update RestGuild.cs
2022-03-09 17:29:10 -04:00
Quin Lynch
24b7bb593a Fix: sharded client logout (#2179) 2022-03-09 17:28:46 -04:00
MrCakeSlayer
1ba96d6fbd Add configuration toggle to suppress Unknown dispatch warnings (#2162) 2022-03-02 21:30:17 -04:00
CottageDwellingCat
1fb62de14b Support Sending Message Flags (#2131)
* Add message flags

* Add webhook message flags
2022-03-02 19:23:27 -04:00
Quin Lynch
b3370c33e2 Fix usage of CacheMode.AllowDownload in channels (#2154)
Co-Authored-By:  <25006819+sabihoshi@users.noreply.github.com>

Co-authored-by:  <25006819+sabihoshi@users.noreply.github.com>
2022-03-02 19:22:59 -04:00
Quin Lynch
6bf5818e72 Add IsInvitable and CreatedAt to threads (#2153)
* Add IsInvitable and CreatedAt to threads

* Update src/Discord.Net.Core/Entities/Channels/IThreadChannel.cs

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

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>
2022-03-02 19:22:29 -04:00
Quin Lynch
1dc473c7e4 Add Image property to Guild Scheduled Events (#2151)
* Add Image property to create and modify events

* Add CDN routes to get cover image

* Update banner names

* Update CDN.cs

* Update IGuildScheduledEvent.cs
2022-03-02 19:22:08 -04:00
Quin Lynch
5594739135 Clarify Users property on SocketGuildChannel (#2149) 2022-03-02 16:43:33 -04:00
EpicOfficer
8bcd3da9e4 Add self_video to VoiceState (#2137)
* Add self_video to VoiceState

* Update selfVideo flag
2022-03-02 16:27:29 -04:00
d4n
f601e9bc34 Fix context menu comand message type (#2128) 2022-03-02 15:06:29 -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
abfba3c4bb Add DisplayName property to IGuildUser. (#2107) 2022-02-16 07:52:08 -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
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
Quin Lynch
7e1b8c9db0 Fix channel being null in DMs on Interactions (#2098) 2022-02-11 21:43:32 -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
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
b424bb2019 Fix Current user null on reconnect (#2092) 2022-02-09 00:12:07 -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
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
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
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