fix: fix some typos (#7393)

This commit is contained in:
D Trombett
2022-02-02 22:10:47 +01:00
committed by GitHub
parent 0b866c9fb2
commit 92a04f4d98
4 changed files with 10 additions and 10 deletions

View File

@@ -43,7 +43,7 @@ export class SelectMenuComponent implements Component {
} }
/** /**
* Sets thes minimum values that must be selected in the select menu * Sets the minimum values that must be selected in the select menu
* @param minValues The minimum values that must be selected * @param minValues The minimum values that must be selected
*/ */
public setMinValues(minValues: number) { public setMinValues(minValues: number) {
@@ -53,7 +53,7 @@ export class SelectMenuComponent implements Component {
} }
/** /**
* Sets thes maximum values that must be selected in the select menu * Sets the maximum values that must be selected in the select menu
* @param minValues The maximum values that must be selected * @param minValues The maximum values that must be selected
*/ */
public setMaxValues(maxValues: number) { public setMaxValues(maxValues: number) {

View File

@@ -2076,7 +2076,7 @@ export class Sweepers {
public sweepReactions( public sweepReactions(
filter: CollectionSweepFilter<SweeperDefinitions['reactions'][0], SweeperDefinitions['reactions'][1]>, filter: CollectionSweepFilter<SweeperDefinitions['reactions'][0], SweeperDefinitions['reactions'][1]>,
): number; ): number;
public sweepStageInstnaces( public sweepStageInstances(
filter: CollectionSweepFilter<SweeperDefinitions['stageInstances'][0], SweeperDefinitions['stageInstances'][1]>, filter: CollectionSweepFilter<SweeperDefinitions['stageInstances'][0], SweeperDefinitions['stageInstances'][1]>,
): number; ): number;
public sweepStickers( public sweepStickers(

View File

@@ -239,7 +239,7 @@ export class SequentialHandler {
let delay: Promise<void>; let delay: Promise<void>;
if (isGlobal) { if (isGlobal) {
// Set RateLimitData based on the globl limit // Set RateLimitData based on the global limit
limit = this.manager.options.globalRequestsPerSecond; limit = this.manager.options.globalRequestsPerSecond;
timeout = this.manager.globalReset + this.manager.options.offset - Date.now(); timeout = this.manager.globalReset + this.manager.options.offset - Date.now();
// If this is the first task to reach the global timeout, set the global delay // If this is the first task to reach the global timeout, set the global delay

View File

@@ -38,7 +38,7 @@ export class VoiceWebSocket extends TypedEmitter<VoiceWebSocketEvents> {
* The time (milliseconds since UNIX epoch) that the last heartbeat was sent. This is set to 0 if a heartbeat * The time (milliseconds since UNIX epoch) that the last heartbeat was sent. This is set to 0 if a heartbeat
* hasn't been sent yet. * hasn't been sent yet.
*/ */
private lastHeatbeatSend: number; private lastHeartbeatSend: number;
/** /**
* The number of consecutively missed heartbeats. * The number of consecutively missed heartbeats.
@@ -75,7 +75,7 @@ export class VoiceWebSocket extends TypedEmitter<VoiceWebSocketEvents> {
this.ws.onclose = (e) => this.emit('close', e); this.ws.onclose = (e) => this.emit('close', e);
this.lastHeartbeatAck = 0; this.lastHeartbeatAck = 0;
this.lastHeatbeatSend = 0; this.lastHeartbeatSend = 0;
this.debug = debug ? (message: string) => this.emit('debug', message) : null; this.debug = debug ? (message: string) => this.emit('debug', message) : null;
} }
@@ -119,7 +119,7 @@ export class VoiceWebSocket extends TypedEmitter<VoiceWebSocketEvents> {
if (packet.op === VoiceOpcodes.HeartbeatAck) { if (packet.op === VoiceOpcodes.HeartbeatAck) {
this.lastHeartbeatAck = Date.now(); this.lastHeartbeatAck = Date.now();
this.missedHeartbeats = 0; this.missedHeartbeats = 0;
this.ping = this.lastHeartbeatAck - this.lastHeatbeatSend; this.ping = this.lastHeartbeatAck - this.lastHeartbeatSend;
} }
/** /**
@@ -151,9 +151,9 @@ export class VoiceWebSocket extends TypedEmitter<VoiceWebSocketEvents> {
* Sends a heartbeat over the WebSocket. * Sends a heartbeat over the WebSocket.
*/ */
private sendHeartbeat() { private sendHeartbeat() {
this.lastHeatbeatSend = Date.now(); this.lastHeartbeatSend = Date.now();
this.missedHeartbeats++; this.missedHeartbeats++;
const nonce = this.lastHeatbeatSend; const nonce = this.lastHeartbeatSend;
return this.sendPacket({ return this.sendPacket({
op: VoiceOpcodes.Heartbeat, op: VoiceOpcodes.Heartbeat,
d: nonce, d: nonce,
@@ -169,7 +169,7 @@ export class VoiceWebSocket extends TypedEmitter<VoiceWebSocketEvents> {
if (typeof this.heartbeatInterval !== 'undefined') clearInterval(this.heartbeatInterval); if (typeof this.heartbeatInterval !== 'undefined') clearInterval(this.heartbeatInterval);
if (ms > 0) { if (ms > 0) {
this.heartbeatInterval = setInterval(() => { this.heartbeatInterval = setInterval(() => {
if (this.lastHeatbeatSend !== 0 && this.missedHeartbeats >= 3) { if (this.lastHeartbeatSend !== 0 && this.missedHeartbeats >= 3) {
// Missed too many heartbeats - disconnect // Missed too many heartbeats - disconnect
this.ws.close(); this.ws.close();
this.setHeartbeatInterval(-1); this.setHeartbeatInterval(-1);