More rework progress, remove all eris imports

This commit is contained in:
Dark 2021-06-01 02:05:55 +02:00
parent 8f7a6510eb
commit 52839cc9f3
No known key found for this signature in database
GPG key ID: 2CD6ACB6B0A87B8A
181 changed files with 352 additions and 343 deletions

View file

@ -2,7 +2,6 @@ import { MatchableTextType } from "./matchMultipleTextTypesOnMessage";
import { AutomodContext, AutomodPluginType } from "../types";
import { messageSummary, verboseChannelMention } from "../../../utils";
import { GuildPluginData } from "knub";
import { User } from "eris";
export function getTextMatchPartialSummary(
pluginData: GuildPluginData<AutomodPluginType>,
@ -11,13 +10,13 @@ export function getTextMatchPartialSummary(
) {
if (type === "message") {
const message = context.message!;
const channel = pluginData.guild.channels.get(message.channel_id);
const channel = pluginData.guild.channels.cache.get(message.channel_id);
const channelMention = channel ? verboseChannelMention(channel) : `\`#${message.channel_id}\``;
return `message in ${channelMention}:\n${messageSummary(message)}`;
} else if (type === "embed") {
const message = context.message!;
const channel = pluginData.guild.channels.get(message.channel_id);
const channel = pluginData.guild.channels.cache.get(message.channel_id);
const channelMention = channel ? verboseChannelMention(channel) : `\`#${message.channel_id}\``;
return `message embed in ${channelMention}:\n${messageSummary(message)}`;