-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
12e5106
commit 514c1e6
Showing
4 changed files
with
142 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import type { RequestData, REST } from '@discordjs/rest'; | ||
import { Routes, type RESTGetAPISoundboardDefaultSoundsResult } from 'discord-api-types/v10'; | ||
|
||
export class SoundboardSoundsAPI { | ||
public constructor(private readonly rest: REST) {} | ||
|
||
/** | ||
* Fetches all the soundboard default sounds. | ||
* | ||
* @see {@link https://discord.com/developers/docs/resources/soundboard#list-default-soundboard-sounds} | ||
* @param options - The options for fetching the soundboard default sounds. | ||
*/ | ||
public async getSoundboardDefaultSounds({ signal }: Pick<RequestData, 'signal'> = {}) { | ||
return this.rest.get(Routes.soundboardDefaultSounds(), { | ||
signal, | ||
}) as Promise<RESTGetAPISoundboardDefaultSoundsResult>; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters