forked from Galactic/galactic-bot
small fixes
This commit is contained in:
parent
6f69f9c01a
commit
dff73f0a40
@ -561,12 +561,12 @@ class DiscordClient extends Client
|
||||
return fetched;
|
||||
}
|
||||
|
||||
resolveUsers (...opts: [user: UserResolveable[], foce?: boolean])
|
||||
resolveUsers (...opts: [user: UserResolveable[], force?: boolean])
|
||||
{
|
||||
return this.#resolver.resolveUsers(...opts);
|
||||
}
|
||||
|
||||
resolveUser (...opts: [user: UserResolveable, foce?: boolean])
|
||||
resolveUser (...opts: [user: UserResolveable, force?: boolean])
|
||||
{
|
||||
return this.#resolver.resolveUser(...opts);
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ class RateLimiter
|
||||
* @returns {Promise<Message>} Resolves when the message is sent, rejects if sending fails
|
||||
* @memberof RateLimiter
|
||||
*/
|
||||
queueSend (channel: GuildTextBasedChannel, message: string)
|
||||
queueSend (channel: GuildTextBasedChannel, message: string): Promise<Message | boolean>
|
||||
{
|
||||
return new Promise((resolve, reject) =>
|
||||
{
|
||||
@ -186,12 +186,15 @@ class RateLimiter
|
||||
temp = `\n${message}`;
|
||||
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
|
||||
this.#sendTimeouts[channel.id] = setTimeout(
|
||||
this.#send.bind(this),
|
||||
this.#sendInterval * 1000,
|
||||
channel
|
||||
);
|
||||
this.#sendTimeouts[channel.id] = setTimeout(
|
||||
this.#send.bind(this),
|
||||
this.#sendInterval * 1000,
|
||||
channel
|
||||
);
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
@ -263,8 +263,8 @@ class GuildWrapper
|
||||
const keys = Object.keys(settings);
|
||||
for (const key of keys)
|
||||
{
|
||||
if (!(key in defaultConfig))
|
||||
continue;
|
||||
// if (!(key in defaultConfig))
|
||||
// continue;
|
||||
defaultConfig[key] = { ...defaultConfig[key], ...settings[key] };
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user