perf
This commit is contained in:
parent
9ddfc48bb2
commit
3d29963b87
2 changed files with 2 additions and 5 deletions
|
@ -90,7 +90,7 @@ export async function muteUser(
|
||||||
try {
|
try {
|
||||||
await member.roles.add(muteRole as Snowflake);
|
await member.roles.add(muteRole as Snowflake);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
const actualMuteRole = pluginData.guild.roles.cache.find(x => x.id === muteRole);
|
const actualMuteRole = pluginData.guild.roles.cache.get(muteRole as Snowflake);
|
||||||
if (!actualMuteRole) {
|
if (!actualMuteRole) {
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
logs.log(LogType.BOT_ALERT, {
|
logs.log(LogType.BOT_ALERT, {
|
||||||
|
|
|
@ -6,10 +6,7 @@ export const ChannelJoinEvt = nameHistoryEvt({
|
||||||
|
|
||||||
async listener(meta) {
|
async listener(meta) {
|
||||||
meta.pluginData.state.updateQueue.add(() =>
|
meta.pluginData.state.updateQueue.add(() =>
|
||||||
updateNickname(
|
updateNickname(meta.pluginData, meta.args.newState.member ?? meta.args.oldState.member!),
|
||||||
meta.pluginData,
|
|
||||||
meta.args.newState.member ? meta.args.newState.member : meta.args.oldState.member!,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue