mirror of
https://github.com/discordjs/discord.js.git
synced 2026-09-17 08:47:27 +00:00
types(GuildSoundboardSoundManager): nullable emoji and volume
This commit is contained in:
@@ -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
@@ -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!`);
|
||||
|
||||
Reference in New Issue
Block a user