@@ -102,7 +102,7 @@ default String getUrl()
102
102
/**
103
103
* The user which created this sound.
104
104
*
105
- * <p>This is present only if the {@link Guild#getSelfMember() current member} has
105
+ * <p>This is present only if the {@link Guild#getSelfMember() self member} has
106
106
* the {@link Permission#CREATE_GUILD_EXPRESSIONS CREATE_GUILD_EXPRESSIONS}
107
107
* or {@link Permission#MANAGE_GUILD_EXPRESSIONS MANAGE_GUILD_EXPRESSIONS} permission.
108
108
*
@@ -116,27 +116,31 @@ default String getUrl()
116
116
* <br>You must be connected to the voice channel to use this method,
117
117
* as well as be able to speak and hear.
118
118
*
119
- * <p>Possible {@link ErrorResponse ErrorResponses} caused by
120
- * the returned {@link RestAction} include the following:
119
+ * <p>The returned {@link RestAction} can encounter the following {@link ErrorResponse ErrorResponses}:
121
120
* <ul>
122
121
* <li>{@link ErrorResponse#MISSING_PERMISSIONS MISSING_PERMISSIONS}
123
122
* <br>The sound cannot be sent due to a permission discrepancy</li>
124
123
* <li>{@link ErrorResponse#CANNOT_SEND_VOICE_EFFECT CANNOT_SEND_VOICE_EFFECT}
125
124
* <br>The sound cannot be sent as the bot is either muted, deafened or suppressed</li>
125
+ * <li>{@link ErrorResponse#UNKNOWN_SOUND UNKNOWN_SOUND}
126
+ * <br>The sound was deleted</li>
126
127
* </ul>
127
128
*
128
129
* @param channel
129
130
* The channel to send this sound on
130
131
*
131
132
* @throws InsufficientPermissionException
132
- * If the logged in account does not have the {@link Permission#VOICE_SPEAK VOICE_SPEAK},
133
- * {@link Permission#VOICE_USE_SOUNDBOARD VOICE_USE_SOUNDBOARD},
134
- * or {@link Permission#VOICE_USE_EXTERNAL_SOUNDS VOICE_USE_EXTERNAL_SOUNDS} permission.
133
+ * If the bot does not have the following permissions:
134
+ * <ul>
135
+ * <li>{@link Permission#VOICE_SPEAK VOICE_SPEAK}, {@link Permission#VOICE_USE_SOUNDBOARD VOICE_USE_SOUNDBOARD}</li>
136
+ * <li>When used in other guilds, {@link Permission#VOICE_USE_EXTERNAL_SOUNDS VOICE_USE_EXTERNAL_SOUNDS} permission</li>
137
+ * </ul>
135
138
* @throws IllegalArgumentException
136
139
* If the provided channel is {@code null}
137
140
* @throws IllegalStateException
138
141
* <ul>
139
142
* <li>If {@link GatewayIntent#GUILD_VOICE_STATES} is not enabled</li>
143
+ * <li>If the sound is not {@link #isAvailable() available}</li>
140
144
* <li>If the bot is not connected to the specified channel</li>
141
145
* <li>If the bot is deafened, muted or suppressed in the target guild</li>
142
146
* </ul>
@@ -147,10 +151,49 @@ default String getUrl()
147
151
@ CheckReturnValue
148
152
RestAction <Void > sendTo (VoiceChannel channel );
149
153
154
+ /**
155
+ * Deletes this soundboard sound.
156
+ *
157
+ * <p>The returned {@link RestAction} can encounter the following {@link ErrorResponse ErrorResponses}:
158
+ * <ul>
159
+ * <li>{@link ErrorResponse#MISSING_PERMISSIONS MISSING_PERMISSIONS}
160
+ * <br>The sound cannot be deleted due to a permission discrepancy</li>
161
+ * <li>{@link ErrorResponse#UNKNOWN_SOUND UNKNOWN_SOUND}
162
+ * <br>The sound was deleted</li>
163
+ * </ul>
164
+ *
165
+ * @throws InsufficientPermissionException
166
+ * <ul>
167
+ * <li>If the bot does not own this sound and does not have {@link Permission#MANAGE_GUILD_EXPRESSIONS}</li>
168
+ * <li>If the bot owns this sound and does not have {@link Permission#MANAGE_GUILD_EXPRESSIONS} or {@link Permission#CREATE_GUILD_EXPRESSIONS}</li>
169
+ * </ul>
170
+ *
171
+ * @return {@link RestAction} - Type: {@link Void}
172
+ */
150
173
@ Nonnull
151
174
@ CheckReturnValue
152
175
RestAction <Void > delete ();
153
176
177
+ /**
178
+ * The {@link SoundboardSoundManager} for this soundboard sound, in which you can modify values.
179
+ * <br>You modify multiple fields in one request by chaining setters before calling {@link RestAction#queue()}.
180
+ *
181
+ * <p>The returned {@link RestAction} can encounter the following {@link ErrorResponse ErrorResponses}:
182
+ * <ul>
183
+ * <li>{@link ErrorResponse#MISSING_PERMISSIONS MISSING_PERMISSIONS}
184
+ * <br>The sound cannot be edited due to a permission discrepancy</li>
185
+ * <li>{@link ErrorResponse#UNKNOWN_SOUND UNKNOWN_SOUND}
186
+ * <br>The sound was deleted</li>
187
+ * </ul>
188
+ *
189
+ * @throws InsufficientPermissionException
190
+ * <ul>
191
+ * <li>If the bot does not own this sound and does not have {@link Permission#MANAGE_GUILD_EXPRESSIONS}</li>
192
+ * <li>If the bot owns this sound and does not have {@link Permission#MANAGE_GUILD_EXPRESSIONS} or {@link Permission#CREATE_GUILD_EXPRESSIONS}</li>
193
+ * </ul>
194
+ *
195
+ * @return The SoundboardSoundManager of this soundboard sound
196
+ */
154
197
@ Nonnull
155
198
@ CheckReturnValue
156
199
SoundboardSoundManager getManager ();
0 commit comments