mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 21:13:30 +01:00
chore: use descriptive type parameter names (#9937)
* chore: use descriptive type parameter names * refactor: requested changes --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -182,9 +182,9 @@ export interface AudioPlayer extends EventEmitter {
|
||||
*
|
||||
* @eventProperty
|
||||
*/
|
||||
on<T extends AudioPlayerStatus>(
|
||||
event: T,
|
||||
listener: (oldState: AudioPlayerState, newState: AudioPlayerState & { status: T }) => void,
|
||||
on<Event extends AudioPlayerStatus>(
|
||||
event: Event,
|
||||
listener: (oldState: AudioPlayerState, newState: AudioPlayerState & { status: Event }) => void,
|
||||
): this;
|
||||
}
|
||||
|
||||
@@ -375,7 +375,7 @@ export class AudioPlayer extends EventEmitter {
|
||||
* @param resource - The resource to play
|
||||
* @throws Will throw if attempting to play an audio resource that has already ended, or is being played by another player
|
||||
*/
|
||||
public play<T>(resource: AudioResource<T>) {
|
||||
public play<Metadata>(resource: AudioResource<Metadata>) {
|
||||
if (resource.ended) {
|
||||
throw new Error('Cannot play a resource that has already ended.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user