types(GuildSoundboardSoundManager): nullable emoji and volume

This commit is contained in:
Danial Raza
2026-09-10 12:16:17 +02:00
parent a4116036be
commit 05a0b9c60a
3 changed files with 14 additions and 6 deletions
@@ -75,9 +75,9 @@ class GuildSoundboardSoundManager extends CachedManager {
* @property {BufferResolvable|Stream} file The file for the soundboard sound
* @property {string} name The name for the soundboard sound
* @property {string} [contentType] The content type for the soundboard sound file
* @property {number} [volume] The volume (a double) for the soundboard sound, from 0 (inclusive) to 1. Defaults to 1
* @property {Snowflake} [emojiId] The emoji id for the soundboard sound
* @property {string} [emojiName] The emoji name for the soundboard sound
* @property {?number} [volume] The volume (a double) for the soundboard sound, from 0 (inclusive) to 1. Defaults to 1
* @property {?Snowflake} [emojiId] The emoji id for the soundboard sound
* @property {?string} [emojiName] The emoji name for the soundboard sound
* @property {string} [reason] The reason for creating the soundboard sound
*/
+3 -3
View File
@@ -4625,12 +4625,12 @@ export class GuildScheduledEventManager extends CachedManager<
export interface GuildSoundboardSoundCreateOptions {
contentType?: string;
emojiId?: Snowflake;
emojiName?: string;
emojiId?: Snowflake | null;
emojiName?: string | null;
file: BufferResolvable | Stream;
name: string;
reason?: string;
volume?: number;
volume?: number | null;
}
export interface GuildSoundboardSoundEditOptions {
@@ -833,6 +833,14 @@ declare const slashCommandBuilder: ChatInputCommandBuilder;
declare const contextMenuCommandBuilder: ContextMenuCommandBuilder;
declare const guild: Guild;
await guild.soundboardSounds.create({
file: './sound.mp3',
name: 'sound',
emojiId: null,
emojiName: null,
volume: null,
});
client.on('clientReady', async client => {
expectType<Client<true>>(client);
console.log(`Client is logged in as ${client.user.tag} and ready!`);