3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00
This commit is contained in:
almeidx 2021-07-29 00:03:25 +01:00
parent 9ddfc48bb2
commit 3d29963b87
No known key found for this signature in database
GPG key ID: 8558FBFF849BD664
2 changed files with 2 additions and 5 deletions

View file

@ -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, {

View file

@ -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!),
);
},
});