updated package.json; refactored code > imports/exports
This commit is contained in:
Vendored
+2
-2
@@ -1,4 +1,4 @@
|
||||
export interface VoiceAudioDataModel {
|
||||
export default interface VoiceAudioDataModel {
|
||||
/**
|
||||
* The unique identifier for the audio resource.
|
||||
*/
|
||||
@@ -9,4 +9,4 @@ export interface VoiceAudioDataModel {
|
||||
* any is to be assumed to require(filepath)
|
||||
*/
|
||||
Resource: string | any;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import {DiscordGatewayAdapterCreator} from "@discordjs/voice";
|
||||
import type {DiscordGatewayAdapterCreator} from "@discordjs/voice";
|
||||
|
||||
export interface VoiceConnectionDataModel {
|
||||
export default interface VoiceConnectionDataModel {
|
||||
/**
|
||||
* The ID of the voice channel to connect to.
|
||||
*/
|
||||
|
||||
@@ -6,12 +6,12 @@ import {
|
||||
joinVoiceChannel,
|
||||
VoiceConnection
|
||||
} from "@discordjs/voice";
|
||||
import {IAudioManager} from "./IAudioManager";
|
||||
import {VoiceConnectionDataModel} from "../Models/VoiceConnectionDataModel";
|
||||
import {VoiceAudioDataModel} from "../Models/VoiceAudioDataModel";
|
||||
import type IAudioManager from "./IAudioManager";
|
||||
import type VoiceConnectionDataModel from "../Models/VoiceConnectionDataModel";
|
||||
import type VoiceAudioDataModel from "../Models/VoiceAudioDataModel";
|
||||
import {join} from "node:path";
|
||||
|
||||
export class AudioManager implements IAudioManager {
|
||||
export default class AudioManager implements IAudioManager {
|
||||
public VoiceConnection: VoiceConnection | null = null;
|
||||
public AudioPlayer: AudioPlayer | null = null;
|
||||
public AudioResource: AudioResource | null = null;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import {AudioPlayer, AudioResource, VoiceConnection} from "@discordjs/voice";
|
||||
import {VoiceAudioDataModel} from "../Models/VoiceAudioDataModel";
|
||||
import {VoiceConnectionDataModel} from "../Models/VoiceConnectionDataModel";
|
||||
import type VoiceConnectionDataModel from "../Models/VoiceConnectionDataModel";
|
||||
import type VoiceAudioDataModel from "../Models/VoiceAudioDataModel";
|
||||
|
||||
export interface IAudioManager {
|
||||
export default interface IAudioManager {
|
||||
OverrideOptions(connectionData?: VoiceConnectionDataModel | null, audioData?: VoiceAudioDataModel | null): void;
|
||||
|
||||
CreateConnection(isRenew: boolean): void;
|
||||
|
||||
+3
-3
@@ -1,3 +1,3 @@
|
||||
export {AudioManager} from "./Services/AudioManager";
|
||||
export type {VoiceConnectionDataModel} from "./Models/VoiceConnectionDataModel";
|
||||
export type {VoiceAudioDataModel} from "./Models/VoiceAudioDataModel";
|
||||
export { default as AudioManager } from './Services/AudioManager';
|
||||
export type { default as VoiceConnectionDataModel } from './Models/VoiceConnectionDataModel';
|
||||
export type { default as VoiceAudioDataModel } from './Models/VoiceAudioDataModel';
|
||||
|
||||
Reference in New Issue
Block a user