Skip to content

Commit

Permalink
Add SoundboardSound gateway classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Doc94 committed Oct 20, 2024
1 parent 4785b98 commit 9116a9d
Show file tree
Hide file tree
Showing 7 changed files with 181 additions and 0 deletions.
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();

}
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();

}
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();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
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 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();
}

@JsonUnwrapped
List<SoundboardSoundData> soundboardSound();

}
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();

}
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();

}
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();

}

0 comments on commit 9116a9d

Please sign in to comment.