mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-13 21:35:02 +00:00
More rework progress, mostly done up to ModActions
This commit is contained in:
parent
52839cc9f3
commit
57893e7f76
38 changed files with 199 additions and 241 deletions
backend/src/plugins/Censor/util
|
@ -4,6 +4,7 @@ import { SavedMessage } from "../../../data/entities/SavedMessage";
|
|||
import { LogType } from "../../../data/LogType";
|
||||
import { stripObjectToScalars, resolveUser } from "../../../utils";
|
||||
import { disableCodeBlocks, deactivateMentions } from "knub/dist/helpers";
|
||||
import { TextChannel } from "discord.js";
|
||||
|
||||
export async function censorMessage(
|
||||
pluginData: GuildPluginData<CensorPluginType>,
|
||||
|
@ -13,7 +14,8 @@ export async function censorMessage(
|
|||
pluginData.state.serverLogs.ignoreLog(LogType.MESSAGE_DELETE, savedMessage.id);
|
||||
|
||||
try {
|
||||
await pluginData.client.deleteMessage(savedMessage.channel_id, savedMessage.id, "Censored");
|
||||
const channel = pluginData.guild.channels.resolve(savedMessage.channel_id) as TextChannel
|
||||
await channel.messages.delete(savedMessage.id);
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue