Commit Graph

673 Commits

Author SHA1 Message Date
Богдан Петренко
1a16f4d271 [Fix] Receiving voice packets (use system-assigned port) (#2857)
* Voice receive fix (use system-selected port)

* Update SocketGuild.cs

---------

Co-authored-by: Misha133 <mihagribkov133@gmail.com>
2024-02-23 22:17:07 +00:00
Mihail Gribkov
9a7bd05c28 [CI] New build action + Build framework on linux (#2848)
* Create dotnet.yml

* Update dotnet.yml

* Update dotnet.yml

* Update dotnet.yml

* pragma disable some obsolete warnings

* Update dotnet.yml

* Update dotnet.yml

* Update dotnet.yml

* update vars for windows

* cache? dotnet

* oops forgot to save

* add concurrency

* test deploy

* fix?

* disable caching

* Update dotnet.yml

* Update dotnet.yml

* Update dotnet.yml

* ...

* Update dotnet.yml

* it should build now. maybe. probably

* huh?

* huh x2

* disable deploy on PRs / enable cache

* publish test results

* Update dotnet.yml

* remove cache cuz it's useless

* Update dotnet.yml

* push to github packages cuz why not

* add toggle vars for pushes

* Update dotnet.yml

* uncomment release since there's a toggle now
2024-02-23 23:31:04 +03:00
Mihail Gribkov
ee386b1a15 Allow setting custom status with SetGameAsync (#2858) 2024-02-22 21:02:57 +00:00
FluffyDoggo
6256de42bc Refactor MaxBitrate and UploadLimit in GuildHelper (#2854) 2024-02-19 11:59:14 +03:00
Mihail Gribkov
1eb7a53f78 [Fix] NRE in automod audit logs (#2850)
* fix nre

* no breakings :(
2024-02-15 20:29:33 +03:00
Mihail Gribkov
f1777de164 Allow creating announcement channels (#2837) 2024-02-11 23:48:40 +03:00
Nora
dc8e0e329d Get docs working on latest docfx version. (#2778)
* [Docs] Get docs working on latest docfx version.

Removed light-dark-theme as it didn't work with modern docfx, and Material provides the features it provided anyways.

Gotta figure out how to get the description generator and "last modified" plugins to work.

* [Docs] Get docs working on latest docfx version.

Removed light-dark-theme as it didn't work with modern docfx, and Material provides the features it provided anyways.

Gotta figure out how to get the description generator and "last modified" plugins to work.

* [Docs] Re-add search index extractor.

* [Docs] Use material theme and override derived tree style.

Also adds a tiny GitHub icon on the navbar.

* [Docs] Exclude DebugTools project.

* [Docs] Use better method for overriding things.

Totally not because DocFX won't allow me to have an override template.

* [Docs] Improve styling overrides.

* [Docs] Fix links in FAQs and guides.

* [Docs] Use new xref service.

The old xref service is being deprecated by the end of the year.
See https://github.com/dotnet/docfx/issues/8958

* [Docs] Replace (c) with proper copyright symbol.

* [Docs] Fix formatting in docfx.json file.

Thanks, VSCode.

* [Docs] Remove non-working post processors.

They don't work, and *personally* I feel like they're unnecessary considering you can check the last modification date in the (linked) GitHub page. I honestly have no idea what the other post processor does and honestly the code doesn't help much either.

* [Docs] Fix "in this article" being too thin.

Fixes https://github.com/discord-net/Discord.Net/pull/2778#issuecomment-1748812077

* [Docs] Get examples working again.

* [Docs] Make properties be separated more clearly.

* [Docs] Change docs index to reflect the new nightly MyGet feed.

* [Docs] Get docs working on latest docfx version.

Removed light-dark-theme as it didn't work with modern docfx, and Material provides the features it provided anyways.

Gotta figure out how to get the description generator and "last modified" plugins to work.

* [Docs] Get docs working on latest docfx version.

Removed light-dark-theme as it didn't work with modern docfx, and Material provides the features it provided anyways.

Gotta figure out how to get the description generator and "last modified" plugins to work.

* [Docs] Re-add search index extractor.

* [Docs] Use material theme and override derived tree style.

Also adds a tiny GitHub icon on the navbar.

* [Docs] Exclude DebugTools project.

* [Docs] Use better method for overriding things.

Totally not because DocFX won't allow me to have an override template.

* [Docs] Improve styling overrides.

* [Docs] Fix links in FAQs and guides.

* [Docs] Use new xref service.

The old xref service is being deprecated by the end of the year.
See https://github.com/dotnet/docfx/issues/8958

* [Docs] Replace (c) with proper copyright symbol.

* [Docs] Fix formatting in docfx.json file.

Thanks, VSCode.

* [Docs] Remove non-working post processors.

They don't work, and *personally* I feel like they're unnecessary considering you can check the last modification date in the (linked) GitHub page. I honestly have no idea what the other post processor does and honestly the code doesn't help much either.

* [Docs] Fix "in this article" being too thin.

Fixes https://github.com/discord-net/Discord.Net/pull/2778#issuecomment-1748812077

* [Docs] Get examples working again.

* [Docs] Make properties be separated more clearly.

* [Docs] Change docs index to reflect the new nightly MyGet feed.

* [Docs] Fix index image not switching when changing themes.

Co-Authored-By: exsersewo <25526843+exsersewo@users.noreply.github.com>

* add updated description generator postprocessor

* update postprocessor

* got it working

* downgrade postprocessor docfx

* [Docs] Add left margin to side navigation links.

* remove dup docs cuz `<inheritdoc />`

---------

Co-authored-by: exsersewo <25526843+exsersewo@users.noreply.github.com>
Co-authored-by: Misha133 <mihagribkov133@gmail.com>
Co-authored-by: Mihail Gribkov <61027276+Misha-133@users.noreply.github.com>
2024-02-11 18:51:10 +00:00
Mihail Gribkov
138e18cb7a [Fix] GetEventCoverImageUrl throwing NRE in case event cover image is null (#2818)
* return null instead of throwing NRE

* fix xmldoc
2024-01-11 22:29:07 +03:00
Mihail Gribkov
8227d70b86 fix exception not being logged (#2800) 2023-12-26 14:08:52 +03:00
Mihail Gribkov
de4b6b9f27 [Fix] Incorrect json model for Guild Scheduled Event (#2813)
* fix some cringe

* whoooooooops
2023-12-26 10:34:10 +03:00
Mihail Gribkov
d382e5cd48 [Feature] Audit log integration type (#2814)
* why do I do this instead of preparing for an exam

* oh yeah nullable ofc

* oh yeah
2023-12-26 01:34:25 +03:00
Dmitry
86655a8157 [Refactor] Remove some unnecessary async/await (#2739)
* Remove some unnecessary async/await

* More not-so-async stuff

* More not-so-async stuff

* Fix merge issue
2023-11-18 21:29:14 +00:00
Mihail Gribkov
699554ad11 [Features] Automod member profile moderation, new application fields, use clyde ai & guild invenory settings (#2791)
* guild inventory settings

* `UseClydeAI` (1L << 47) permission

* automod member profile moderation

* Dnet: The Enums update (new application fields)

* ah yeah, `IApplication`

* some oversights

* y did I change this

* oh bruh nvm

* `CreateGuildExpressions` permission

---------

Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>
2023-11-18 21:15:20 +00:00
Mihail Gribkov
89bebc361a poggers (#2796) 2023-11-18 16:08:51 -05:00
Mihail Gribkov
9fd5c6c27e [Feature] Super reactions support (#2707)
* super reactions

* add type to `GetReactionUsers` methods

* add `MeBurst`
2023-11-18 15:57:11 -05:00
Mihail Gribkov
e3cd340dcc [Feature] Media channel support (#2725)
* initial commit

* oops

* another typo -_-

* Update AttachmentFlags.cs

Made this on my phone lol

* Update AttachmentFlags.cs

* -line

* initial impl

* some guild methods for media (and forum) channels

* file attachment can be a thumbnail

* can't edit media channel layout

* updatess

* Update ChannelPermissions.cs

* typo
2023-11-18 15:56:14 -05:00
José Santos Garrido
9cedfbcdd9 Use Discord heartbeat interval in audio. (#2765)
Reduce heartbeat interval to ensure Discord receives it within range.
Refactor some AudioClient code.

Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>
2023-11-18 20:52:48 +00:00
Mihail Gribkov
5cfec056cb Fix SocketKickAuditLogData User never having value (#2763) 2023-11-18 15:50:35 -05:00
zobweyt
b1787d8334 [Refactor] Extract GetDisplayAvatarUrl in IUser (#2771)
* Implement `GetDisplayAvatarUrl` method

* Remove obsolete example

* Update XML documentation

---------

Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>
2023-11-18 20:50:17 +00:00
Mihail Gribkov
ac274d4b76 [Feature] Select menu default values (#2776)
* initial commit

* docs & readonly
2023-11-18 15:44:16 -05:00
Mihail Gribkov
8060dcf4ae [Feature] Voice channel status support (#2777)
* initial commit

* MOCKED CHANNELS AGRHHHHHHHH

* fix for sharded

* yup
2023-11-18 15:42:14 -05:00
Mihail Gribkov
8e4d449615 Remove checks from UpdateAsync methods (#2790) 2023-11-18 15:38:46 -05:00
Mihail Gribkov
f64d9d6f22 [Feature] Avatar decorations support (#2782)
* yup

* nullable...

* add props & methos to `GuildUser` & `IUser`
2023-11-18 15:38:36 -05:00
Mihail Gribkov
b45b7743a5 create roles with icons (#2792) 2023-11-18 15:35:51 -05:00
Mihail Gribkov
9b36df3c55 [Feature] Guild incident actions (#2783)
* initial commit

* <see langword="null"/> notes
2023-11-02 02:18:29 -04:00
zobweyt
4e78aec2d0 [Fix] Add missing parameters to RespondWithModalAsync methods and implement missing overloads (#2769)
* Added missing modifyModal parameters to RespondWithModalAsync methods

* Fix typo

* Remove unnecessary parts

* Add missing `options` parameter

* Add missing overload

* Use `.Invoke` with `null` check to simplify

* Remove code duplication

* Remove code duplication

* Add missing payload to `RestInteractionModuleBase`
2023-10-18 00:31:56 +03:00
Mihail Gribkov
a9a8da4d77 [Feature] App subscriptions №2 (#2784)
* what a big commit lel, add app sub enums

* work

* ah yup lol

* `?`

* events 1

* typo

* `list` => `get` | remaining events

* add `RespondWithPremiumRequiredAsync` to interaction module base

* sharded client fixes for app premium subs
2023-09-30 12:46:15 -04:00
Mihail Gribkov
7723f61072 [Feature] Premium subscriptions (#2781)
* what a big commit lel, add app sub enums

* work

* ah yup lol

* `?`

* events 1

* typo

* `list` => `get` | remaining events

* add `RespondWithPremiumRequiredAsync` to interaction module base
2023-09-30 09:39:28 -04:00
FluffyDoggo
8baf913c9d [Fix] Some IDiscordClient methods are not properly implemented in clients (#2774)
* Add proper implementations of CreateGlobalApplicationCommand and BulkOverwriteGlobalApplicationCommand

* Update all shards
2023-09-15 08:46:51 +03:00
Mike
a668757669 Fix UpdateAsync Remove Attachment Bug (#2766)
* Similar to PR #2742 but this now fixes the UpdateAsync attachments bug.

* Update functions.

* `Update` => `UpdateAsync`

---------

Co-authored-by: Misha133 <mihagribkov133@gmail.com>
2023-09-02 20:18:35 +03:00
Declan Messer
ae275ab3a7 [Fix] Additional Update/Modify Async Attachment's (#2753) 2023-08-21 23:27:23 +03:00
BokuNoPasya
5fb9152db3 [Feature] Add missing remove property to MemberRoleAudit (#2675)
* Adding the missing remove property to MemberRoleAudit

* fix

* Update src/Discord.Net.WebSocket/Entities/AuditLogs/DataTypes/SocketMemberRoleEditInfo.cs

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

* Update src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/MemberRoleEditInfo.cs

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

---------

Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>
2023-08-10 16:34:40 +03:00
José Santos Garrido
c92249702b [Fix] GetMessagesAsync with Direction.After not working as expected #2744 (#2745)
* Fixed GetMessagesAsync with Direction.After issue #2744

* Fixed GetMessagesAsync with Direction.After issue #2744
2023-08-10 16:33:56 +03:00
Misha133
6bb3777bf9 [Fix] Disconnecting socket client does not send close code (#2714)
* fix?

* whoops, debugging stuff
2023-08-10 16:19:10 +03:00
Frederik P
59094d2e1f Added a method for sending silent audio frames on OpusEncodeStream (#2668)
* Implemented ClientDisconnect event for audio client.

* Added a method for sending silent frames.

* moved comment

* Added method summary.
+ removed changes to project file.

* Removed residual stuff remaining from previous edits.

* bunch of things

* Revert "bunch of things"

This reverts commit 292f23f4e1aabb26d2a3e5b9a2bdff8b5554635e.

* Update src/Discord.Net.WebSocket/Audio/Streams/OpusEncodeStream.cs

* Update src/Discord.Net.WebSocket/Audio/Streams/OpusEncodeStream.cs

* Update src/Discord.Net.WebSocket/Audio/Streams/OpusEncodeStream.cs

---------

Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>
2023-08-10 15:15:56 +02:00
Misha133
a4217154f0 [Feature] Add Role & Attachment flags (#2720)
* initial commit

* oops

* another typo -_-

* Update AttachmentFlags.cs

Made this on my phone lol

* Update AttachmentFlags.cs

* -line
2023-08-10 16:08:42 +03:00
Misha133
8cd4c1cb8e Onboarding updates (#2729) 2023-08-10 16:05:03 +03:00
Misha133
9dfd4d7a41 [Fix] Updated global name not being passed to UserUpdated event (#2726)
* fix

* fix another overgisht
2023-08-10 15:41:40 +03:00
Misha133
5f580f6f1e [Fix] Update modal's DeferAsync impl (#2722)
* initial commit

* updates
2023-08-10 15:40:54 +03:00
Misha133
b2820d5b65 [Feature] Support for setting custom status (#2749) 2023-08-10 15:32:23 +03:00
Misha133
547bc92537 FIX] Update TypingStartedEvent model (#2702) 2023-06-27 11:13:01 -03:00
Misha133
df717e6b2c [Feature] Support for the new username system (#2696)
* update a lot of stuff

* update CDN for new avatar calculation

* whoops, forgot to commit

* handle `null` values

* Remove duplicate line

Co-authored-by: Dmitry <dimson-n@users.noreply.github.com>

* updates

* Apply suggestions from code review

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

* Apply suggestion

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

* update `SocketThreadUSer`

---------

Co-authored-by: Dmitry <dimson-n@users.noreply.github.com>
Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>
2023-06-27 11:11:32 -03:00
Misha133
9ddd922d2f [Refactor] Refactor some stuff (#2688)
* fix some `internal` classes being exposed

* update xmldoc comments to use `<see langword>`

* bump library version in samples

* fix possible oversight
2023-06-27 11:11:16 -03:00
Misha133
fe4130df45 [Fix] Threads not getting removed from cache on THREAD_DELETE (#2708) 2023-06-27 11:08:18 -03:00
Kuba_Z2
2be9b00e72 Disable FEC (#2670)
* Remove incorrect usage of FEC

* Return instead of await
2023-04-18 18:12:05 +02:00
Misha133
d5ba7d25aa initial commit (#2666) 2023-04-15 03:36:07 +02:00
Misha133
dff6a57a92 [Feature] Audit Log Created gateway event support (#2627)
* add event to socket client

* make `AuditLog` param optional

* Some WIP audit log changes

* api models

* moar models

* complete models

* modelsss

* forgot to push

* oh lol forgot this too

* api & rest guild method

* revert VS being VS & formatting to file scoped namespace

* socket entities

* some work eh

* moar stuff

- switched to d.net's attribute for audit log deserialization

* working socket guild updated event + reworked rest GuildInfo creation

* a bit of refactoring + new models

* +channel created

* channel updated & channel deleted

* refactor rest channel updated log + some nullable fixes

* rest channel created + deleted logs

* user banned socket log

* kick + unban

* moar log modelsssss

* fixes & 4 more log types

* overwrite logs

* role logs

* invite logs

* webhook logs

* switch to `ISocketAuditLogData` for socket log data

* emote logs

* move stuff around

* move more stuff around

* audit logs cache

* scheduled event logs

* thread logs

* command permission update audit log

* fetch scheduled event data from log

* integration audit logs

* sticker audit log data

* stage instance audit logs

* auto mod rule audit logs

* fix

* forgot couple props

* command perm updated data from options

* final automod ones

* debugging goes away :(

* merge cringe

* ...

* yup

* fix xml doc

* onboarding audit logs

* changes

---------

Co-authored-by: cat <lumitydev@gmail.com>
2023-04-15 01:13:02 +02:00
Misha133
3a8f76c4b1 [Feature] Guild Onboarding support (#2616)
* api models

* moar models

* complete models

* modelsss

* forgot to push

* oh lol forgot this too

* api & rest guild method

* revert VS being VS & formatting to file scoped namespace

* socket entities

* yup

* fix xml doc

* changes
2023-04-15 01:08:30 +02:00
Ben Reilly
84431decfd [Fix] Don't dispose streams in DefaultRestClient (#2652)
* Duplicate file streams before sending

* Other code needs to dispose their objects

* Another resource to dispose

* Stop disposing and copying streams in SendAsync

* Fix inverted boolean check

Co-authored-by: Dmitry <dimson-n@users.noreply.github.com>

* Await results for using statement to work

---------

Co-authored-by: Dmitry <dimson-n@users.noreply.github.com>
2023-04-15 01:07:12 +02:00
Misha133
898ee56557 [Feature] Refactor SendMessageAsync & SendFile(s)Async methods & modify webhook message attachments (#2609)
* initial commit

* resolve merge conficts

* code review suggestions
2023-03-31 13:26:09 +02:00