Commit Graph

3438 Commits

Author SHA1 Message Date
Armano den Boef
47de5a2fb4 Greatly reduce code complexity & make IF samples functional (#2205)
* Greatly reduce code complexity

* Fixes sharded client IF implementation
2022-03-26 09:37:30 -03:00
Raiden Shogun
c286b9978e Fixed typo (#2206)
`await arg2.Interaction.RespondAsync("Command exception: {arg3.ErrorReason}");` would never have showed the `ErrorReason` because a `$` was missing before the string.
2022-03-26 09:33:21 -03:00
Quin Lynch
fc31589056 Fix changelog formatting 2022-03-09 17:36:29 -04:00
Quin Lynch
e3fc96bc44 meta: 3.4.1 2022-03-09 17:33:25 -04: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
765c0c5544 Feature: attachment description and content type (#2180) 2022-03-09 17:28:56 -04:00
Quin Lynch
24b7bb593a Fix: sharded client logout (#2179) 2022-03-09 17:28:46 -04:00
Cenk Ergen
fb4250b88c Feature: Component TypeConverters and CustomID TypeReaders (#2169)
* fix sharded client current user

* add custom setter to group property of module builder

* rename serilazation method

* init

* create typemap and default typereaders

* add default readers

* create typereader targetting flags

* seperate custom id readers with component typeconverters

* add typereaders

* add customid readers

* clean up component info argument parsing

* remove obsolete method

* add component typeconverters to modals

* fix build errors

* add inline docs

* bug fixes

* code cleanup and refactorings

* fix build errors

* add GenerateCustomIdString method to interaction service

* add GenerateCustomIdString method to interaction service

* add inline docs to componentparameterbuilder

* add inline docs to GenerateCustomIdStringAsync method
2022-03-09 16:10:00 -04:00
Discord-NET-Robot
cc6918d157 Add 10065 Error code (#2178)
Co-authored-by: Discord.Net Robot <robot@elons.sweatshop.stop>
2022-03-09 16:02:08 -04:00
Brendan McShane
a5d3add1d6 Fix error with flag params. (#2165) 2022-03-03 17:20:34 -04:00
KeylAmi
48bc723f9e Update bugreport.yml (#2159)
* Update bugreport.yml

* Update bugreport.yml

removed d.net reference. fixed spelling.

* Update bugreport.yml

Adjusted verbiage for clarity
2022-03-03 17:20:02 -04:00
Armano den Boef
7262990654 Resolve complex param sample reference (#2166) 2022-03-03 17:19:25 -04:00
MrCakeSlayer
1ba96d6fbd Add configuration toggle to suppress Unknown dispatch warnings (#2162) 2022-03-02 21:30:17 -04:00
Quin Lynch
50d0000e26 meta: 3.4.0 2022-03-02 20:13:58 -04:00
Cenk Ergen
5522bc443d Create Complex Params Docs (#2160)
* create complex params docs

* Update docs/guides/int_framework/intro.md

Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>
2022-03-02 20:02:12 -04:00
Quin Lynch
36d6ce9ec8 Unneeded build event (#2158)
Build() at the end of the command creation isn't needed. The build is done on line 34.

Co-authored-by: Cookiezzz <Cookiezzz@users.noreply.github.com>
2022-03-02 19:24:10 -04:00
Quin Lynch
507a18d389 Enforce valid button styles (#2157)
Co-authored-by: CottageDwellingCat <80918250+CottageDwellingCat@users.noreply.github.com>
2022-03-02 19:24:00 -04:00
Quin Lynch
c80067425a Display name support for enum type converter (#2156)
* Display name support for enum type converter

* allow display attribute on enum type converter

* update docs/examples to include enum Display sample

* Revert "allow display attribute on enum type converter"

This reverts commit a0eec5b7555d366f9de7421f6fcf6bc71f2a4557.

* adds ChoiceDisplay for enum type converters

* Update EnumChoiceAttribute.cs

* fix renamed folder issue

* fix namespace

Co-authored-by: Xeno <eliotd@gmail.com>
2022-03-02 19:23:51 -04:00
Quin Lynch
9ba64f62d1 Interaction Service Complex Parameters (#2155)
* Interaction Service Complex Parameters

* add complex parameters

* add complex parameters

* fix build errors

* add argument parsing

* add nested complex parameter checks

* add inline docs

* add preferred constructor declaration

* fix autocompletehandlers for complex parameters

* make GetConstructor private

* use flattened params in ToProps method

* make DiscordType of SlashParameter nullable

* add docs to Flattened parameters collection and move the GetComplexParameterCtor method

* add inline docs to SlashCommandParameterBuilder.ComplexParameterFields

* add check for validating required/optinal parameter order

* implement change requests

* return internal ParseResult as ExecuteResult

Co-Authored-By: Cenk Ergen <57065323+Cenngo@users.noreply.github.com>

* fix merge errors

Co-authored-by: Cenk Ergen <57065323+Cenngo@users.noreply.github.com>
2022-03-02 19:23:39 -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
Discord-NET-Robot
202554fdde [Robot] Add missing json error (#2152)
* Add 30046, 40004, 40060, 50068, 50086 Error codes

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

Co-authored-by: Discord.Net Robot <robot@elons.sweatshop.stop>
Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>
2022-03-02 18:31:52 -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
Cenk Ergen
3e52fab67b Add return statement to precondition handling (#2062) 2022-03-02 16:25:06 -04:00
Armano den Boef
a13dce2550 FAQ rework, replacing outdated info, better interaction FAQ (#2106)
* FAQ rework, replacing outdated info, better interaction faq

* Update docs/faq/basics/getting-started.md

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

* Update docs/faq/basics/getting-started.md

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

* Update docs/faq/int_framework/general.md

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

* fix TOC reference

Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>
Co-authored-by: Quin Lynch <lynchquin@gmail.com>
2022-03-02 16:24:34 -04:00
Ilay Nahman
b7f6db96ef Fix docs typos (#2119)
Changed frist to first and dont to don't
2022-03-02 15:09:57 -04:00
Duke
1fc07e742f Guides for Serilog and EFCore (#2134)
* Add serilog guide

* added suggestions from Rozen

* Add efcore guide

* Fix review changes

* Fix grammatical errors & review points
2022-03-02 15:08:51 -04:00
Almighty-Shogun
7d8911bfed Fixed documentation typo's (#2127)
* Fixed typo at line 39

On this code example for the documentation there was a typo on the README.md file at line 39. There was an `;` where there should not be one.

The code that had the typo:

```cs
var tb = new TextInputBuilder()
    .WithLabel("Labeled")
    .WithCustomId("text_input")
    .WithStyle(TextInputStyle.Paragraph)
    .WithMinLength(6); // This ";" does not belong here.
    .WithMaxLength(42)
    .WithRequired(true)
    .WithPlaceholder("Consider this place held.");
```

* Changed `ExecuteAsync` to `ExecuteCommandAsync`

`_interactionService.ExecuteAsync(ctx, serviceProvider);` cannot be executed because the method `ExecuteAsync` does not exists.

* Changed `componBuild()` to `components.Build()`
2022-03-02 15:07:15 -04:00
d4n
f601e9bc34 Fix context menu comand message type (#2128) 2022-03-02 15:06:29 -04:00
CottageDwellingCat
b95b94231c Fix NRE when ratelimmited requests don't return a body (#2135) 2022-03-02 15:03:10 -04:00
sabihoshi
553055b724 feat: Add FromDateTimeOffset in TimestampTag (#2146) 2022-03-02 14:46:51 -04:00
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