Commit Graph

3664 Commits

Author SHA1 Message Date
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
Ben Reilly
69cce5baf2 [Fix] Enforce rate limits on 429s (#2642)
* Reduce available requests to zero on 429

* Update remaining requests when available

* Fix typo

* Use -1 for unlimited

* Update rate limit once per request
2023-04-15 01:06:47 +02:00
Christopher Bonnell
23e27e0b49 [Fix] Interaction Framework Choice mistake (#2660) 2023-04-15 01:05:29 +02:00
Misha133
98f974d0bb [Feature] 25MiB file upload size limit (#2663) 2023-04-15 01:05:04 +02:00
Misha133
f171684af1 [Feature] Voice messages support (#2665) 2023-04-15 01:04:41 +02:00
Cenk Ergen
fe9657a0ee replace duplicate InvokeAndReturn wit return statement (#2662) 2023-04-12 08:14:10 +02:00
Florian Pabst
75ae48830e Update EnumConverter and ApplicationCommandOption to register localizations (#2651) 2023-04-02 22:03:05 +02:00
Discord-NET-Robot
a8ae1e9b9f [Robot] Add missing json error (#2601)
* Add 30056, 50091, 50144, 50145 Error codes

* Apply suggestions from code review

Co-authored-by: Misha133 <61027276+Misha-133@users.noreply.github.com>

---------

Co-authored-by: Discord.Net Robot <robot@elons.sweatshop.stop>
Co-authored-by: Casmir <68127614+csmir@users.noreply.github.com>
Co-authored-by: Misha133 <61027276+Misha-133@users.noreply.github.com>
2023-03-31 13:54:03 +02:00
Misha133
9ef5a768e0 [Feature] Get current bot application information (#2619)
* initial commit

* Add support for modifying current bot's app
2023-03-31 13:36:26 +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
Misha133
c950106fed [Fix] Allow creating stickers with no description (#2628)
* fix `CreateStickerAsync` methods

* Update src/Discord.Net.Rest/Entities/Guilds/GuildHelper.cs

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

* fix some parameter names in precontion checks

---------

Co-authored-by: Dmitry <dimson-n@users.noreply.github.com>
2023-03-31 13:24:55 +02:00
Misha133
f9c8530a89 [Feature] Default thread ratelimit in guild text channels (#2622)
* initial commit

* mocked bruh
2023-03-31 13:22:00 +02:00
Alexander Elo
529fe3d969 Support filtering audit log entries by after id (#2620)
Adds support for filtering audit log entires with GetAuditLogsAsync. Adds the ability to specify an afterId as specified on [Discord developers docs](https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log).
2023-03-31 13:21:27 +02:00
Collin Herber
4b4b6078b3 Update intro.md (#2623) 2023-03-31 13:19:38 +02:00
Ge
8ccc163fcd Missing DebuggerDisplay attribute or property (#2630) 2023-03-31 13:19:09 +02:00
Misha133
6265dd5bf6 [Fix] Update permissions & fix ChannelPermissions.All() exception (#2647)
* update permissions

* update tests & bruh moment

* apply suggestions from review

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

* fix comments

---------

Co-authored-by: Dmitry <dimson-n@users.noreply.github.com>
2023-03-31 13:18:42 +02:00
Misha133
0720049648 [Feature] Create forum channels with default layout (#2646) 2023-03-31 13:15:44 +02:00
Misha133
83dfa0cea5 [Feature] Add Message property and UpdateAsync() to IModalInteraction (#2645)
* initial commit

* better (?) comments

* whoops, accidentally commited this
2023-03-31 13:15:19 +02:00
Misha133
bdd755b8cf [Feature] Add MaxStageVideoChannelUsers property to IGuild (#2648) 2023-03-31 13:14:24 +02:00
Misha133
2112e1f5b6 [Feature] New discord features (#2649) 2023-03-31 13:13:58 +02:00
Quin Lynch
9ccd9cf75b meta: 3.10.0 (#2639) 2023-03-27 10:07:25 +00:00
Kuba_Z2
66e6329b9d Update ip discovery to send 74 bytes (#2617) 2023-03-02 19:19:10 +00:00
Misha133
abfa8d1751 Missing invite properties (#2615) 2023-02-27 14:06:58 +01:00
Misha133
76bb9018c4 [Feature] Text-In-Stage support & missing IVoiceChannel properties (#2610)
* initial commit

* add a check for voice/stage channels in `PinAsync`

* moar refactoring

* Update IStageChannel.cs

* forgot about mocked. again.
2023-02-26 20:55:23 +01:00
Misha133
e69e27aa44 Create forum posts with DiscordWebhookClient (#2603) 2023-02-26 20:49:46 +01:00
Ge
ee617d8ef3 Fix typos in comments and documentation (#2608)
* Fix typos in comments and documentations

* Fixes more typo
2023-02-26 20:49:16 +01:00
Misha133
709364aaef AutoMod custom block message (#2613) 2023-02-26 20:47:13 +01:00
Misha133
11481a159e Optimize Add/RemoveRolesAsync methods (#2614) 2023-02-26 20:46:31 +01:00
Misha133
7b321afa4f Fix automod action executed event message being null (#2606) 2023-02-19 20:49:58 +00:00
Misha133
177df2ce70 [Feature] Modify guild features (#2605)
* initial commit

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

---------

Co-authored-by: Casmir <68127614+csmir@users.noreply.github.com>
2023-02-19 21:41:14 +01:00
Misha133
50c3974aca Add new error codes (#2604) 2023-02-19 21:06:27 +01:00
Misha133
673b02dd36 [Feature] AutoMod support (#2578)
* initial implementation

* update models

* somewhat working auto mod action executed event

* made some properties optional

* comments, rest entity, guild methods

* add placeholder methods

* started working on rule cache

* working events

* started working on rule builder

* working state

* fix null issue

* commentsssss

* public automod rules collection in a socketgulild

* forgot nullability

* update limits

* add Download func to cacheable user

* Apply suggestions from code review

* Update src/Discord.Net.Rest/DiscordRestApiClient.cs

* missing xml doc

* reworkkkk

* fix the `;` lol

---------

Co-authored-by: Quin Lynch <lynchquin@gmail.com>
Co-authored-by: Casmir <68127614+csmir@users.noreply.github.com>
2023-02-16 17:08:47 +01:00
Casmir
0c27395efd Fix gateway deadlock (#2600)
Co-authored-by: Quin Lynch <lynchquin@gmail.com>
2023-02-14 21:44:54 +00:00
Dedmen Miller
50e0e5941a Add ModalBuilder.AddModalCommand with option to specify callback (#2599)
Fixes: #2597
2023-02-14 22:31:50 +01:00
NaN
257f246d1d Format the project with 'dotnet format' (#2551)
* Sync and Re-Format

* Fix Title string.

* Fix indentation.
2023-02-13 18:45:59 +01:00
Jan
71e9ecb21e Fix example of documentation (#2594) 2023-02-09 21:59:17 +00:00
dependabot[bot]
6ef52f1dd8 build(deps): bump Newtonsoft.Json in /src/Discord.Net.Core (#2527)
Bumps [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) from 13.0.1 to 13.0.2.
- [Release notes](https://github.com/JamesNK/Newtonsoft.Json/releases)
- [Commits](https://github.com/JamesNK/Newtonsoft.Json/compare/13.0.1...13.0.2)

---
updated-dependencies:
- dependency-name: Newtonsoft.Json
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-09 17:10:27 +01:00
Misha133
bb056dfec0 [Feature] Follow news channels (#2590)
* initial commit

* Apply suggestions from code review

---------

Co-authored-by: Casmir <68127614+csmir@users.noreply.github.com>
2023-02-09 16:45:04 +01:00
Misha133
2ea8af1dde [Feature] Add support for silent mentions & add missing message flag (#2591)
* initial commit

* typo
2023-02-09 16:39:43 +01:00
Christopher Bonnell
274be5df9e Fix permissions on deleteMissing=false (#2532) 2023-02-09 16:36:17 +01:00
Misha133
b085621ca6 [Feature] Thread user member & thread members pagination (#2580)
* initial commit

* return & update old method

* mark old method as obsolete
2023-02-09 12:37:26 +01:00
Misha133
75f3c91f9a IIntegrationChannel & create webhooks in forums (#2582) 2023-02-09 12:36:35 +01:00
Casmir
59c2008eaa Doc patch (#2587) 2023-02-07 13:44:44 +00:00
Misha133
0998285f83 [Feature] Rework Thread property of a message (#2579)
* move `Thread` property to `IUserMessage` & add one to `SocketUserMessage`

* get channel from cache instead of creating new object

* move the property back to IMessage
2023-02-06 18:35:09 +01:00
Misha133
e3da96fbf5 [Feature] Expose GetCurrentUser method & missing current user API methods (#2574)
* add stuff

* forgot to push

* docs

* Update DiscordRestClient.cs

* Apply suggestions from code review

* Update toc.yml

---------

Co-authored-by: Casmir <68127614+csmir@users.noreply.github.com>
2023-02-06 17:20:54 +01:00
Cenk Ergen
2616d350ba [Feature] App Command Perms Channel Target (#2560)
* Implement channel ApplicationCommandPermissionTarget

* implement channel target in ApplicationCommandPermission and add static methods for targeting @everyone and all channels
2023-02-06 13:28:42 +01:00
Cenk Ergen
1602437c31 Update customId template generator to escape regex metachars used in … (#2557)
* update customId template generator to escape regex metachars used in template literals

* add clarification to TreatAsRegex prop documentation.

* Implement channel ApplicationCommandPermissionTarge

* implement channel target in ApplicationCommandPermission and add static methods for targeting @everyone and all channels

* Revert "add clarification to TreatAsRegex prop documentation."

This reverts commit 6eab5878a7ddff4e949a90d446f2e3dfe2e9c506.

* fix oopsie
2023-02-06 13:27:42 +01:00
Chos5555
23b282299c Added emojis from Emoji 13.0, Emoji 13.1 and Emoji 14.0 (#2523) 2023-02-06 13:27:07 +01:00