Skip to content

Commit

Permalink
Event docs
Browse files Browse the repository at this point in the history
  • Loading branch information
freya022 committed Oct 18, 2024
1 parent a717169 commit bd70ed4
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@
import net.dv8tion.jda.api.entities.channel.Channel;
import net.dv8tion.jda.api.entities.channel.VoiceChannelEffect;
import net.dv8tion.jda.api.entities.channel.concrete.VoiceChannel;
import net.dv8tion.jda.api.requests.GatewayIntent;

import javax.annotation.Nonnull;

/**
* Indicates that a {@link VoiceChannelEffect voice channel effect} was sent in a {@link VoiceChannel}.
*
* <p><b>Requirements</b><br>
* This event requires {@link GatewayIntent#GUILD_VOICE_STATES} to be enabled.
*/
public class VoiceChannelEffectSendEvent extends GenericChannelEvent
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,24 @@
package net.dv8tion.jda.api.events.soundboard;

import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.JDABuilder;
import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.SoundboardSound;
import net.dv8tion.jda.api.events.Event;
import net.dv8tion.jda.api.requests.GatewayIntent;
import net.dv8tion.jda.api.utils.cache.CacheFlag;

import javax.annotation.Nonnull;

/**
* Indicates that a {@link SoundboardSound} was created/deleted/updated.
*
* <p><b>Requirements</b><br>
* These events require {@link CacheFlag#SOUNDBOARD_SOUNDS} to be enabled,
* which requires {@link GatewayIntent#GUILD_EMOJIS_AND_STICKERS}.
*
* <br>{@link JDABuilder#createLight(String) createLight(String)} disables that CacheFlag by default!
*/
public abstract class GenericSoundboardSoundEvent extends Event
{
private final SoundboardSound soundboardSound;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,22 @@
package net.dv8tion.jda.api.events.soundboard;

import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.JDABuilder;
import net.dv8tion.jda.api.entities.SoundboardSound;
import net.dv8tion.jda.api.requests.GatewayIntent;
import net.dv8tion.jda.api.utils.cache.CacheFlag;

import javax.annotation.Nonnull;

/**
* Indicates that a {@link SoundboardSound} was created.
*
* <p><b>Requirements</b><br>
* This event require {@link CacheFlag#SOUNDBOARD_SOUNDS} to be enabled,
* which requires {@link GatewayIntent#GUILD_EMOJIS_AND_STICKERS}.
*
* <br>{@link JDABuilder#createLight(String) createLight(String)} disables that CacheFlag by default!
*/
public class SoundboardSoundCreateEvent extends GenericSoundboardSoundEvent
{
public SoundboardSoundCreateEvent(@Nonnull JDA api, long responseNumber, @Nonnull SoundboardSound soundboardSound)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,22 @@
package net.dv8tion.jda.api.events.soundboard;

import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.JDABuilder;
import net.dv8tion.jda.api.entities.SoundboardSound;
import net.dv8tion.jda.api.requests.GatewayIntent;
import net.dv8tion.jda.api.utils.cache.CacheFlag;

import javax.annotation.Nonnull;

/**
* Indicates that a {@link SoundboardSound} was deleted.
*
* <p><b>Requirements</b><br>
* This event require {@link CacheFlag#SOUNDBOARD_SOUNDS} to be enabled,
* which requires {@link GatewayIntent#GUILD_EMOJIS_AND_STICKERS}.
*
* <br>{@link JDABuilder#createLight(String) createLight(String)} disables that CacheFlag by default!
*/
public class SoundboardSoundDeleteEvent extends GenericSoundboardSoundEvent
{
public SoundboardSoundDeleteEvent(@Nonnull JDA api, long responseNumber, @Nonnull SoundboardSound soundboardSound)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
* and {@link net.dv8tion.jda.api.events.soundboard.SoundboardSoundDeleteEvent deleted soundboard sounds}.
*
* <p><b>Requirements</b><br>
*
* <p>These events require the {@link net.dv8tion.jda.api.utils.cache.CacheFlag#SOUNDBOARD_SOUNDS SOUNDBOARD_SOUNDS} CacheFlag to be enabled, which requires
* the {@link net.dv8tion.jda.api.requests.GatewayIntent#GUILD_EMOJIS_AND_STICKERS GUILD_EMOJIS_AND_STICKERS} intent.
* These events require {@link net.dv8tion.jda.api.utils.cache.CacheFlag#SOUNDBOARD_SOUNDS} to be enabled,
* which requires {@link net.dv8tion.jda.api.requests.GatewayIntent#GUILD_EMOJIS_AND_STICKERS}.
*
* <br>{@link net.dv8tion.jda.api.JDABuilder#createLight(String) createLight(String)} disables that CacheFlag by default!
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,24 @@
package net.dv8tion.jda.api.events.soundboard.update;

import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.JDABuilder;
import net.dv8tion.jda.api.entities.SoundboardSound;
import net.dv8tion.jda.api.events.UpdateEvent;
import net.dv8tion.jda.api.events.soundboard.GenericSoundboardSoundEvent;
import net.dv8tion.jda.api.requests.GatewayIntent;
import net.dv8tion.jda.api.utils.cache.CacheFlag;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

/**
* Indicates that a {@link SoundboardSound soundboard sound} was updated.
* Indicates that a {@link SoundboardSound} was updated.
*
* <p><b>Requirements</b><br>
* These events require {@link CacheFlag#SOUNDBOARD_SOUNDS} to be enabled,
* which requires {@link GatewayIntent#GUILD_EMOJIS_AND_STICKERS}.
*
* <p>These events require the {@link net.dv8tion.jda.api.utils.cache.CacheFlag#SOUNDBOARD_SOUNDS SOUNDBOARD_SOUNDS} CacheFlag to be enabled, which requires
* the {@link net.dv8tion.jda.api.requests.GatewayIntent#GUILD_EMOJIS_AND_STICKERS GUILD_EMOJIS_AND_STICKERS} intent.
*
* <br>{@link net.dv8tion.jda.api.JDABuilder#createLight(String) createLight(String)} disables that CacheFlag by default!
* <br>{@link JDABuilder#createLight(String) createLight(String)} disables that CacheFlag by default!
*/
public abstract class GenericSoundboardSoundUpdateEvent<T> extends GenericSoundboardSoundEvent implements UpdateEvent<SoundboardSound, T>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,25 @@
package net.dv8tion.jda.api.events.soundboard.update;

import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.JDABuilder;
import net.dv8tion.jda.api.entities.SoundboardSound;
import net.dv8tion.jda.api.entities.emoji.EmojiUnion;
import net.dv8tion.jda.api.requests.GatewayIntent;
import net.dv8tion.jda.api.utils.cache.CacheFlag;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

/**
* Indicates that the emoji of a {@link SoundboardSound soundboard sound} changed.
*
* <p>Can be used to retrieve the old emoji
* <p>Can be used to retrieve the old emoji.
*
* <p><b>Requirements</b><br>
* This event require {@link CacheFlag#SOUNDBOARD_SOUNDS} to be enabled,
* which requires {@link GatewayIntent#GUILD_EMOJIS_AND_STICKERS}.
*
* <p>This event requires the {@link net.dv8tion.jda.api.utils.cache.CacheFlag#SOUNDBOARD_SOUNDS SOUNDBOARD_SOUNDS} CacheFlag to be enabled, which requires
* the {@link net.dv8tion.jda.api.requests.GatewayIntent#GUILD_EMOJIS_AND_STICKERS GUILD_EMOJIS_AND_STICKERS} intent.
*
* <br>{@link net.dv8tion.jda.api.JDABuilder#createLight(String) createLight(String)} disables that CacheFlag by default!
* <br>{@link JDABuilder#createLight(String) createLight(String)} disables that CacheFlag by default!
*
* <p>Identifier: {@value IDENTIFIER}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,23 @@
package net.dv8tion.jda.api.events.soundboard.update;

import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.JDABuilder;
import net.dv8tion.jda.api.entities.SoundboardSound;
import net.dv8tion.jda.api.requests.GatewayIntent;
import net.dv8tion.jda.api.utils.cache.CacheFlag;

import javax.annotation.Nonnull;

/**
* Indicates that the name of a {@link SoundboardSound soundboard sound} changed.
*
* <p>Can be used to retrieve the old name
* <p>Can be used to retrieve the old name.
*
* <p><b>Requirements</b><br>
* This event require {@link CacheFlag#SOUNDBOARD_SOUNDS} to be enabled,
* which requires {@link GatewayIntent#GUILD_EMOJIS_AND_STICKERS}.
*
* <p>This event requires the {@link net.dv8tion.jda.api.utils.cache.CacheFlag#SOUNDBOARD_SOUNDS SOUNDBOARD_SOUNDS} CacheFlag to be enabled, which requires
* the {@link net.dv8tion.jda.api.requests.GatewayIntent#GUILD_EMOJIS_AND_STICKERS GUILD_EMOJIS_AND_STICKERS} intent.
*
* <br>{@link net.dv8tion.jda.api.JDABuilder#createLight(String) createLight(String)} disables that CacheFlag by default!
* <br>{@link JDABuilder#createLight(String) createLight(String)} disables that CacheFlag by default!
*
* <p>Identifier: {@value IDENTIFIER}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,23 @@
package net.dv8tion.jda.api.events.soundboard.update;

import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.JDABuilder;
import net.dv8tion.jda.api.entities.SoundboardSound;
import net.dv8tion.jda.api.requests.GatewayIntent;
import net.dv8tion.jda.api.utils.cache.CacheFlag;

import javax.annotation.Nonnull;

/**
* Indicates that the volume of a {@link SoundboardSound soundboard sound} changed.
*
* <p>Can be used to retrieve the old volume
* <p>Can be used to retrieve the old volume.
*
* <p><b>Requirements</b><br>
* This event require {@link CacheFlag#SOUNDBOARD_SOUNDS} to be enabled,
* which requires {@link GatewayIntent#GUILD_EMOJIS_AND_STICKERS}.
*
* <p>This event requires the {@link net.dv8tion.jda.api.utils.cache.CacheFlag#SOUNDBOARD_SOUNDS SOUNDBOARD_SOUNDS} CacheFlag to be enabled, which requires
* the {@link net.dv8tion.jda.api.requests.GatewayIntent#GUILD_EMOJIS_AND_STICKERS GUILD_EMOJIS_AND_STICKERS} intent.
*
* <br>{@link net.dv8tion.jda.api.JDABuilder#createLight(String) createLight(String)} disables that CacheFlag by default!
* <br>{@link JDABuilder#createLight(String) createLight(String)} disables that CacheFlag by default!
*
* <p>Identifier: {@value IDENTIFIER}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
* Events that track updates for existing {@link net.dv8tion.jda.api.entities.SoundboardSound SoundboardSounds}
*
* <p><b>Requirements</b><br>
*
* <p>These events require the {@link net.dv8tion.jda.api.utils.cache.CacheFlag#SOUNDBOARD_SOUNDS SOUNDBOARD_SOUNDS} CacheFlag to be enabled, which requires
* the {@link net.dv8tion.jda.api.requests.GatewayIntent#GUILD_EMOJIS_AND_STICKERS GUILD_EMOJIS_AND_STICKERS} intent.
* These events require {@link net.dv8tion.jda.api.utils.cache.CacheFlag#SOUNDBOARD_SOUNDS} to be enabled,
* which requires {@link net.dv8tion.jda.api.requests.GatewayIntent#GUILD_EMOJIS_AND_STICKERS}.
*
* <br>{@link net.dv8tion.jda.api.JDABuilder#createLight(String) createLight(String)} disables that CacheFlag by default!
*/
Expand Down

0 comments on commit bd70ed4

Please sign in to comment.