mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-01-16 02:21:01 -07:00
31 lines
496 B
TypeScript
31 lines
496 B
TypeScript
import Stream from './stream';
|
|
import StreamManager from './stream-manager';
|
|
|
|
/**
|
|
* Drive stream connection
|
|
*/
|
|
export class DriveStream extends Stream {
|
|
constructor(me) {
|
|
super('drive', {
|
|
i: me.token
|
|
});
|
|
}
|
|
}
|
|
|
|
export class DriveStreamManager extends StreamManager<DriveStream> {
|
|
private me;
|
|
|
|
constructor(me) {
|
|
super();
|
|
|
|
this.me = me;
|
|
}
|
|
|
|
public getConnection() {
|
|
if (this.connection == null) {
|
|
this.connection = new DriveStream(this.me);
|
|
}
|
|
|
|
return this.connection;
|
|
}
|
|
}
|