-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Soundboard #196
Open
Doc94
wants to merge
4
commits into
Discord4J:1.6.x
Choose a base branch
from
Doc94:feature/add-soundboard
base: 1.6.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add Soundboard #196
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/main/java/discord4j/discordjson/json/SendSoundboardSoundRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package discord4j.discordjson.json; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import discord4j.discordjson.Id; | ||
import discord4j.discordjson.possible.Possible; | ||
import org.immutables.value.Value; | ||
|
||
@Value.Immutable | ||
@JsonSerialize(as = ImmutableSendSoundboardSoundRequest.class) | ||
@JsonDeserialize(as = ImmutableSendSoundboardSoundRequest.class) | ||
public interface SendSoundboardSoundRequest { | ||
|
||
static ImmutableSendSoundboardSoundRequest.Builder builder() { | ||
return ImmutableSendSoundboardSoundRequest.builder(); | ||
} | ||
|
||
@JsonProperty("sound_id") | ||
Id soundId(); | ||
|
||
@JsonProperty("source_guild_id") | ||
Possible<Id> sourceGuildId(); | ||
|
||
} |
32 changes: 32 additions & 0 deletions
32
src/main/java/discord4j/discordjson/json/SoundboardSoundCreateRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package discord4j.discordjson.json; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import discord4j.discordjson.Id; | ||
import discord4j.discordjson.possible.Possible; | ||
import java.util.Optional; | ||
import org.immutables.value.Value; | ||
|
||
@Value.Immutable | ||
@JsonSerialize(as = ImmutableSoundboardSoundCreateRequest.class) | ||
@JsonDeserialize(as = ImmutableSoundboardSoundCreateRequest.class) | ||
public interface SoundboardSoundCreateRequest { | ||
|
||
static ImmutableSoundboardSoundCreateRequest.Builder builder() { | ||
return ImmutableSoundboardSoundCreateRequest.builder(); | ||
} | ||
|
||
String name(); | ||
|
||
String sound(); | ||
|
||
Possible<Optional<Double>> volume(); | ||
|
||
@JsonProperty("emoji_id") | ||
Possible<Optional<Id>> emojiId(); | ||
|
||
@JsonProperty("emoji_name") | ||
Possible<Optional<String>> emojiName(); | ||
|
||
} |
41 changes: 41 additions & 0 deletions
41
src/main/java/discord4j/discordjson/json/SoundboardSoundData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package discord4j.discordjson.json; | ||
|
||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import discord4j.discordjson.Id; | ||
import discord4j.discordjson.possible.Possible; | ||
import java.util.Optional; | ||
import org.immutables.value.Value; | ||
|
||
@Value.Immutable | ||
@JsonSerialize(as = ImmutableSoundboardSoundData.class) | ||
@JsonDeserialize(as = ImmutableSoundboardSoundData.class) | ||
public interface SoundboardSoundData { | ||
|
||
static ImmutableSoundboardSoundData.Builder builder() { | ||
return ImmutableSoundboardSoundData.builder(); | ||
} | ||
|
||
String name(); | ||
|
||
@JsonProperty("sound_id") | ||
Id soundId(); | ||
|
||
double volume(); | ||
|
||
@JsonProperty("emoji_id") | ||
Optional<Id> emojiId(); | ||
|
||
@JsonProperty("emoji_name") | ||
Optional<String> emojiName(); | ||
|
||
@JsonProperty("guild_id") | ||
Possible<Id> guildId(); | ||
|
||
boolean available(); | ||
|
||
Possible<UserData> user(); | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/discord4j/discordjson/json/SoundboardSoundDataList.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package discord4j.discordjson.json; | ||
|
||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import java.util.List; | ||
import org.immutables.value.Value; | ||
|
||
@Value.Immutable | ||
@JsonSerialize(as = ImmutableSoundboardSoundDataList.class) | ||
@JsonDeserialize(as = ImmutableSoundboardSoundDataList.class) | ||
public interface SoundboardSoundDataList { | ||
|
||
static ImmutableSoundboardSoundDataList.Builder builder() { | ||
return ImmutableSoundboardSoundDataList.builder(); | ||
} | ||
|
||
List<SoundboardSoundData> items(); | ||
|
||
} |
32 changes: 32 additions & 0 deletions
32
src/main/java/discord4j/discordjson/json/SoundboardSoundModifyRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package discord4j.discordjson.json; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import discord4j.discordjson.Id; | ||
import discord4j.discordjson.possible.Possible; | ||
import java.util.Optional; | ||
import org.immutables.value.Value; | ||
|
||
@Value.Immutable | ||
@JsonSerialize(as = ImmutableSoundboardSoundModifyRequest.class) | ||
@JsonDeserialize(as = ImmutableSoundboardSoundModifyRequest.class) | ||
public interface SoundboardSoundModifyRequest { | ||
|
||
static ImmutableSoundboardSoundModifyRequest.Builder builder() { | ||
return ImmutableSoundboardSoundModifyRequest.builder(); | ||
} | ||
|
||
Possible<String> name(); | ||
|
||
Possible<String> sound(); | ||
|
||
Possible<Optional<Double>> volume(); | ||
|
||
@JsonProperty("emoji_id") | ||
Possible<Optional<Id>> emojiId(); | ||
|
||
@JsonProperty("emoji_name") | ||
Possible<Optional<String>> emojiName(); | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/discord4j/discordjson/json/gateway/GuildSoundboardSoundCreate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package discord4j.discordjson.json.gateway; | ||
|
||
import com.fasterxml.jackson.annotation.JsonUnwrapped; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import discord4j.discordjson.json.SoundboardSoundData; | ||
import org.immutables.value.Value; | ||
|
||
@Value.Immutable | ||
@JsonSerialize(as = ImmutableGuildSoundboardSoundCreate.class) | ||
@JsonDeserialize(as = ImmutableGuildSoundboardSoundCreate.class) | ||
public interface GuildSoundboardSoundCreate extends Dispatch { | ||
|
||
static ImmutableGuildSoundboardSoundCreate.Builder builder() { | ||
return ImmutableGuildSoundboardSoundCreate.builder(); | ||
} | ||
|
||
@JsonUnwrapped | ||
SoundboardSoundData soundboardSound(); | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/discord4j/discordjson/json/gateway/GuildSoundboardSoundDelete.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package discord4j.discordjson.json.gateway; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import discord4j.discordjson.Id; | ||
import org.immutables.value.Value; | ||
|
||
@Value.Immutable | ||
@JsonSerialize(as = ImmutableGuildSoundboardSoundDelete.class) | ||
@JsonDeserialize(as = ImmutableGuildSoundboardSoundDelete.class) | ||
public interface GuildSoundboardSoundDelete extends Dispatch { | ||
|
||
static ImmutableGuildSoundboardSoundDelete.Builder builder() { | ||
return ImmutableGuildSoundboardSoundDelete.builder(); | ||
} | ||
|
||
@JsonProperty("sound_id") | ||
Id soundId(); | ||
|
||
@JsonProperty("guild_id") | ||
Id guildId(); | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/discord4j/discordjson/json/gateway/GuildSoundboardSoundUpdate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package discord4j.discordjson.json.gateway; | ||
|
||
import com.fasterxml.jackson.annotation.JsonUnwrapped; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import discord4j.discordjson.json.SoundboardSoundData; | ||
import org.immutables.value.Value; | ||
|
||
@Value.Immutable | ||
@JsonSerialize(as = ImmutableGuildSoundboardSoundUpdate.class) | ||
@JsonDeserialize(as = ImmutableGuildSoundboardSoundUpdate.class) | ||
public interface GuildSoundboardSoundUpdate extends Dispatch { | ||
|
||
static ImmutableGuildSoundboardSoundUpdate.Builder builder() { | ||
return ImmutableGuildSoundboardSoundUpdate.builder(); | ||
} | ||
|
||
@JsonUnwrapped | ||
SoundboardSoundData soundboardSound(); | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/discord4j/discordjson/json/gateway/GuildSoundboardSoundsUpdate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package discord4j.discordjson.json.gateway; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import discord4j.discordjson.Id; | ||
import discord4j.discordjson.json.SoundboardSoundData; | ||
import java.util.List; | ||
import org.immutables.value.Value; | ||
|
||
@Value.Immutable | ||
@JsonSerialize(as = ImmutableGuildSoundboardSoundsUpdate.class) | ||
@JsonDeserialize(as = ImmutableGuildSoundboardSoundsUpdate.class) | ||
public interface GuildSoundboardSoundsUpdate extends Dispatch { | ||
|
||
static ImmutableGuildSoundboardSoundsUpdate.Builder builder() { | ||
return ImmutableGuildSoundboardSoundsUpdate.builder(); | ||
} | ||
|
||
@JsonProperty("soundboard_sounds") | ||
List<SoundboardSoundData> soundboardSounds(); | ||
|
||
@JsonProperty("guild_id") | ||
Id guildId(); | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
src/main/java/discord4j/discordjson/json/gateway/RequestSoundboardSounds.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package discord4j.discordjson.json.gateway; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import discord4j.discordjson.Id; | ||
import java.util.List; | ||
import org.immutables.value.Value; | ||
|
||
@Value.Immutable | ||
@JsonSerialize(as = ImmutableRequestSoundboardSounds.class) | ||
@JsonDeserialize(as = ImmutableRequestSoundboardSounds.class) | ||
public interface RequestSoundboardSounds extends PayloadData { | ||
|
||
static ImmutableRequestSoundboardSounds.Builder builder() { | ||
return ImmutableRequestSoundboardSounds.builder(); | ||
} | ||
|
||
@JsonProperty("guild_ids") | ||
List<Id> guildIds(); | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/discord4j/discordjson/json/gateway/SoundboardSounds.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package discord4j.discordjson.json.gateway; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import discord4j.discordjson.Id; | ||
import discord4j.discordjson.json.SoundboardSoundData; | ||
import java.util.List; | ||
import org.immutables.value.Value; | ||
|
||
@Value.Immutable | ||
@JsonSerialize(as = ImmutableGuildSoundboardSoundCreate.class) | ||
@JsonDeserialize(as = ImmutableGuildSoundboardSoundCreate.class) | ||
public interface SoundboardSounds extends Dispatch { | ||
|
||
static ImmutableGuildSoundboardSoundCreate.Builder builder() { | ||
return ImmutableGuildSoundboardSoundCreate.builder(); | ||
} | ||
|
||
@JsonProperty("soundboard_sounds") | ||
List<SoundboardSoundData> soundboardSounds(); | ||
|
||
@JsonProperty("guild_id") | ||
Id guildId(); | ||
|
||
} |
45 changes: 45 additions & 0 deletions
45
src/main/java/discord4j/discordjson/json/gateway/VoiceChannelEffectSend.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package discord4j.discordjson.json.gateway; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import discord4j.discordjson.Id; | ||
import discord4j.discordjson.json.EmojiData; | ||
import discord4j.discordjson.possible.Possible; | ||
import java.util.Optional; | ||
import javax.annotation.Nullable; | ||
import org.immutables.value.Value; | ||
|
||
@Value.Immutable | ||
@JsonSerialize(as = ImmutableVoiceChannelEffectSend.class) | ||
@JsonDeserialize(as = ImmutableVoiceChannelEffectSend.class) | ||
public interface VoiceChannelEffectSend extends Dispatch { | ||
|
||
static ImmutableVoiceChannelEffectSend.Builder builder() { | ||
return ImmutableVoiceChannelEffectSend.builder(); | ||
} | ||
|
||
@JsonProperty("channel_id") | ||
Id channelId(); | ||
|
||
@JsonProperty("guild_id") | ||
Id guildId(); | ||
|
||
@JsonProperty("user_id") | ||
Id userId(); | ||
|
||
Possible<Optional<EmojiData>> emoji(); | ||
|
||
@JsonProperty("animation_type") | ||
Possible<Optional<Integer>> animationType(); | ||
|
||
@JsonProperty("animation_id") | ||
Possible<Integer> animationId(); | ||
|
||
@JsonProperty("sound_id") | ||
Possible<Integer> soundId(); | ||
|
||
@JsonProperty("sound_volume") | ||
Possible<Double> soundVolume(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[ | ||
{ | ||
"name": "Yay", | ||
"sound_id": "1106714396018884649", | ||
"volume": 1, | ||
"emoji_id": "989193655938064464", | ||
"emoji_name": null, | ||
"guild_id": "613425648685547541", | ||
"available": true | ||
}, | ||
{ | ||
"name": "quack", | ||
"sound_id": "1", | ||
"volume": 1.0, | ||
"emoji_id": null, | ||
"emoji_name": "🦆", | ||
"available": true | ||
} | ||
] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
discord/discord-api-docs@49c7842