small fixes
This commit is contained in:
parent
6f69f9c01a
commit
dff73f0a40
@ -561,12 +561,12 @@ class DiscordClient extends Client
|
|||||||
return fetched;
|
return fetched;
|
||||||
}
|
}
|
||||||
|
|
||||||
resolveUsers (...opts: [user: UserResolveable[], foce?: boolean])
|
resolveUsers (...opts: [user: UserResolveable[], force?: boolean])
|
||||||
{
|
{
|
||||||
return this.#resolver.resolveUsers(...opts);
|
return this.#resolver.resolveUsers(...opts);
|
||||||
}
|
}
|
||||||
|
|
||||||
resolveUser (...opts: [user: UserResolveable, foce?: boolean])
|
resolveUser (...opts: [user: UserResolveable, force?: boolean])
|
||||||
{
|
{
|
||||||
return this.#resolver.resolveUser(...opts);
|
return this.#resolver.resolveUser(...opts);
|
||||||
}
|
}
|
||||||
|
@ -142,7 +142,7 @@ class RateLimiter
|
|||||||
* @returns {Promise<Message>} Resolves when the message is sent, rejects if sending fails
|
* @returns {Promise<Message>} Resolves when the message is sent, rejects if sending fails
|
||||||
* @memberof RateLimiter
|
* @memberof RateLimiter
|
||||||
*/
|
*/
|
||||||
queueSend (channel: GuildTextBasedChannel, message: string)
|
queueSend (channel: GuildTextBasedChannel, message: string): Promise<Message | boolean>
|
||||||
{
|
{
|
||||||
return new Promise((resolve, reject) =>
|
return new Promise((resolve, reject) =>
|
||||||
{
|
{
|
||||||
@ -186,6 +186,9 @@ class RateLimiter
|
|||||||
temp = `\n${message}`;
|
temp = `\n${message}`;
|
||||||
if (sendThis.length + temp.length > 2000)
|
if (sendThis.length + temp.length > 2000)
|
||||||
{
|
{
|
||||||
|
const timeout = this.#sendTimeouts[channel.id];
|
||||||
|
// Not sure if this guard fixes the multi-send issue join logs is having, but it's worth a shot
|
||||||
|
if (!timeout || ('_destroyed' in timeout && timeout._destroyed))
|
||||||
// Max length message, send the remaining messages at the next send
|
// Max length message, send the remaining messages at the next send
|
||||||
this.#sendTimeouts[channel.id] = setTimeout(
|
this.#sendTimeouts[channel.id] = setTimeout(
|
||||||
this.#send.bind(this),
|
this.#send.bind(this),
|
||||||
|
@ -263,8 +263,8 @@ class GuildWrapper
|
|||||||
const keys = Object.keys(settings);
|
const keys = Object.keys(settings);
|
||||||
for (const key of keys)
|
for (const key of keys)
|
||||||
{
|
{
|
||||||
if (!(key in defaultConfig))
|
// if (!(key in defaultConfig))
|
||||||
continue;
|
// continue;
|
||||||
defaultConfig[key] = { ...defaultConfig[key], ...settings[key] };
|
defaultConfig[key] = { ...defaultConfig[key], ...settings[key] };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user