mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
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 {
|
||||
await member.roles.add(muteRole as Snowflake);
|
||||
} 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) {
|
||||
lock.unlock();
|
||||
logs.log(LogType.BOT_ALERT, {
|
||||
|
|
|
@ -6,10 +6,7 @@ export const ChannelJoinEvt = nameHistoryEvt({
|
|||
|
||||
async listener(meta) {
|
||||
meta.pluginData.state.updateQueue.add(() =>
|
||||
updateNickname(
|
||||
meta.pluginData,
|
||||
meta.args.newState.member ? meta.args.newState.member : meta.args.oldState.member!,
|
||||
),
|
||||
updateNickname(meta.pluginData, meta.args.newState.member ?? meta.args.oldState.member!),
|
||||
);
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue