mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
fix: don't attempt to message users off-server
Co-authored-by: metal0 <metal@i0.tf>
This commit is contained in:
parent
dd2eebd4a5
commit
dd1afc4dab
3 changed files with 10 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
|||
import { Snowflake, User } from "discord.js";
|
||||
import { Snowflake } from "discord.js";
|
||||
import humanizeDuration from "humanize-duration";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
|
@ -191,7 +191,7 @@ export async function muteUser(
|
|||
}),
|
||||
));
|
||||
|
||||
if (muteMessage && user instanceof User) {
|
||||
if (muteMessage && member) {
|
||||
let contactMethods: UserNotificationMethod[] = [];
|
||||
|
||||
if (muteOptions?.contactMethods) {
|
||||
|
@ -211,7 +211,7 @@ export async function muteUser(
|
|||
}
|
||||
}
|
||||
|
||||
notifyResult = await notifyUser(user, muteMessage, contactMethods);
|
||||
notifyResult = await notifyUser(member.user, muteMessage, contactMethods);
|
||||
}
|
||||
|
||||
// Create/update a case
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue