Skip to content
This repository has been archived by the owner on Jul 11, 2021. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/auguwu/Wumpcord
Browse files Browse the repository at this point in the history
  • Loading branch information
Noel committed Feb 11, 2021
2 parents d9025b4 + 386999e commit 7ce66df
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 35 deletions.
4 changes: 2 additions & 2 deletions src/models/Guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,13 +461,13 @@ export class Guild extends Base<IGuild> {
this.members.cache = event.members;
if (limit && event.members.size >= limit) {
clearTimeout(timeout);
this.client.remove('guildMembersChunk', handler);
this.client.removeListener('guildMembersChunk', handler);

return resolve(event.members);
}

clearTimeout(timeout);
this.client.remove('guildMembersChunk', handler);
this.client.removeListener('guildMembersChunk', handler);
return resolve(event.members);
};

Expand Down
3 changes: 1 addition & 2 deletions src/voice/VoiceConnectionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import type { GatewayVoiceServerUpdateDispatchData } from 'discord-api-types';
import type WebSocketClient from '../gateway/WebSocketClient';
import VoiceConnection from './VoiceConnection';
import { Collection } from '@augu/collections';
import type { User } from '../models';

interface PendingGuild {
resolve(connection: VoiceConnection): void;
Expand Down Expand Up @@ -111,7 +110,7 @@ export default class VoiceConnectionManager extends Collection<string, VoiceConn
this.debug(`Established a voice connection (guild_id=${data.guild_id})`);
pending.resolve(connection);

connection.remove('establish', establishHandler);
connection.removeListener('establish', establishHandler);
delete this.pending[data.guild_id];
};

Expand Down
31 changes: 0 additions & 31 deletions tests/Utilities.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
*/

import Permissions from '../src/util/Permissions';
import EventBus from '../src/util/EventBus';
import Util from '../src/util';

describe('Util', () => {
Expand All @@ -39,36 +38,6 @@ describe('Util', () => {
});
});

interface EventBusMap {
test(message: string): void;
}

describe('EventBus', () => {
let bus!: EventBus<EventBusMap>;

beforeAll(() => {
bus = new EventBus();
});

afterEach(() => bus.removeAllListeners());

it('should return `test` as the message content', () => {
bus.on('test', (msg) => {
expect(msg).toStrictEqual('test');
});

bus.emit('test', 'test');
});

it('should not return `test` as the message content', () => {
bus.on('test', msg => {
expect(msg).not.toStrictEqual('test');
});

bus.emit('test', 'ea sports');
});
});

describe('Permissions', () => {
let permissions: Permissions;

Expand Down

0 comments on commit 7ce66df

Please sign in to comment.