mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
removed unnecessary conditional
This commit is contained in:
parent
a8298d4faa
commit
a3e6e4f319
2 changed files with 6 additions and 7 deletions
|
@ -174,7 +174,7 @@ connect().then(async () => {
|
|||
client.setMaxListeners(200);
|
||||
|
||||
client.on("rateLimit", rateLimitData => {
|
||||
logger.info(`[429] ${rateLimitData}`);
|
||||
logger.info(`[429] ${JSON.stringify(rateLimitData)}`);
|
||||
});
|
||||
|
||||
client.on("error", err => {
|
||||
|
|
|
@ -5,7 +5,7 @@ export const AutoJoinThreadEvt = utilityEvt({
|
|||
|
||||
async listener(meta) {
|
||||
const config = meta.pluginData.config.get();
|
||||
if (config.autojoin_threads && meta.args.thread.joinable && !meta.args.thread.joined) {
|
||||
if (config.autojoin_threads && meta.args.thread.joinable) {
|
||||
await meta.args.thread.join();
|
||||
}
|
||||
},
|
||||
|
@ -16,11 +16,10 @@ export const AutoJoinThreadSyncEvt = utilityEvt({
|
|||
|
||||
async listener(meta) {
|
||||
const config = meta.pluginData.config.get();
|
||||
if (config.autojoin_threads) {
|
||||
for (const thread of meta.args.threads.values()) {
|
||||
if (!thread.joined && thread.joinable) {
|
||||
await thread.join();
|
||||
}
|
||||
if (config.autojoin_threads) return;
|
||||
for (const thread of meta.args.threads.values()) {
|
||||
if (!thread.joined && thread.joinable) {
|
||||
await thread.join();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue