diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index d858f382c5..723b0f9576 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"docfx": {
- "version": "2.62.2",
+ "version": "2.76.0",
"commands": [
"docfx"
]
diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml
index 3d1935b7a8..44296f3d9f 100644
--- a/.github/ISSUE_TEMPLATE/bug-report.yml
+++ b/.github/ISSUE_TEMPLATE/bug-report.yml
@@ -1,12 +1,11 @@
# Based on an issue template from the Discord API documentation.
name: Bug Report
description: A bug has been found in the library
-title: "[Bug]: "
labels: ["bug"]
body:
- type: markdown
attributes:
- value: "Before opening a new issue, please search existing issues: https://github.com/Nihlus/Remora.Discord/issues"
+ value: "Before opening a new issue, please search existing issues: https://github.com/Remora/Remora.Discord/issues?q=is%3Aissue+label%3Abug"
- type: textarea
id: description
attributes:
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index ee82f665bb..b3df0ad525 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1,8 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Developer Documentation
- url: https://nihlus.github.io/Remora.Discord/
- about: Need documentation and examples for the API? Head over to Discord's developer documentation.
+ url: https://remora.github.io/Remora.Discord/main/articles/intro.html
+ about: Need documentation and examples for the API? Head over to Remora.Discord's documentation.
- name: Discord Server
url: https://discord.gg/dyYmwashVs
about: Need help with the library? Talk to us in our Discord server.
diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml
index bc6335999e..c540f66765 100644
--- a/.github/ISSUE_TEMPLATE/feature-request.yml
+++ b/.github/ISSUE_TEMPLATE/feature-request.yml
@@ -1,11 +1,11 @@
# Based on an issue template from the Discord API documentation.
name: Feature Request
description: Suggestions for new or different behavior in the library
-labels: ["feature request"]
+labels: ["enhancement"]
body:
- type: markdown
attributes:
- value: "Before opening a new issue, please search existing issues: https://github.com/Nihlus/Remora.Discord/issues"
+ value: "Before opening a new issue, please search existing issues: https://github.com/Remora/Remora.Discord/issues?q=is%3Aissue+label%3Aenhancement"
- type: textarea
id: description
attributes:
@@ -33,4 +33,4 @@ body:
label: Additional Details
description: Is there anything else you can add about this feature request?
validations:
- required: false
\ No newline at end of file
+ required: false
diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml
index 3294a7bd1f..828cce07fa 100644
--- a/.github/workflows/dotnet.yml
+++ b/.github/workflows/dotnet.yml
@@ -18,47 +18,59 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
- with:
- submodules: recursive
-
- - uses: actions/setup-dotnet@v2
- with:
- dotnet-version: |
- 6.0.x
- 7.0.x
-
- - name: Build
- run: |
- dotnet restore
- dotnet build -c Release --no-restore
-
- - name: Test
- run: dotnet test -c Release --no-restore --no-build --verbosity minimal
-
- - name: Package
- if: github.ref == 'refs/heads/main' && github.event_name == 'push'
- run: dotnet pack -c Release --no-restore --no-build --version-suffix "github$GITHUB_RUN_ID"
-
- - uses: actions/upload-artifact@v3
- if: github.ref == 'refs/heads/main' && github.event_name == 'push'
- with:
- name: nupkg
- path: nuget/*
-
- - name: Build Docs
- if: github.event_name == 'push'
- run: |
- dotnet tool restore
- cd ./docfx
- sed -i -E "s/%APP_VERSION%/${GITHUB_REF_NAME}/" docfx_project/docfx.json
- dotnet docfx docfx_project/docfx.json
-
- - uses: actions/upload-artifact@v3
- if: github.event_name == 'push'
- with:
- name: docfx-site
- path: docfx/docfx_project/_site/
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: |
+ 6.0.x
+ 7.0.x
+ 8.0.x
+
+ - name: Build
+ run: |
+ dotnet restore
+ dotnet build -c Release --no-restore
+
+ - name: Test
+ run: dotnet test -c Release --no-restore --no-build --verbosity minimal
+
+ - name: Inspect
+ uses: JetBrains/ReSharper-InspectCode@v0.3
+ with:
+ tool-version: 2023.3.4
+ solution: Remora.Discord.sln
+ build: false
+ no-build: true
+ telemetry-optout: true
+
+ - name: Package
+ if: github.ref == 'refs/heads/main' && github.event_name == 'push'
+ run: dotnet pack -c Release --no-restore --no-build --version-suffix "github$GITHUB_RUN_ID"
+
+ - uses: actions/upload-artifact@v4
+ with:
+ name: nupkg
+ path: nuget/*
+
+ - name: Build Docs
+ if: github.event_name == 'push'
+ run: |
+ dotnet tool restore
+ cd ./docfx
+ sed -i -E "s/%APP_VERSION%/${GITHUB_REF_NAME}/" docfx_project/docfx.json
+ dotnet docfx docfx_project/docfx.json
+
+ - uses: actions/upload-artifact@v4
+ if: github.event_name == 'push'
+ with:
+ name: docfx-site
+ path: docfx/docfx_project/_site/
+
+ permissions:
+ security-events: write
publish_docs:
name: Publish Documentation
@@ -71,12 +83,12 @@ jobs:
steps:
- name: Checkout triggering branch
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
path: base
- name: Checkout gh-pages
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
ref: gh-pages
path: site
@@ -85,7 +97,7 @@ jobs:
run: bash base/docfx/scripts/prepare.sh
- name: Download documentation artifacts
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: docfx-site
path: site/${{ github.ref_name }}
@@ -107,15 +119,17 @@ jobs:
steps:
- name: Download package artifacts
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: nupkg
path: nuget
# To ensure that the current version being pushed does not get pruned we prune first.
- name: Prune packages older than 4 versions (new version is the 5th)
- uses: smartsquaregmbh/delete-old-packages@v0.6.0
+ uses: smartsquaregmbh/delete-old-packages@v0.8.0
with:
+ organization: Remora
+ type: nuget
keep: 4
names: |
Remora.Discord
diff --git a/.idea/.idea.Remora.Discord/.idea/.gitignore b/.idea/.idea.Remora.Discord/.idea/.gitignore
index bc9371e1b5..343d51bf13 100644
--- a/.idea/.idea.Remora.Discord/.idea/.gitignore
+++ b/.idea/.idea.Remora.Discord/.idea/.gitignore
@@ -11,3 +11,5 @@
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
+# GitHub Copilot persisted chat sessions
+/copilot/chatSessions
diff --git a/.idea/.idea.Remora.Discord/.idea/deployment.xml b/.idea/.idea.Remora.Discord/.idea/deployment.xml
new file mode 100644
index 0000000000..5508f92e0a
--- /dev/null
+++ b/.idea/.idea.Remora.Discord/.idea/deployment.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.Remora.Discord/.idea/inspectionProfiles/Project_Default.xml b/.idea/.idea.Remora.Discord/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000000..5064a65063
--- /dev/null
+++ b/.idea/.idea.Remora.Discord/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Bidirectional/IHeartbeatAcknowledge.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Bidirectional/IHeartbeatAcknowledge.cs
index 928c078b7e..322d410b56 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Bidirectional/IHeartbeatAcknowledge.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Bidirectional/IHeartbeatAcknowledge.cs
@@ -30,6 +30,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Bidirectional;
/// Represents a heartbeat acknowledgement. This interface defines no data.
///
[PublicAPI]
-public interface IHeartbeatAcknowledge : IGatewayEvent, IGatewayCommand
-{
-}
+public interface IHeartbeatAcknowledge : IGatewayEvent, IGatewayCommand;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Commands/IGatewayCommand.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Commands/IGatewayCommand.cs
index e8514e77c7..bd264c7234 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Commands/IGatewayCommand.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Commands/IGatewayCommand.cs
@@ -28,6 +28,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Commands;
/// Represents a marker interface for gateway commands.
///
[PublicAPI]
-public interface IGatewayCommand : IGatewayPayloadData
-{
-}
+public interface IGatewayCommand : IGatewayPayloadData;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/ApplicationCommands/IApplicationCommandPermissionsUpdate.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/ApplicationCommands/IApplicationCommandPermissionsUpdate.cs
index 5c69e93517..0f50d375bc 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/ApplicationCommands/IApplicationCommandPermissionsUpdate.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/ApplicationCommands/IApplicationCommandPermissionsUpdate.cs
@@ -29,6 +29,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Represents an update to the permissions of a command.
///
[PublicAPI]
-public interface IApplicationCommandPermissionsUpdate : IGatewayEvent, IGuildApplicationCommandPermissions
-{
-}
+public interface IApplicationCommandPermissionsUpdate : IGatewayEvent, IGuildApplicationCommandPermissions;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/AuditLog/IGuildAuditLogEntryCreate.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/AuditLog/IGuildAuditLogEntryCreate.cs
index fefd4b9e51..7951b28a83 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/AuditLog/IGuildAuditLogEntryCreate.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/AuditLog/IGuildAuditLogEntryCreate.cs
@@ -29,6 +29,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Represents the creation of an audit log entry.
///
[PublicAPI]
-public interface IGuildAuditLogEntryCreate : IGatewayEvent, IAuditLogEntry
-{
-}
+public interface IGuildAuditLogEntryCreate : IGatewayEvent, IAuditLogEntry;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/AutoModeration/IAutoModerationRuleCreate.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/AutoModeration/IAutoModerationRuleCreate.cs
index 56b467d594..0bb3ce9859 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/AutoModeration/IAutoModerationRuleCreate.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/AutoModeration/IAutoModerationRuleCreate.cs
@@ -29,6 +29,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Represents the update of an auto moderation rule.
///
[PublicAPI]
-public interface IAutoModerationRuleCreate : IGatewayEvent, IAutoModerationRule
-{
-}
+public interface IAutoModerationRuleCreate : IGatewayEvent, IAutoModerationRule;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/AutoModeration/IAutoModerationRuleDelete.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/AutoModeration/IAutoModerationRuleDelete.cs
index c515a44404..9215ffdffc 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/AutoModeration/IAutoModerationRuleDelete.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/AutoModeration/IAutoModerationRuleDelete.cs
@@ -29,6 +29,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Represents the deletion of an auto moderation rule.
///
[PublicAPI]
-public interface IAutoModerationRuleDelete : IGatewayEvent, IAutoModerationRule
-{
-}
+public interface IAutoModerationRuleDelete : IGatewayEvent, IAutoModerationRule;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/AutoModeration/IAutoModerationRuleUpdate.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/AutoModeration/IAutoModerationRuleUpdate.cs
index 8a292eec77..1bcbf459a6 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/AutoModeration/IAutoModerationRuleUpdate.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/AutoModeration/IAutoModerationRuleUpdate.cs
@@ -29,6 +29,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Represents the creation of an auto moderation rule.
///
[PublicAPI]
-public interface IAutoModerationRuleUpdate : IGatewayEvent, IAutoModerationRule
-{
-}
+public interface IAutoModerationRuleUpdate : IGatewayEvent, IAutoModerationRule;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IChannelCreate.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IChannelCreate.cs
index c9c8959fda..66958f2317 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IChannelCreate.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IChannelCreate.cs
@@ -29,6 +29,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Represents the creation of a channel.
///
[PublicAPI]
-public interface IChannelCreate : IGatewayEvent, IChannel
-{
-}
+public interface IChannelCreate : IGatewayEvent, IChannel;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IChannelDelete.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IChannelDelete.cs
index a44066d55b..3fc46f7210 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IChannelDelete.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IChannelDelete.cs
@@ -29,6 +29,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Represents the deletion of a channel.
///
[PublicAPI]
-public interface IChannelDelete : IGatewayEvent, IChannel
-{
-}
+public interface IChannelDelete : IGatewayEvent, IChannel;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IChannelUpdate.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IChannelUpdate.cs
index 7d909f5fb4..11c54b33cc 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IChannelUpdate.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IChannelUpdate.cs
@@ -29,6 +29,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Represents the update of a channel.
///
[PublicAPI]
-public interface IChannelUpdate : IGatewayEvent, IChannel
-{
-}
+public interface IChannelUpdate : IGatewayEvent, IChannel;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IStageInstanceCreate.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IStageInstanceCreate.cs
index 671b1b9691..2956ac3fe6 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IStageInstanceCreate.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IStageInstanceCreate.cs
@@ -29,6 +29,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Represents the creation of a stage instance.
///
[PublicAPI]
-public interface IStageInstanceCreate : IStageInstance, IGatewayEvent
-{
-}
+public interface IStageInstanceCreate : IStageInstance, IGatewayEvent;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IStageInstanceDelete.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IStageInstanceDelete.cs
index 8a6454366e..f9200b5081 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IStageInstanceDelete.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IStageInstanceDelete.cs
@@ -29,6 +29,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Represents a deletion of a stage instance.
///
[PublicAPI]
-public interface IStageInstanceDelete : IStageInstance, IGatewayEvent
-{
-}
+public interface IStageInstanceDelete : IStageInstance, IGatewayEvent;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IStageInstanceUpdate.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IStageInstanceUpdate.cs
index ed8a96bb4c..82a3175c4f 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IStageInstanceUpdate.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IStageInstanceUpdate.cs
@@ -29,6 +29,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Represents an update of a stage instance.
///
[PublicAPI]
-public interface IStageInstanceUpdate : IStageInstance, IGatewayEvent
-{
-}
+public interface IStageInstanceUpdate : IStageInstance, IGatewayEvent;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IThreadDelete.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IThreadDelete.cs
index c00f577ad5..3149acea47 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IThreadDelete.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IThreadDelete.cs
@@ -29,6 +29,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Represents the creation of a channel.
///
[PublicAPI]
-public interface IThreadDelete : IGatewayEvent, IPartialChannel
-{
-}
+public interface IThreadDelete : IGatewayEvent, IPartialChannel;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IThreadUpdate.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IThreadUpdate.cs
index 4a4afd73cc..b8a490ea32 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IThreadUpdate.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Channels/IThreadUpdate.cs
@@ -29,6 +29,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Represents the creation of a channel.
///
[PublicAPI]
-public interface IThreadUpdate : IGatewayEvent, IChannel
-{
-}
+public interface IThreadUpdate : IGatewayEvent, IChannel;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/ConnectingResuming/IReconnect.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/ConnectingResuming/IReconnect.cs
index ea2f15cea9..f99c3e0877 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/ConnectingResuming/IReconnect.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/ConnectingResuming/IReconnect.cs
@@ -28,6 +28,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Represents a reconnection request. This interface defines no data.
///
[PublicAPI]
-public interface IReconnect : IGatewayEvent
-{
-}
+public interface IReconnect : IGatewayEvent;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/ConnectingResuming/IResumed.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/ConnectingResuming/IResumed.cs
index fcf3ed09f8..c6ca6183df 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/ConnectingResuming/IResumed.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/ConnectingResuming/IResumed.cs
@@ -28,6 +28,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Represents an event that marks the completion of a session resumption.
///
[PublicAPI]
-public interface IResumed : IGatewayEvent
-{
-}
+public interface IResumed : IGatewayEvent;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/GuildScheduledEvents/IGuildScheduledEventCreate.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/GuildScheduledEvents/IGuildScheduledEventCreate.cs
index bf372c27a6..b4135c1370 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/GuildScheduledEvents/IGuildScheduledEventCreate.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/GuildScheduledEvents/IGuildScheduledEventCreate.cs
@@ -29,6 +29,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Sent when a scheduled event is created.
///
[PublicAPI]
-public interface IGuildScheduledEventCreate : IGatewayEvent, IGuildScheduledEvent
-{
-}
+public interface IGuildScheduledEventCreate : IGatewayEvent, IGuildScheduledEvent;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/GuildScheduledEvents/IGuildScheduledEventDelete.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/GuildScheduledEvents/IGuildScheduledEventDelete.cs
index b06fa10a3f..3c51edf98f 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/GuildScheduledEvents/IGuildScheduledEventDelete.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/GuildScheduledEvents/IGuildScheduledEventDelete.cs
@@ -29,6 +29,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Sent when a scheduled event is deleted.
///
[PublicAPI]
-public interface IGuildScheduledEventDelete : IGatewayEvent, IGuildScheduledEvent
-{
-}
+public interface IGuildScheduledEventDelete : IGatewayEvent, IGuildScheduledEvent;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/GuildScheduledEvents/IGuildScheduledEventUpdate.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/GuildScheduledEvents/IGuildScheduledEventUpdate.cs
index d27a5385f5..1640767409 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/GuildScheduledEvents/IGuildScheduledEventUpdate.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/GuildScheduledEvents/IGuildScheduledEventUpdate.cs
@@ -29,6 +29,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Sent when a scheduled event is updated.
///
[PublicAPI]
-public interface IGuildScheduledEventUpdate : IGatewayEvent, IGuildScheduledEvent
-{
-}
+public interface IGuildScheduledEventUpdate : IGatewayEvent, IGuildScheduledEvent;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Guilds/IGuildDelete.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Guilds/IGuildDelete.cs
index 34d5083851..9962681252 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Guilds/IGuildDelete.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Guilds/IGuildDelete.cs
@@ -29,6 +29,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Represents the delete of a guild.
///
[PublicAPI]
-public interface IGuildDelete : IGatewayEvent, IUnavailableGuild
-{
-}
+public interface IGuildDelete : IGatewayEvent, IUnavailableGuild;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Guilds/IGuildUpdate.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Guilds/IGuildUpdate.cs
index d1e95e6584..1f7b0537d8 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Guilds/IGuildUpdate.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Guilds/IGuildUpdate.cs
@@ -29,6 +29,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Represents the update of a guild.
///
[PublicAPI]
-public interface IGuildUpdate : IGatewayEvent, IGuild
-{
-}
+public interface IGuildUpdate : IGatewayEvent, IGuild;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/IGatewayEvent.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/IGatewayEvent.cs
index 557e51256d..e0d8a319bf 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/IGatewayEvent.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/IGatewayEvent.cs
@@ -28,6 +28,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Acts as a marker interface for gateway events.
///
[PublicAPI]
-public interface IGatewayEvent : IGatewayPayloadData
-{
-}
+public interface IGatewayEvent : IGatewayPayloadData;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Interactions/IInteractionCreate.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Interactions/IInteractionCreate.cs
index fd51c8332d..fda0bdd0a1 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Interactions/IInteractionCreate.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Interactions/IInteractionCreate.cs
@@ -29,6 +29,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Represents a user-invoked slash command.
///
[PublicAPI]
-public interface IInteractionCreate : IInteraction, IGatewayEvent
-{
-}
+public interface IInteractionCreate : IInteraction, IGatewayEvent;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Monetization/IEntitlementCreate.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Monetization/IEntitlementCreate.cs
new file mode 100644
index 0000000000..e9656d8f8c
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Monetization/IEntitlementCreate.cs
@@ -0,0 +1,32 @@
+//
+// IEntitlementCreate.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+using JetBrains.Annotations;
+using Remora.Discord.API.Abstractions.Objects;
+
+namespace Remora.Discord.API.Abstractions.Gateway.Events;
+
+///
+/// Represents a user's initial subscription to an SKU.
+///
+[PublicAPI]
+public interface IEntitlementCreate : IEntitlement, IGatewayEvent;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Monetization/IEntitlementDelete.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Monetization/IEntitlementDelete.cs
new file mode 100644
index 0000000000..20ea38950d
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Monetization/IEntitlementDelete.cs
@@ -0,0 +1,32 @@
+//
+// IEntitlementDelete.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+using JetBrains.Annotations;
+using Remora.Discord.API.Abstractions.Objects;
+
+namespace Remora.Discord.API.Abstractions.Gateway.Events;
+
+///
+/// Represents a removal of an entitlement from a user.
+///
+[PublicAPI]
+public interface IEntitlementDelete : IEntitlement, IGatewayEvent;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Monetization/IEntitlementUpdate.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Monetization/IEntitlementUpdate.cs
new file mode 100644
index 0000000000..37c97bacb4
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Monetization/IEntitlementUpdate.cs
@@ -0,0 +1,32 @@
+//
+// IEntitlementUpdate.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+using JetBrains.Annotations;
+using Remora.Discord.API.Abstractions.Objects;
+
+namespace Remora.Discord.API.Abstractions.Gateway.Events;
+
+///
+/// Represents a renewal of a user's entitlement to an SKU.
+///
+[PublicAPI]
+public interface IEntitlementUpdate : IEntitlement, IGatewayEvent;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Presence/IPresenceUpdate.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Presence/IPresenceUpdate.cs
index c0fe5306f6..9a97d8bcc2 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Presence/IPresenceUpdate.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Presence/IPresenceUpdate.cs
@@ -29,6 +29,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Represents the update of a user's presence.
///
[PublicAPI]
-public interface IPresenceUpdate : IGatewayEvent, IPresence
-{
-}
+public interface IPresenceUpdate : IGatewayEvent, IPresence;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Users/IUserUpdate.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Users/IUserUpdate.cs
index ff07f62719..f463495f75 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Users/IUserUpdate.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Users/IUserUpdate.cs
@@ -29,6 +29,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Represents an update to a user.
///
[PublicAPI]
-public interface IUserUpdate : IGatewayEvent, IUser
-{
-}
+public interface IUserUpdate : IGatewayEvent, IUser;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Voice/IVoiceStateUpdate.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Voice/IVoiceStateUpdate.cs
index d074eddb8e..94c178b763 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Voice/IVoiceStateUpdate.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/Events/Voice/IVoiceStateUpdate.cs
@@ -29,6 +29,4 @@ namespace Remora.Discord.API.Abstractions.Gateway.Events;
/// Represents an update to a user's voice state.
///
[PublicAPI]
-public interface IVoiceStateUpdate : IGatewayEvent, IVoiceState
-{
-}
+public interface IVoiceStateUpdate : IGatewayEvent, IVoiceState;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/IGatewayPayloadData.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/IGatewayPayloadData.cs
index 30064dadab..0d391316dd 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/IGatewayPayloadData.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/IGatewayPayloadData.cs
@@ -28,6 +28,4 @@ namespace Remora.Discord.API.Abstractions.Gateway;
/// Represents a marker interface for gateway payload data.
///
[PublicAPI]
-public interface IGatewayPayloadData
-{
-}
+public interface IGatewayPayloadData;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Gateway/IPayload.cs b/Backend/Remora.Discord.API.Abstractions/API/Gateway/IPayload.cs
index 6f010d6318..e4997f1843 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Gateway/IPayload.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Gateway/IPayload.cs
@@ -28,6 +28,4 @@ namespace Remora.Discord.API.Abstractions.Gateway;
/// Marker interface for payload classes.
///
[PublicAPI]
-public interface IPayload
-{
-}
+public interface IPayload;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Applications/ApplicationIntegrationType.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Applications/ApplicationIntegrationType.cs
new file mode 100644
index 0000000000..c7115b5cfb
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Applications/ApplicationIntegrationType.cs
@@ -0,0 +1,42 @@
+//
+// ApplicationIntegrationType.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+using JetBrains.Annotations;
+
+namespace Remora.Discord.API.Abstractions.Objects;
+
+///
+/// Represents valid locations for users to install application integrations.
+///
+[PublicAPI]
+public enum ApplicationIntegrationType
+{
+ ///
+ /// Specifies that the integration can be installed on a guild.
+ ///
+ GuildInstallable = 0,
+
+ ///
+ /// Specifies that the integration can be installed on a user.
+ ///
+ UserInstallable = 1,
+}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Applications/IApplication.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Applications/IApplication.cs
index 24a865bb82..7e02553e0f 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Applications/IApplication.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Applications/IApplication.cs
@@ -68,6 +68,11 @@ public interface IApplication : IPartialApplication
///
new bool DoesBotRequireCodeGrant { get; }
+ ///
+ /// Gets the user object for the bot user associated with the application.
+ ///
+ new Optional Bot { get; }
+
///
/// Gets the URL to the application's terms of service.
///
@@ -128,6 +133,23 @@ public interface IApplication : IPartialApplication
///
new Optional ApproximateGuildCount { get; }
+ ///
+ /// Gets the redirect URIs for the application.
+ ///
+ new Optional> RedirectUris { get; }
+
+ ///
+ /// Gets the interaction endpoint URL for the application.
+ ///
+ new Optional InteractionsEndpointUrl { get; }
+
+ ///
+ /// Gets the application's role connection verification entry point,
+ /// which when configured will render the app as a verification method
+ /// in the guild role verification configuration.
+ ///
+ new Optional RoleConnectionsVerificationUrl { get; }
+
///
/// Gets up to 5 tags describing the content and functionality of the application.
///
@@ -144,11 +166,9 @@ public interface IApplication : IPartialApplication
new Optional CustomInstallUrl { get; }
///
- /// Gets the application's role connection verification entry point,
- /// which when configured will render the app as a verification method
- /// in the guild role verification configuration.
+ /// Gets the application's integration type configurations.
///
- new Optional RoleConnectionsVerificationUrl { get; }
+ new IReadOnlyDictionary IntegrationTypesConfig { get; }
///
Optional IPartialApplication.ID => this.ID;
@@ -171,6 +191,9 @@ public interface IApplication : IPartialApplication
///
Optional IPartialApplication.DoesBotRequireCodeGrant => this.DoesBotRequireCodeGrant;
+ ///
+ Optional IPartialApplication.Bot => this.Bot;
+
///
Optional IPartialApplication.TermsOfServiceURL => this.TermsOfServiceURL;
@@ -207,6 +230,15 @@ public interface IApplication : IPartialApplication
///
Optional IPartialApplication.ApproximateGuildCount => this.ApproximateGuildCount;
+ ///
+ Optional> IPartialApplication.RedirectUris => this.RedirectUris;
+
+ ///
+ Optional IPartialApplication.InteractionsEndpointUrl => this.InteractionsEndpointUrl;
+
+ ///
+ Optional IPartialApplication.RoleConnectionsVerificationUrl => this.RoleConnectionsVerificationUrl;
+
///
Optional> IPartialApplication.Tags => this.Tags;
@@ -217,5 +249,5 @@ public interface IApplication : IPartialApplication
Optional IPartialApplication.CustomInstallUrl => this.CustomInstallUrl;
///
- Optional IPartialApplication.RoleConnectionsVerificationUrl => this.RoleConnectionsVerificationUrl;
+ Optional> IPartialApplication.IntegrationTypesConfig => new(this.IntegrationTypesConfig);
}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Applications/IApplicationIntegrationTypeConfig.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Applications/IApplicationIntegrationTypeConfig.cs
new file mode 100644
index 0000000000..66cca05a81
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Applications/IApplicationIntegrationTypeConfig.cs
@@ -0,0 +1,37 @@
+//
+// IApplicationIntegrationTypeConfig.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+using JetBrains.Annotations;
+
+namespace Remora.Discord.API.Abstractions.Objects;
+
+///
+/// The integration type configuration for an application.
+///
+[PublicAPI]
+public interface IApplicationIntegrationTypeConfig
+{
+ ///
+ /// Gets the OAuth2 install parameters for the integration type.
+ ///
+ public IApplicationOAuth2InstallParams OAuth2InstallParams { get; }
+}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Applications/IApplicationOAuth2InstallParams.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Applications/IApplicationOAuth2InstallParams.cs
new file mode 100644
index 0000000000..2419832d46
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Applications/IApplicationOAuth2InstallParams.cs
@@ -0,0 +1,46 @@
+//
+// IApplicationOAuth2InstallParams.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+using System.Collections.Generic;
+using JetBrains.Annotations;
+
+namespace Remora.Discord.API.Abstractions.Objects;
+
+///
+/// Represents the OAuth2 install parameters for an application.
+///
+[PublicAPI]
+public interface IApplicationOAuth2InstallParams
+{
+ ///
+ /// Gets the permissions required for the application.
+ ///
+ ///
+ /// Only applicable if includes `bot`.
+ ///
+ IDiscordPermissionSet Permissions { get; }
+
+ ///
+ /// Gets the list of OAuth2 scopes required for the application.
+ ///
+ IReadOnlyList Scopes { get; }
+}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Applications/IPartialApplication.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Applications/IPartialApplication.cs
index 2d47dec7fc..57dfb37e98 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Applications/IPartialApplication.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Applications/IPartialApplication.cs
@@ -54,6 +54,9 @@ public interface IPartialApplication
///
Optional DoesBotRequireCodeGrant { get; }
+ ///
+ Optional Bot { get; }
+
///
Optional TermsOfServiceURL { get; }
@@ -90,6 +93,15 @@ public interface IPartialApplication
///
Optional ApproximateGuildCount { get; }
+ ///
+ Optional> RedirectUris { get; }
+
+ ///
+ Optional InteractionsEndpointUrl { get; }
+
+ ///
+ Optional RoleConnectionsVerificationUrl { get; }
+
///
Optional> Tags { get; }
@@ -99,6 +111,6 @@ public interface IPartialApplication
///
Optional CustomInstallUrl { get; }
- ///
- Optional RoleConnectionsVerificationUrl { get; }
+ ///
+ Optional> IntegrationTypesConfig { get; }
}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/AuditLogs/IOptionalAuditEntryInfo.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/AuditLogs/IOptionalAuditEntryInfo.cs
index b300928021..bfae273674 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/AuditLogs/IOptionalAuditEntryInfo.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/AuditLogs/IOptionalAuditEntryInfo.cs
@@ -124,4 +124,13 @@ public interface IOptionalAuditEntryInfo
///
///
Optional Type { get; }
+
+ ///
+ /// Gets the type of integration which performed the action.
+ ///
+ ///
+ /// This is a strangely documented property from Discord, but corresponds to the
+ /// property.
+ ///
+ Optional IntegrationType { get; }
}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Channels/ChannelFlags.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Channels/ChannelFlags.cs
index 507ab95370..a5668ce655 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Channels/ChannelFlags.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Channels/ChannelFlags.cs
@@ -39,5 +39,10 @@ public enum ChannelFlags
///
/// The forum requires a tag to be specified when creating a thread.
///
- RequireTag = 1 << 4
+ RequireTag = 1 << 4,
+
+ ///
+ /// Hides the embedded media download options. Available only for .
+ ///
+ HideMediaDownloadOptions = 1 << 15
}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Channels/ChannelType.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Channels/ChannelType.cs
index e0fa2ab227..e12a42aaf6 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Channels/ChannelType.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Channels/ChannelType.cs
@@ -89,5 +89,10 @@ public enum ChannelType
///
/// A channel that can only contain threads.
///
- GuildForum = 15
+ GuildForum = 15,
+
+ ///
+ /// A channel that can only contain threads, similar to .
+ ///
+ GuildMedia = 16
}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Channels/ThreadMemberFlags.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Channels/ThreadMemberFlags.cs
index 70d217007b..72af8acd71 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Channels/ThreadMemberFlags.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Channels/ThreadMemberFlags.cs
@@ -29,6 +29,4 @@ namespace Remora.Discord.API.Abstractions.Objects;
/// Enumerates various thread member flags.
///
[PublicAPI, Flags]
-public enum ThreadMemberFlags
-{
-}
+public enum ThreadMemberFlags;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/ApplicationCommands/IApplicationCommand.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/ApplicationCommands/IApplicationCommand.cs
index 61fbeb55d0..f4f8607d5b 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/ApplicationCommands/IApplicationCommand.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/ApplicationCommands/IApplicationCommand.cs
@@ -114,4 +114,14 @@ public interface IApplicationCommand
/// Gets a value indicating whether this command is age-restricted.
///
Optional IsNsfw { get; }
+
+ ///
+ /// Gets a value indicating the contexts in which this command can be installed.
+ ///
+ Optional> IntegrationTypes { get; }
+
+ ///
+ /// Gets a value indicating the contexts in which this command can be invoked.
+ ///
+ Optional> Contexts { get; }
}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/ApplicationCommands/IApplicationCommandPermissions.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/ApplicationCommands/IApplicationCommandPermissions.cs
index 5adee583ac..52fedc4260 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/ApplicationCommands/IApplicationCommandPermissions.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/ApplicationCommands/IApplicationCommandPermissions.cs
@@ -44,5 +44,5 @@ public interface IApplicationCommandPermissions
///
/// Gets a value indicating whether the referenced entity has permission to use the command.
///
- bool HasPermission { get; }
+ bool HasPermission { get; }
}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/ApplicationCommands/IBulkApplicationCommandData.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/ApplicationCommands/IBulkApplicationCommandData.cs
index 8fe59b2d65..940b0012f4 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/ApplicationCommands/IBulkApplicationCommandData.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/ApplicationCommands/IBulkApplicationCommandData.cs
@@ -61,4 +61,10 @@ public interface IBulkApplicationCommandData
///
Optional IsNsfw { get; }
+
+ ///
+ Optional> IntegrationTypes { get; }
+
+ ///
+ Optional> Contexts { get; }
}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/IMessageComponent.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/IMessageComponent.cs
index 24315411d5..ad52b2320f 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/IMessageComponent.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/IMessageComponent.cs
@@ -28,6 +28,4 @@ namespace Remora.Discord.API.Abstractions.Objects;
/// Represents the base type for all components. This is a marker interface with no real functionality.
///
[PublicAPI]
-public interface IMessageComponent : IPartialMessageComponent
-{
-}
+public interface IMessageComponent : IPartialMessageComponent;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/IPartialMessageComponent.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/IPartialMessageComponent.cs
index 7e5a2cdbac..efc494f1b2 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/IPartialMessageComponent.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/IPartialMessageComponent.cs
@@ -28,6 +28,4 @@ namespace Remora.Discord.API.Abstractions.Objects;
/// Represents the base type for all partial components. This is a marker interface with no real functionality.
///
[PublicAPI]
-public interface IPartialMessageComponent
-{
-}
+public interface IPartialMessageComponent;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IChannelSelectComponent.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IChannelSelectComponent.cs
index 6e007ebeca..752c2fea4a 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IChannelSelectComponent.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IChannelSelectComponent.cs
@@ -30,7 +30,7 @@ namespace Remora.Discord.API.Abstractions.Objects;
/// Represents a dropdown of selectable channels.
///
[PublicAPI]
-public interface IChannelSelectComponent : ISelectMenuComponent, IPartialChannelSelectComponent
+public interface IChannelSelectComponent : IMentionableSelectComponent, IPartialChannelSelectComponent
{
///
/// Gets the channel types to show on a component.
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IMentionableSelectComponent.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IMentionableSelectComponent.cs
index fdd842da13..df0debbe14 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IMentionableSelectComponent.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IMentionableSelectComponent.cs
@@ -20,7 +20,9 @@
// along with this program. If not, see .
//
+using System.Collections.Generic;
using JetBrains.Annotations;
+using Remora.Rest.Core;
namespace Remora.Discord.API.Abstractions.Objects;
@@ -30,4 +32,12 @@ namespace Remora.Discord.API.Abstractions.Objects;
[PublicAPI]
public interface IMentionableSelectComponent : ISelectMenuComponent, IPartialMentionableSelectComponent
{
+ ///
+ /// Gets the default values for auto-populated select menu components.
+ ///
+ new Optional> DefaultValues { get; }
+
+ ///
+ Optional> IPartialMentionableSelectComponent.DefaultValues
+ => this.DefaultValues.Map>(v => v);
}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IPartialChannelSelectComponent.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IPartialChannelSelectComponent.cs
index abc37f8de5..82f9e2cd73 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IPartialChannelSelectComponent.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IPartialChannelSelectComponent.cs
@@ -30,7 +30,7 @@ namespace Remora.Discord.API.Abstractions.Objects;
/// Represents a partial dropdown of selectable channels.
///
[PublicAPI]
-public interface IPartialChannelSelectComponent : IPartialSelectMenuComponent
+public interface IPartialChannelSelectComponent : IPartialMentionableSelectComponent
{
///
Optional> ChannelTypes { get; }
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IPartialMentionableSelectComponent.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IPartialMentionableSelectComponent.cs
index 388eed422e..e0a8f60e24 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IPartialMentionableSelectComponent.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IPartialMentionableSelectComponent.cs
@@ -20,14 +20,18 @@
// along with this program. If not, see .
//
+using System.Collections.Generic;
using JetBrains.Annotations;
+using Remora.Rest.Core;
namespace Remora.Discord.API.Abstractions.Objects;
///
-/// Represents a partial dropdown of selectable mentionables (users and roles).
+/// Represents a partial dropdown of selectable mentionables (users, roles, and channels).
///
[PublicAPI]
public interface IPartialMentionableSelectComponent : IPartialSelectMenuComponent
{
+ ///
+ Optional> DefaultValues { get; }
}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IPartialRoleSelectComponent.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IPartialRoleSelectComponent.cs
index 636b93d39c..56a14238a6 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IPartialRoleSelectComponent.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IPartialRoleSelectComponent.cs
@@ -28,6 +28,4 @@ namespace Remora.Discord.API.Abstractions.Objects;
/// Represents a partial dropdown of selectable roles.
///
[PublicAPI]
-public interface IPartialRoleSelectComponent : IPartialSelectMenuComponent
-{
-}
+public interface IPartialRoleSelectComponent : IPartialMentionableSelectComponent;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IPartialSelectDefaultValue.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IPartialSelectDefaultValue.cs
new file mode 100644
index 0000000000..962ee83eb7
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IPartialSelectDefaultValue.cs
@@ -0,0 +1,39 @@
+//
+// IPartialSelectDefaultValue.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+using JetBrains.Annotations;
+using Remora.Rest.Core;
+
+namespace Remora.Discord.API.Abstractions.Objects;
+
+///
+/// Represents a partial default value for a select menu.
+///
+[PublicAPI]
+public interface IPartialSelectDefaultValue
+{
+ ///
+ Optional ID { get; }
+
+ ///
+ Optional Type { get; }
+}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IPartialUserSelectComponent.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IPartialUserSelectComponent.cs
index d069792efc..a190c351a0 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IPartialUserSelectComponent.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IPartialUserSelectComponent.cs
@@ -28,6 +28,4 @@ namespace Remora.Discord.API.Abstractions.Objects;
/// Represents a partial dropdown of selectable users.
///
[PublicAPI]
-public interface IPartialUserSelectComponent : IPartialSelectMenuComponent
-{
-}
+public interface IPartialUserSelectComponent : IPartialMentionableSelectComponent;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IRoleSelectComponent.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IRoleSelectComponent.cs
index 64dd45997e..42446f889c 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IRoleSelectComponent.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IRoleSelectComponent.cs
@@ -28,6 +28,4 @@ namespace Remora.Discord.API.Abstractions.Objects;
/// Represents a dropdown of selectable roles.
///
[PublicAPI]
-public interface IRoleSelectComponent : ISelectMenuComponent, IPartialRoleSelectComponent
-{
-}
+public interface IRoleSelectComponent : IMentionableSelectComponent, IPartialRoleSelectComponent;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/ISelectDefaultValue.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/ISelectDefaultValue.cs
new file mode 100644
index 0000000000..8a3c6088f4
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/ISelectDefaultValue.cs
@@ -0,0 +1,49 @@
+//
+// ISelectDefaultValue.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+using JetBrains.Annotations;
+using Remora.Rest.Core;
+
+namespace Remora.Discord.API.Abstractions.Objects;
+
+///
+/// Represents a default value for a select menu.
+///
+[PublicAPI]
+public interface ISelectDefaultValue : IPartialSelectDefaultValue
+{
+ ///
+ /// Gets the ID of the default entity (user, role, or channel).
+ ///
+ new Snowflake ID { get; }
+
+ ///
+ /// Gets the type of value that represents. Can be one of "user", "role", or "channel".
+ ///
+ new string Type { get; }
+
+ ///
+ Optional IPartialSelectDefaultValue.ID => this.ID;
+
+ ///
+ Optional IPartialSelectDefaultValue.Type => this.Type;
+}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IUserSelectComponent.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IUserSelectComponent.cs
index dfba1ac38d..120c8515aa 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IUserSelectComponent.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/Components/SelectMenu/IUserSelectComponent.cs
@@ -28,6 +28,4 @@ namespace Remora.Discord.API.Abstractions.Objects;
/// Represents a dropdown of selectable users.
///
[PublicAPI]
-public interface IUserSelectComponent : ISelectMenuComponent, IPartialUserSelectComponent
-{
-}
+public interface IUserSelectComponent : IMentionableSelectComponent, IPartialUserSelectComponent;
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/IApplicationCommandInteractionMetadata.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/IApplicationCommandInteractionMetadata.cs
new file mode 100644
index 0000000000..2b7349b175
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/IApplicationCommandInteractionMetadata.cs
@@ -0,0 +1,37 @@
+//
+// IApplicationCommandInteractionMetadata.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+using JetBrains.Annotations;
+
+namespace Remora.Discord.API.Abstractions.Objects;
+
+///
+/// Represents metadata related to application commands.
+///
+[PublicAPI]
+public interface IApplicationCommandInteractionMetadata : IMessageInteractionMetadata
+{
+ ///
+ /// Gets the name of the command.
+ ///
+ string Name { get; }
+}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/IInteraction.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/IInteraction.cs
index d10742391d..52a8c6ea2f 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/IInteraction.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/IInteraction.cs
@@ -21,6 +21,7 @@
//
using System;
+using System.Collections.Generic;
using JetBrains.Annotations;
using OneOf;
using Remora.Rest.Core;
@@ -102,7 +103,7 @@ public interface IInteraction
///
/// Gets the computed permissions for the application in the context of the interaction's execution.
///
- Optional AppPermissions { get; }
+ IDiscordPermissionSet AppPermissions { get; }
///
/// Gets the locale of the invoking user.
@@ -116,4 +117,28 @@ public interface IInteraction
/// Gets the locale of the guild the interaction was sent from.
///
Optional GuildLocale { get; }
+
+ ///
+ /// Gets, for monetized apps, any entitlements for the invoking user.
+ ///
+ IReadOnlyList Entitlements { get; }
+
+ ///
+ /// Gets the context of the interaction.
+ ///
+ Optional Context { get; }
+
+ ///
+ /// Gets the integrations that authorized the interaction.
+ ///
+ ///
+ /// This is a mapping of the integration type to the ID of its resource.
+ ///
+ /// The dictionary contains the following, given the circumstances:
+ /// - If the integration is installed to a user, a key of and the value is the user ID.
+ /// - If the integration is installed to a guild, a key of and the value is the guild ID.
+ /// If the interaction is sent outside the context of a guild, the value is always zero.
+ ///
+ ///
+ Optional> AuthorizingIntegrationOwners { get; }
}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/IMessageComponentInteractionMetadata.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/IMessageComponentInteractionMetadata.cs
new file mode 100644
index 0000000000..36725b1112
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/IMessageComponentInteractionMetadata.cs
@@ -0,0 +1,38 @@
+//
+// IMessageComponentInteractionMetadata.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+using JetBrains.Annotations;
+using Remora.Rest.Core;
+
+namespace Remora.Discord.API.Abstractions.Objects;
+
+///
+/// Represents metadata related to a message component interaction.
+///
+[PublicAPI]
+public interface IMessageComponentInteractionMetadata : IMessageInteractionMetadata
+{
+ ///
+ /// Gets the ID of the message that was interacted with.
+ ///
+ Snowflake InteractedMessageID { get; }
+}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/IMessageInteractionMetadata.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/IMessageInteractionMetadata.cs
new file mode 100644
index 0000000000..8e2decdbc1
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/IMessageInteractionMetadata.cs
@@ -0,0 +1,68 @@
+//
+// IMessageInteractionMetadata.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+using System.Collections.Generic;
+using JetBrains.Annotations;
+using Remora.Rest.Core;
+
+namespace Remora.Discord.API.Abstractions.Objects;
+
+///
+/// Represents the metadata of an application command interaction.
+///
+[PublicAPI]
+public interface IMessageInteractionMetadata
+{
+ ///
+ /// Gets the ID of the interaction.
+ ///
+ Snowflake ID { get; }
+
+ ///
+ /// Gets the ID of the user who triggered the interaction.
+ ///
+ Snowflake UserID { get; }
+
+ ///
+ /// Gets the type of the interaction.
+ ///
+ InteractionType Type { get; }
+
+ ///
+ /// Gets the ID of the original response message. Only applicable to followup messages.
+ ///
+ Optional OriginalResponseMessageID { get; }
+
+ ///
+ /// Gets the integrations that authorized the interaction.
+ ///
+ ///
+ /// This is a mapping of the integration type to the ID of its resource.
+ ///
+ /// The dictionary contains the following, given the circumstances:
+ /// - If the integration is installed to a user, a key of and the value is the user ID.
+ /// - If the integration is installed to a guild, a key of and the value is the guild ID.
+ /// If the interaction is sent outside the context of a guild, the value is always zero.
+ ///
+ ///
+ IReadOnlyDictionary AuthorizingIntegrationOwners { get; }
+}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/IModalSubmitInteractionMetadata.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/IModalSubmitInteractionMetadata.cs
new file mode 100644
index 0000000000..2c2dfd30e1
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/IModalSubmitInteractionMetadata.cs
@@ -0,0 +1,38 @@
+//
+// IModalSubmitInteractionMetadata.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+using JetBrains.Annotations;
+using OneOf;
+
+namespace Remora.Discord.API.Abstractions.Objects;
+
+///
+/// Represents metadata related to a modal submit interaction.
+///
+[PublicAPI]
+public interface IModalSubmitInteractionMetadata : IMessageInteractionMetadata
+{
+ ///
+ /// Gets the metadata for the interaction that triggered the modal.
+ ///
+ OneOf TriggeringInteractionMetadata { get; }
+}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/InteractionCallbackType.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/InteractionCallbackType.cs
index 43f0ff1f30..70a4743df3 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/InteractionCallbackType.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/InteractionCallbackType.cs
@@ -72,5 +72,10 @@ public enum InteractionCallbackType
///
/// Only relevant for component-based interactions and application commands.
///
- Modal = 9
+ Modal = 9,
+
+ ///
+ /// Respond to an interaction with an upgrade button. Only available for apps with monetization enabled.
+ ///
+ PremiumRequired = 10
}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/InteractionContextType.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/InteractionContextType.cs
new file mode 100644
index 0000000000..7c600ebd4d
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/InteractionContextType.cs
@@ -0,0 +1,47 @@
+//
+// InteractionContextType.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+using JetBrains.Annotations;
+
+namespace Remora.Discord.API.Abstractions.Objects;
+
+///
+/// Enumerates various interaction context types.
+///
+[PublicAPI]
+public enum InteractionContextType
+{
+ ///
+ /// The interaction was executed in the context of a guild.
+ ///
+ Guild = 0,
+
+ ///
+ /// The interaction was executed in the context of a direct message to the bot associated with the application.
+ ///
+ BotDM = 1,
+
+ ///
+ /// The interaction was executed in the context of a direct message or group direct message.
+ ///
+ PrivateChannel = 2,
+}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Messages/IMessage.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Messages/IMessage.cs
index 1bfcd2e301..de9157c48e 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Messages/IMessage.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Messages/IMessage.cs
@@ -23,6 +23,7 @@
using System;
using System.Collections.Generic;
using JetBrains.Annotations;
+using OneOf;
using Remora.Rest.Core;
namespace Remora.Discord.API.Abstractions.Objects;
@@ -151,7 +152,7 @@ public interface IMessage : IPartialMessage
///
/// Gets the message reference. Sent with cross-posted messages.
///
- new Optional MessageReference { get; }
+ new Optional MessageReference { get; }
///
/// Gets a set of bitwise flags describing extra features of the message.
@@ -188,6 +189,16 @@ public interface IMessage : IPartialMessage
///
new Optional Position { get; }
+ ///
+ /// Gets data for users, members, channels, and roles in the message's auto-populated select menus.
+ ///
+ new Optional Resolved { get; }
+
+ ///
+ /// Gets the metadata of the interaction, if any.
+ ///
+ new Optional> InteractionMetadata { get; }
+
///
Optional IPartialMessage.ID => this.ID;
@@ -274,4 +285,10 @@ public interface IMessage : IPartialMessage
///
Optional IPartialMessage.Position => this.Position;
+
+ ///
+ Optional IPartialMessage.Resolved => this.Resolved;
+
+ ///
+ Optional> IPartialMessage.InteractionMetadata => this.InteractionMetadata;
}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Messages/IPartialMessage.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Messages/IPartialMessage.cs
index fb4222b95a..d0807fb5f1 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Messages/IPartialMessage.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Messages/IPartialMessage.cs
@@ -23,6 +23,7 @@
using System;
using System.Collections.Generic;
using JetBrains.Annotations;
+using OneOf;
using Remora.Rest.Core;
namespace Remora.Discord.API.Abstractions.Objects;
@@ -97,7 +98,7 @@ public interface IPartialMessage
Optional ApplicationID { get; }
///
- Optional MessageReference { get; }
+ Optional MessageReference { get; }
///
Optional Flags { get; }
@@ -119,4 +120,10 @@ public interface IPartialMessage
///
Optional Position { get; }
+
+ ///
+ Optional Resolved { get; }
+
+ ///
+ Optional> InteractionMetadata { get; }
}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Monetization/EntitlementOwnerType.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Monetization/EntitlementOwnerType.cs
new file mode 100644
index 0000000000..02c61ee81c
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Monetization/EntitlementOwnerType.cs
@@ -0,0 +1,42 @@
+//
+// EntitlementOwnerType.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+using JetBrains.Annotations;
+
+namespace Remora.Discord.API.Abstractions.Objects;
+
+///
+/// Enumerates various entitlement owner types.
+///
+[PublicAPI]
+public enum EntitlementOwnerType
+{
+ ///
+ /// The entitlement is owned by a guild.
+ ///
+ Guild = 1,
+
+ ///
+ /// The entitlement is owned by a user.
+ ///
+ User = 2
+}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Monetization/EntitlementType.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Monetization/EntitlementType.cs
new file mode 100644
index 0000000000..773506a61e
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Monetization/EntitlementType.cs
@@ -0,0 +1,72 @@
+//
+// EntitlementType.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+using JetBrains.Annotations;
+
+namespace Remora.Discord.API.Abstractions.Objects;
+
+///
+/// Enumerates various entitlement types.
+///
+[PublicAPI]
+public enum EntitlementType
+{
+ ///
+ /// The entitlement was purchased by a user.
+ ///
+ Purchase = 1,
+
+ ///
+ /// The entitlement is a Nitro subscription.
+ ///
+ PremiumSubscription = 2,
+
+ ///
+ /// The entitlement was gifted by a developer.
+ ///
+ DeveloperGift = 3,
+
+ ///
+ /// The entitlement was purchased by a developer in application test mode.
+ ///
+ TestModePurchase = 4,
+
+ ///
+ /// The entitlement was granted when the SKU was free.
+ ///
+ FreePurchase = 5,
+
+ ///
+ /// The entitlement was gifted by another user.
+ ///
+ UserGift = 6,
+
+ ///
+ /// The entitlement was claimed by a user for free as part of their Nitro subscription.
+ ///
+ PremiumPurchase = 7,
+
+ ///
+ /// The entitlement was purchased as an app subscription.
+ ///
+ ApplicationSubscription = 8
+}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Monetization/IEntitlement.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Monetization/IEntitlement.cs
new file mode 100644
index 0000000000..70cb7920d7
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Monetization/IEntitlement.cs
@@ -0,0 +1,114 @@
+//
+// IEntitlement.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+using System;
+using JetBrains.Annotations;
+using Remora.Rest.Core;
+
+namespace Remora.Discord.API.Abstractions.Objects;
+
+///
+/// Represents information about a user's access to monetized application features.
+///
+[PublicAPI]
+public interface IEntitlement : IPartialEntitlement
+{
+ ///
+ /// Gets the ID of the entitlement.
+ ///
+ new Snowflake ID { get; }
+
+ ///
+ /// Gets the ID of the SKU.
+ ///
+ new Snowflake SKUID { get; }
+
+ ///
+ /// Gets the ID of the parent application.
+ ///
+ new Snowflake ApplicationID { get; }
+
+ ///
+ /// Gets the ID of the user that is granted access to the entitlement's SKU.
+ ///
+ new Optional UserID { get; }
+
+ ///
+ /// Gets the type of the entitlement.
+ ///
+ new EntitlementType Type { get; }
+
+ ///
+ /// Gets a value indicating whether the entitlement has been deleted.
+ ///
+ new bool IsDeleted { get; }
+
+ ///
+ /// Gets the start time at which the entitlement is valid.
+ ///
+ new Optional StartsAt { get; }
+
+ ///
+ /// Gets the end time at which the entitlement is no longer valid.
+ ///
+ new Optional EndsAt { get; }
+
+ ///
+ /// Gets the ID of the guild that is granted access to the entitlement's SKU.
+ ///
+ new Optional GuildID { get; }
+
+ ///
+ /// Gets a value indicating whether the entitlement has been consumed.
+ ///
+ new Optional IsConsumed { get; }
+
+ ///
+ Optional IPartialEntitlement.ID => this.ID;
+
+ ///
+ Optional IPartialEntitlement.SKUID => this.SKUID;
+
+ ///
+ Optional IPartialEntitlement.ApplicationID => this.ApplicationID;
+
+ ///
+ Optional IPartialEntitlement.UserID => this.UserID;
+
+ ///
+ Optional IPartialEntitlement.Type => this.Type;
+
+ ///
+ Optional IPartialEntitlement.IsDeleted => this.IsDeleted;
+
+ ///
+ Optional IPartialEntitlement.StartsAt => this.StartsAt;
+
+ ///
+ Optional IPartialEntitlement.EndsAt => this.EndsAt;
+
+ ///
+ Optional IPartialEntitlement.GuildID => this.GuildID;
+
+ ///
+ Optional IPartialEntitlement.IsConsumed => this.IsConsumed;
+}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Monetization/IPartialEntitlement.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Monetization/IPartialEntitlement.cs
new file mode 100644
index 0000000000..64f126e86c
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Monetization/IPartialEntitlement.cs
@@ -0,0 +1,64 @@
+//
+// IPartialEntitlement.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+using System;
+using JetBrains.Annotations;
+using Remora.Rest.Core;
+
+namespace Remora.Discord.API.Abstractions.Objects;
+
+///
+/// Represents partial information about a user's access to monetized application features.
+///
+[PublicAPI]
+public interface IPartialEntitlement
+{
+ ///
+ Optional ID { get; }
+
+ ///
+ Optional SKUID { get; }
+
+ ///
+ Optional ApplicationID { get; }
+
+ ///
+ Optional UserID { get; }
+
+ ///
+ Optional Type { get; }
+
+ ///
+ Optional IsDeleted { get; }
+
+ ///
+ Optional StartsAt { get; }
+
+ ///
+ Optional EndsAt { get; }
+
+ ///
+ Optional GuildID { get; }
+
+ ///
+ Optional IsConsumed { get; }
+}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Monetization/ISKU.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Monetization/ISKU.cs
new file mode 100644
index 0000000000..a41ab3e232
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Monetization/ISKU.cs
@@ -0,0 +1,63 @@
+//
+// ISKU.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+using JetBrains.Annotations;
+using Remora.Rest.Core;
+
+namespace Remora.Discord.API.Abstractions.Objects;
+
+///
+/// Represents a premium offering. SKU stands for Stock Keeping Unit.
+///
+[PublicAPI]
+public interface ISKU
+{
+ ///
+ /// Gets the ID of the SKU.
+ ///
+ Snowflake ID { get; }
+
+ ///
+ /// Gets the type of the SKU.
+ ///
+ SKUType Type { get; }
+
+ ///
+ /// Gets the ID of the parent application.
+ ///
+ Snowflake ApplicationID { get; }
+
+ ///
+ /// Gets the customer-facing name of the premium offering.
+ ///
+ string Name { get; }
+
+ ///
+ /// Gets the system-generated URL slug based on the SKU's name.
+ ///
+ string Slug { get; }
+
+ ///
+ /// Gets the flags for this SKU.
+ ///
+ SKUFlags Flags { get; }
+}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Monetization/SKUFlags.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Monetization/SKUFlags.cs
new file mode 100644
index 0000000000..2233a23280
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Monetization/SKUFlags.cs
@@ -0,0 +1,49 @@
+//
+// SKUFlags.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+using System;
+using JetBrains.Annotations;
+
+namespace Remora.Discord.API.Abstractions.Objects;
+
+///
+/// Enumerates various flags for an SKU.
+///
+[Flags]
+[PublicAPI]
+public enum SKUFlags
+{
+ ///
+ /// The SKU is available for purchase.
+ ///
+ Available = 1 << 2,
+
+ ///
+ /// A subscription purchased by a user and applied to a single server.
+ ///
+ GuildSubscription = 1 << 7,
+
+ ///
+ /// A subscription purchased by a user for themselves.
+ ///
+ UserSubscription = 1 << 8
+}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Monetization/SKUType.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Monetization/SKUType.cs
new file mode 100644
index 0000000000..a1edc9e959
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Monetization/SKUType.cs
@@ -0,0 +1,42 @@
+//
+// SKUType.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+using JetBrains.Annotations;
+
+namespace Remora.Discord.API.Abstractions.Objects;
+
+///
+/// Enumerates various SKU types.
+///
+[PublicAPI]
+public enum SKUType
+{
+ ///
+ /// A recurring subscription.
+ ///
+ Subscription = 5,
+
+ ///
+ /// A system-generated group for each SKU.
+ ///
+ SubscriptionGroup = 6
+}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Permissions/DiscordPermission.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Permissions/DiscordPermission.cs
index 820bd6f5ec..d6979cfe37 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Permissions/DiscordPermission.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Permissions/DiscordPermission.cs
@@ -188,7 +188,7 @@ public enum DiscordPermission
ManageWebhooks = 29,
///
- /// Allows management and editing of emojis, stickers, and soundboard sounds.
+ /// Allows for editing and deleting of emojis, stickers, and soundboard sounds created by all users.
///
ManageGuildExpressions = 30,
@@ -203,7 +203,7 @@ public enum DiscordPermission
RequestToSpeak = 32,
///
- /// Allows the user to manage scheduled events.
+ /// Allows for editing and deleting scheduled events created by all users.
///
ManageEvents = 33,
@@ -254,27 +254,23 @@ public enum DiscordPermission
UseSoundboard = 42,
///
- /// Allows for creating emojis, stickers, and soundboard sounds, independently of managing them.
+ /// Allows for creating emojis, stickers, and soundboard sounds, as well as editing and deleting those created by
+ /// the current user.
///
CreateGuildExpressions = 43,
///
- /// Allows the usage of custom soundboard sounds from other servers.
+ /// Allows for creating scheduled events, as well as editing and deleting those created by the current user.
///
- UseExternalSounds = 45,
+ CreateEvents = 44,
///
- /// Allows for sending voice messages.
- ///
- SendVoiceMessages = 46,
-
- ///
- /// Allows for interaction with Clyde (AI).
+ /// Allows the usage of custom soundboard sounds from other servers.
///
- UseClydeAi = 47,
+ UseExternalSounds = 45,
///
- /// Allows for setting the status of a voice channel.
+ /// Allows for sending voice messages.
///
- SetVoiceChannelStatus = 48
+ SendVoiceMessages = 46
}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Reactions/IReaction.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Reactions/IReaction.cs
index 69025cb02d..42fd79cb90 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Reactions/IReaction.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Reactions/IReaction.cs
@@ -20,6 +20,8 @@
// along with this program. If not, see .
//
+using System.Collections.Generic;
+using System.Drawing;
using JetBrains.Annotations;
namespace Remora.Discord.API.Abstractions.Objects;
@@ -31,17 +33,32 @@ namespace Remora.Discord.API.Abstractions.Objects;
public interface IReaction
{
///
- /// Gets the number of times this emoji has been used to react.
+ /// Gets the total number of times this emoji has been used to react, including burst (super) reactions.
///
int Count { get; }
///
- /// Gets a value indicating whether the current user has reacted using this emoji.
+ /// Gets detailed information about the reaction counts.
+ ///
+ IReactionCountDetails CountDetails { get; }
+
+ ///
+ /// Gets a value indicating whether the current user has added a reaction using this emoji.
///
bool HasCurrentUserReacted { get; }
+ ///
+ /// Gets a value indicating whether the current user has added a burst (super) reaction using this emoji.
+ ///
+ bool HasCurrentUserBurstReacted { get; }
+
///
/// Gets the partial emoji information.
///
IPartialEmoji Emoji { get; }
+
+ ///
+ /// Gets the colors used for the super reaction.
+ ///
+ IReadOnlyList BurstColours { get; }
}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Reactions/IReactionCountDetails.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Reactions/IReactionCountDetails.cs
new file mode 100644
index 0000000000..d5abf886f4
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Reactions/IReactionCountDetails.cs
@@ -0,0 +1,42 @@
+//
+// IReactionCountDetails.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+using JetBrains.Annotations;
+
+namespace Remora.Discord.API.Abstractions.Objects;
+
+///
+/// Represents detailed information about a reaction count.
+///
+[PublicAPI]
+public interface IReactionCountDetails
+{
+ ///
+ /// Gets the number of burst (super) reactions that have been made with the associated emoji.
+ ///
+ int Burst { get; }
+
+ ///
+ /// Gets the number of normal reactions that have been made with the associated emoji.
+ ///
+ int Normal { get; }
+}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Teams/ITeamMember.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Teams/ITeamMember.cs
index ef16ccd5fa..b367d977a0 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Teams/ITeamMember.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Teams/ITeamMember.cs
@@ -51,4 +51,9 @@ public interface ITeamMember
/// Gets the user that's part of the team.
///
IPartialUser User { get; }
+
+ ///
+ /// Gets the user's role.
+ ///
+ TeamMemberRole Role { get; }
}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Teams/TeamMemberRole.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Teams/TeamMemberRole.cs
new file mode 100644
index 0000000000..611858f98f
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Teams/TeamMemberRole.cs
@@ -0,0 +1,55 @@
+//
+// TeamMemberRole.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+namespace Remora.Discord.API.Abstractions.Objects;
+
+///
+/// Enumerates various roles a team member can have.
+///
+public enum TeamMemberRole
+{
+ ///
+ /// Owners are the most permissible role, and can take destructive, irreversible actions like deleting team-owned
+ /// apps or the team itself. Teams are limited to 1 owner.
+ ///
+ Owner,
+
+ ///
+ /// Admins have similar access as owners, except they cannot take destructive actions on the team or team-owned
+ /// apps.
+ ///
+ Admin,
+
+ ///
+ /// Developers can access information about team-owned apps, like the client secret or public key. They can also
+ /// take limited actions on team-owned apps, like configuring interaction endpoints or resetting the bot token.
+ /// Members with the Developer role *cannot* manage the team or its members, or take destructive actions on
+ /// team-owned apps.
+ ///
+ Developer,
+
+ ///
+ /// Read-only members can access information about a team and any team-owned apps. Some examples include getting the
+ /// IDs of applications and exporting payout records.
+ ///
+ ReadOnly
+}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Objects/Users/IUser.cs b/Backend/Remora.Discord.API.Abstractions/API/Objects/Users/IUser.cs
index aff96206c9..39cbd4f7e1 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Objects/Users/IUser.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Objects/Users/IUser.cs
@@ -55,7 +55,7 @@ public interface IUser : IPartialUser
///
/// Gets the user's display name, if it is set. For bots, this is the application name.
///
- new string? GlobalName { get; }
+ new Optional GlobalName { get; }
///
/// Gets the user's avatar hash.
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Rest/IBulkBanResponse.cs b/Backend/Remora.Discord.API.Abstractions/API/Rest/IBulkBanResponse.cs
new file mode 100644
index 0000000000..3baaf0779f
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Rest/IBulkBanResponse.cs
@@ -0,0 +1,44 @@
+//
+// IBulkBanResponse.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+using System.Collections.Generic;
+using JetBrains.Annotations;
+using Remora.Rest.Core;
+
+namespace Remora.Discord.API.Abstractions.Rest;
+
+///
+/// Represents a response to a bulk banning request.
+///
+[PublicAPI]
+public interface IBulkBanResponse
+{
+ ///
+ /// Gets the IDs of the users who were successfully banned.
+ ///
+ IReadOnlyList BannedUsers { get; }
+
+ ///
+ /// Gets the IDs of the users who were not banned.
+ ///
+ IReadOnlyList FailedUsers { get; }
+}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Rest/IDiscordRestApplicationAPI.cs b/Backend/Remora.Discord.API.Abstractions/API/Rest/IDiscordRestApplicationAPI.cs
index 662c0fe4e6..cb703bd09a 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Rest/IDiscordRestApplicationAPI.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Rest/IDiscordRestApplicationAPI.cs
@@ -20,7 +20,9 @@
// along with this program. If not, see .
//
+using System;
using System.Collections.Generic;
+using System.IO;
using System.Threading;
using System.Threading.Tasks;
using JetBrains.Annotations;
@@ -70,6 +72,8 @@ Task>> GetGlobalApplicationCommandsAsy
/// The permissions required to execute the command.
/// Whether this command is executable in DMs.
/// Whether the command is age-restricted.
+ /// The installation contexts the command can be installed to.
+ /// The contexts in which the command is allowed to be run in.
/// The cancellation token for this operation.
/// A creation result which may or may not have succeeded.
Task> CreateGlobalApplicationCommandAsync
@@ -84,6 +88,8 @@ Task> CreateGlobalApplicationCommandAsync
Optional defaultMemberPermissions = default,
Optional dmPermission = default,
Optional isNsfw = default,
+ Optional> allowedIntegrationTypes = default,
+ Optional> allowedContextTypes = default,
CancellationToken ct = default
);
@@ -128,6 +134,8 @@ Task> GetGlobalApplicationCommandAsync
/// The permissions required to execute the command.
/// Whether this command is executable in DMs.
/// Whether this command is age-restricted.
+ /// The installation contexts the command can be installed to.
+ /// The contexts in which the command is allowed to be run in.
/// The cancellation token for this operation.
/// A creation result which may or may not have succeeded.
Task> EditGlobalApplicationCommandAsync
@@ -142,6 +150,8 @@ Task> EditGlobalApplicationCommandAsync
Optional defaultMemberPermissions = default,
Optional dmPermission = default,
Optional isNsfw = default,
+ Optional> allowedIntegrationTypes = default,
+ Optional> allowedContextTypes = default,
CancellationToken ct = default
);
@@ -195,6 +205,8 @@ Task>> GetGuildApplicationCommandsAsyn
/// The localized descriptions of the command.
/// The permissions required to execute the command.
/// Whether the command is age-restricted.
+ /// The installation contexts the command can be installed to.
+ /// The contexts in which the command is allowed to be run in.
/// The cancellation token for this operation.
/// A creation result which may or may not have succeeded.
Task> CreateGuildApplicationCommandAsync
@@ -209,6 +221,8 @@ Task> CreateGuildApplicationCommandAsync
Optional?> descriptionLocalizations = default,
Optional defaultMemberPermissions = default,
Optional isNsfw = default,
+ Optional> allowedIntegrationTypes = default,
+ Optional> allowedContextTypes = default,
CancellationToken ct = default
);
@@ -257,6 +271,8 @@ Task> GetGuildApplicationCommandAsync
/// The localized descriptions of the command.
/// The permissions required to execute the command.
/// Whether this command is age-restricted.
+ /// The installation contexts the command can be installed to.
+ /// The contexts in which the command is allowed to be run in.
/// The cancellation token for this operation.
/// A creation result which may or may not have succeeded.
///
@@ -274,6 +290,8 @@ Task> EditGuildApplicationCommandAsync
Optional?> descriptionLocalizations = default,
Optional defaultMemberPermissions = default,
Optional isNsfw = default,
+ Optional> allowedIntegrationTypes = default,
+ Optional> allowedContextTypes = default,
CancellationToken ct = default
);
@@ -379,4 +397,34 @@ Task>> UpdateApplicatio
/// The cancellation token for this operation.
/// The application object.
Task> GetCurrentApplicationAsync(CancellationToken ct = default);
+
+ ///
+ /// Edit properties of the application associated with the requesting bot user.
+ ///
+ /// The default custom authorization URL of the app.
+ /// The description of the app.
+ /// The role connections verification URL of the app.
+ /// The settings for the app's in-app authorization.
+ /// The new flags.
+ /// The new icon.
+ /// The new cover image.
+ /// The new interactions endpoint URL.
+ /// The new tags.
+ /// The new integration types.
+ /// The cancellation token for this operation.
+ /// The updated application.
+ Task> EditCurrentApplicationAsync
+ (
+ Optional customInstallUrl = default,
+ Optional description = default,
+ Optional roleConnectionsVerificationUrl = default,
+ Optional installParams = default,
+ Optional flags = default,
+ Optional icon = default,
+ Optional coverImage = default,
+ Optional interactionsEndpointUrl = default,
+ Optional> tags = default,
+ Optional> integrationTypes = default,
+ CancellationToken ct = default
+ );
}
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Rest/IDiscordRestChannelAPI.cs b/Backend/Remora.Discord.API.Abstractions/API/Rest/IDiscordRestChannelAPI.cs
index 9e6aea54d5..8b8ef96c4a 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Rest/IDiscordRestChannelAPI.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Rest/IDiscordRestChannelAPI.cs
@@ -380,6 +380,52 @@ Task> ModifyForumChannelAsync
CancellationToken ct = default
);
+ ///
+ /// Modifies the given media channel.
+ ///
+ /// The ID of the channel.
+ /// The new name of the channel.
+ /// The new position of the channel in the listing.
+ /// The new topic of the channel. Max 1024 characters (4096 for forums).
+ /// The new NSFW status of the channel.
+ /// The new rate limit per user.
+ /// The new permission overwrites.
+ /// The new parent category ID.
+ ///
+ /// The default time of inactivity after which threads in the channel are archived.
+ ///
+ /// The new channel flags.
+ ///
+ /// The set of tags that can be used in a forum channel. Only "name" is required to be set.
+ ///
+ /// The emoji to show in the add reaction button on threads in a forum.
+ ///
+ /// The initial to set on new threads in a forum channel.
+ ///
+ /// The default sort order of posts.
+ /// The reason to mark the action in the audit log with.
+ /// The cancellation token for this operation.
+ /// A modification result which may or may not have succeeded.
+ Task> ModifyMediaChannelAsync
+ (
+ Snowflake channelID,
+ Optional name = default,
+ Optional position = default,
+ Optional topic = default,
+ Optional isNsfw = default,
+ Optional rateLimitPerUser = default,
+ Optional?> permissionOverwrites = default,
+ Optional parentID = default,
+ Optional defaultAutoArchiveDuration = default,
+ Optional flags = default,
+ Optional> availableTags = default,
+ Optional defaultReactionEmoji = default,
+ Optional defaultThreadRateLimitPerUser = default,
+ Optional defaultSortOrder = default,
+ Optional reason = default,
+ CancellationToken ct = default
+ );
+
///
/// Deletes a channel by its ID.
///
@@ -462,6 +508,7 @@ Task> GetChannelMessageAsync
/// mentioned in this parameter will be deleted.
///
/// The message flags.
+ /// Indicates whether messages should be deduplicated using the passed nonce.
/// The cancellation token for this operation.
/// A creation result which may or may not have succeeded.
Task> CreateMessageAsync
@@ -477,6 +524,7 @@ Task> CreateMessageAsync
Optional> stickerIDs = default,
Optional>> attachments = default,
Optional flags = default,
+ Optional enforceNonce = default,
CancellationToken ct = default
);
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Rest/IDiscordRestGuildAPI.cs b/Backend/Remora.Discord.API.Abstractions/API/Rest/IDiscordRestGuildAPI.cs
index 8d84bc1e62..9fe76b3b58 100644
--- a/Backend/Remora.Discord.API.Abstractions/API/Rest/IDiscordRestGuildAPI.cs
+++ b/Backend/Remora.Discord.API.Abstractions/API/Rest/IDiscordRestGuildAPI.cs
@@ -205,6 +205,9 @@ Task>> GetGuildChannelsAsync
/// The tags that can be used in a forum channel.
/// The default sort order of posts.
/// The default layout of forums.
+ ///
+ /// The initial rate limit per user to set on newly created threads in a channel.
+ ///
/// The reason to mark the action in the audit log with.
/// The cancellation token for this operation.
/// A creation result which may or may not have succeeded.
@@ -228,6 +231,7 @@ Task> CreateGuildChannelAsync
Optional?> availableTags = default,
Optional defaultSortOrder = default,
Optional defaultForumLayout = default,
+ Optional defaultThreadRateLimitPerUser = default,
Optional reason = default,
CancellationToken ct = default
);
@@ -244,6 +248,9 @@ Task> CreateGuildChannelAsync
/// The ID of the parent category of the new channel.
/// Whether the new channel is NSFW.
/// The default auto archival duration for threads.
+ ///
+ /// The initial rate limit per user to set on newly created threads in a channel.
+ ///
/// The reason to mark the action in the audit log with.
/// The cancellation token for this operation.
/// A creation result which may or may not have succeeded.
@@ -258,6 +265,7 @@ Task> CreateGuildTextChannelAsync
Optional parentID = default,
Optional isNsfw = default,
Optional defaultAutoArchiveDuration = default,
+ Optional defaultThreadRateLimitPerUser = default,
Optional reason = default,
CancellationToken ct = default
);
@@ -273,6 +281,9 @@ Task> CreateGuildTextChannelAsync
/// The ID of the parent category of the new channel.
/// Whether the new channel is NSFW.
/// The default auto archival duration for threads.
+ ///
+ /// The initial rate limit per user to set on newly created threads in a channel.
+ ///
/// The reason to mark the action in the audit log with.
/// The cancellation token for this operation.
/// A creation result which may or may not have succeeded.
@@ -286,6 +297,7 @@ Task> CreateGuildAnnouncementChannelAsync
Optional parentID = default,
Optional isNsfw = default,
Optional defaultAutoArchiveDuration = default,
+ Optional defaultThreadRateLimitPerUser = default,
Optional reason = default,
CancellationToken ct = default
);
@@ -296,6 +308,7 @@ Task> CreateGuildAnnouncementChannelAsync
/// The ID of the guild.
/// The name of the new channel.
/// The topic of the new channel.
+ /// The number of seconds a user has to wait between messages.
/// The sorting position of the new channel.
/// The permission overwrites of the new channel.
/// The ID of the parent category of the new channel.
@@ -305,6 +318,9 @@ Task> CreateGuildAnnouncementChannelAsync
/// The tags that can be used in a forum channel.
/// The default sort order of posts.
/// The default layout of forums.
+ ///
+ /// The initial rate limit per user to set on newly created threads in a channel.
+ ///
/// The reason to mark the action in the audit log with.
/// The cancellation token for this operation.
/// A creation result which may or may not have succeeded.
@@ -313,6 +329,7 @@ Task> CreateGuildForumChannelAsync
Snowflake guildID,
string name,
Optional topic = default,
+ Optional rateLimitPerUser = default,
Optional position = default,
Optional?> permissionOverwrites = default,
Optional parentID = default,
@@ -322,6 +339,45 @@ Task> CreateGuildForumChannelAsync
Optional?> availableTags = default,
Optional defaultSortOrder = default,
Optional defaultForumLayout = default,
+ Optional defaultThreadRateLimitPerUser = default,
+ Optional reason = default,
+ CancellationToken ct = default
+ );
+
+ ///
+ /// Creates a new forum channel for the guild.
+ ///
+ /// The ID of the guild.
+ /// The name of the new channel.
+ /// The topic of the new channel.
+ /// The number of seconds a user has to wait between messages.
+ /// The sorting position of the new channel.
+ /// The permission overwrites of the new channel.
+ /// The ID of the parent category of the new channel.
+ /// The default auto archival duration for threads.
+ /// The default emoji to show in reaction buttons of forum posts.
+ /// The tags that can be used in a forum channel.
+ /// The default sort order of posts.
+ ///
+ /// The initial rate limit per user to set on newly created threads in a channel.
+ ///
+ /// The reason to mark the action in the audit log with.
+ /// The cancellation token for this operation.
+ /// A creation result which may or may not have succeeded.
+ Task> CreateGuildMediaChannelAsync
+ (
+ Snowflake guildID,
+ string name,
+ Optional topic = default,
+ Optional rateLimitPerUser = default,
+ Optional position = default,
+ Optional?> permissionOverwrites = default,
+ Optional parentID = default,
+ Optional defaultAutoArchiveDuration = default,
+ Optional defaultReactionEmoji = default,
+ Optional?> availableTags = default,
+ Optional defaultSortOrder = default,
+ Optional defaultThreadRateLimitPerUser = default,
Optional reason = default,
CancellationToken ct = default
);
@@ -667,6 +723,26 @@ Task RemoveGuildBanAsync
CancellationToken ct = default
);
+ ///
+ /// Bans up to 200 users from the given guild.
+ ///
+ /// The ID of the guild.
+ /// The IDs of the users to ban.
+ ///
+ /// The number of seconds to delete messages for (0-604800). Defaults to 0.
+ ///
+ /// The reason to mark the action in the audit log with.
+ /// The cancellation token for this operation.
+ /// The bulk banning response.
+ Task> BulkGuildBanAsync
+ (
+ Snowflake guildID,
+ IReadOnlyList userIDs,
+ Optional deleteMessageSeconds = default,
+ Optional reason = default,
+ CancellationToken ct = default
+ );
+
///
/// Gets the roles in the guild.
///
diff --git a/Backend/Remora.Discord.API.Abstractions/API/Rest/IDiscordRestMonetizationAPI.cs b/Backend/Remora.Discord.API.Abstractions/API/Rest/IDiscordRestMonetizationAPI.cs
new file mode 100644
index 0000000000..a3a75995a9
--- /dev/null
+++ b/Backend/Remora.Discord.API.Abstractions/API/Rest/IDiscordRestMonetizationAPI.cs
@@ -0,0 +1,118 @@
+//
+// IDiscordRestMonetizationAPI.cs
+//
+// Author:
+// Jarl Gullberg
+//
+// Copyright (c) Jarl Gullberg
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+using JetBrains.Annotations;
+using Remora.Discord.API.Abstractions.Objects;
+using Remora.Rest.Core;
+using Remora.Results;
+
+namespace Remora.Discord.API.Abstractions.Rest;
+
+///
+/// Represents the Discord Monetization API.
+///
+[PublicAPI]
+public interface IDiscordRestMonetizationAPI
+{
+ ///
+ /// Gets all entitlements for a given application.
+ ///
+ /// The ID of the application.
+ /// The ID of the user to limit the search to.
+ /// The SKUs to limit the search to.
+ /// The entitlement to search before.
+ /// The entitlement to search after.
+ /// The maximum number of entitlements to return (1-100). Defaults to 100.
+ /// The ID of the guild to limit the search to.
+ /// Whether to exclude expired entitlements.
+ /// The cancellation token for this operation.
+ /// The entitlements.
+ Task>> ListEntitlementsAsync
+ (
+ Snowflake applicationID,
+ Optional userID = default,
+ Optional> skuIDs = default,
+ Optional before = default,
+ Optional after = default,
+ Optional limit = default,
+ Optional guildID = default,
+ Optional excludeEnded = default,
+ CancellationToken ct = default
+ );
+
+ ///
+ /// Marks the given one-time purchase item as consumed.
+ ///
+ /// The ID of the application.
+ /// The ID of the entitlement.
+ /// The cancellation token for this operation.
+ /// A value representing the result of the operation.
+ Task ConsumeEntitlementAsync
+ (
+ Snowflake applicationID,
+ Snowflake entitlementID,
+ CancellationToken ct = default
+ );
+
+ ///
+ /// Creates a test entitlement to a given SKU for a given guild or user.
+ ///
+ /// The ID of the application.
+ /// The ID of the SKU to grant the entitlement for.
+ /// The ID of the guild or user to grant the entitlement to.
+ /// The type of the owner.
+ /// The cancellation token for this operation.
+ /// The test entitlement.
+ Task> CreateTestEntitlementAsync
+ (
+ Snowflake applicationID,
+ Snowflake skuID,
+ Snowflake ownerID,
+ EntitlementOwnerType ownerType,
+ CancellationToken ct = default
+ );
+
+ ///