lint
Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
parent
2e0598194f
commit
aa1f11e801
8 changed files with 7 additions and 11 deletions
|
@ -203,7 +203,7 @@ if (env.DEBUG) {
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.info("Connecting to database");
|
logger.info("Connecting to database");
|
||||||
connect().then(async (connection) => {
|
connect().then(async () => {
|
||||||
const client = new Client({
|
const client = new Client({
|
||||||
partials: [Partials.User, Partials.Channel, Partials.GuildMember, Partials.Message, Partials.Reaction],
|
partials: [Partials.User, Partials.Channel, Partials.GuildMember, Partials.Message, Partials.Reaction],
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,6 @@ export const StartThreadAction = automodAction({
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
const guild = pluginData.guild;
|
|
||||||
const archiveSet = actionConfig.auto_archive
|
const archiveSet = actionConfig.auto_archive
|
||||||
? Math.ceil(Math.max(convertDelayStringToMS(actionConfig.auto_archive) ?? 0, 0) / MINUTES)
|
? Math.ceil(Math.max(convertDelayStringToMS(actionConfig.auto_archive) ?? 0, 0) / MINUTES)
|
||||||
: ThreadAutoArchiveDuration.OneDay;
|
: ThreadAutoArchiveDuration.OneDay;
|
||||||
|
|
|
@ -24,7 +24,7 @@ const MEDIA_CHANNEL_ICON = "https://cdn.discordapp.com/attachments/8761342052292
|
||||||
export async function getChannelInfoEmbed(
|
export async function getChannelInfoEmbed(
|
||||||
pluginData: GuildPluginData<UtilityPluginType>,
|
pluginData: GuildPluginData<UtilityPluginType>,
|
||||||
channelId: string,
|
channelId: string,
|
||||||
requestMemberId?: string,
|
// requestMemberId?: string,
|
||||||
): Promise<APIEmbed | null> {
|
): Promise<APIEmbed | null> {
|
||||||
const channel = pluginData.guild.channels.cache.get(channelId as Snowflake);
|
const channel = pluginData.guild.channels.cache.get(channelId as Snowflake);
|
||||||
if (!channel) {
|
if (!channel) {
|
||||||
|
|
|
@ -9,7 +9,6 @@ import {
|
||||||
trimEmptyLines,
|
trimEmptyLines,
|
||||||
trimLines,
|
trimLines,
|
||||||
} from "../../../utils";
|
} from "../../../utils";
|
||||||
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
|
|
||||||
import { UtilityPluginType } from "../types";
|
import { UtilityPluginType } from "../types";
|
||||||
|
|
||||||
const MESSAGE_ICON = "https://cdn.discordapp.com/attachments/740650744830623756/740685652152025088/message.png";
|
const MESSAGE_ICON = "https://cdn.discordapp.com/attachments/740650744830623756/740685652152025088/message.png";
|
||||||
|
@ -18,7 +17,7 @@ export async function getMessageInfoEmbed(
|
||||||
pluginData: GuildPluginData<UtilityPluginType>,
|
pluginData: GuildPluginData<UtilityPluginType>,
|
||||||
channelId: string,
|
channelId: string,
|
||||||
messageId: string,
|
messageId: string,
|
||||||
requestMemberId?: string,
|
// requestMemberId?: string,
|
||||||
): Promise<APIEmbed | null> {
|
): Promise<APIEmbed | null> {
|
||||||
const message = await (pluginData.guild.channels.resolve(channelId as Snowflake) as TextChannel).messages
|
const message = await (pluginData.guild.channels.resolve(channelId as Snowflake) as TextChannel).messages
|
||||||
.fetch(messageId as Snowflake)
|
.fetch(messageId as Snowflake)
|
||||||
|
@ -27,8 +26,6 @@ export async function getMessageInfoEmbed(
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const timeAndDate = pluginData.getPlugin(TimeAndDatePlugin);
|
|
||||||
|
|
||||||
const embed: EmbedWith<"fields" | "author"> = {
|
const embed: EmbedWith<"fields" | "author"> = {
|
||||||
fields: [],
|
fields: [],
|
||||||
author: {
|
author: {
|
||||||
|
|
|
@ -9,7 +9,7 @@ const MENTION_ICON = "https://cdn.discordapp.com/attachments/705009450855039042/
|
||||||
export async function getRoleInfoEmbed(
|
export async function getRoleInfoEmbed(
|
||||||
pluginData: GuildPluginData<UtilityPluginType>,
|
pluginData: GuildPluginData<UtilityPluginType>,
|
||||||
role: Role,
|
role: Role,
|
||||||
requestMemberId?: string,
|
// requestMemberId?: string,
|
||||||
): Promise<APIEmbed> {
|
): Promise<APIEmbed> {
|
||||||
const embed: EmbedWith<"fields" | "author" | "color"> = {
|
const embed: EmbedWith<"fields" | "author" | "color"> = {
|
||||||
fields: [],
|
fields: [],
|
||||||
|
|
|
@ -25,7 +25,7 @@ const prettifyFeature = (feature: string): string =>
|
||||||
export async function getServerInfoEmbed(
|
export async function getServerInfoEmbed(
|
||||||
pluginData: GuildPluginData<UtilityPluginType>,
|
pluginData: GuildPluginData<UtilityPluginType>,
|
||||||
serverId: string,
|
serverId: string,
|
||||||
requestMemberId?: string,
|
// requestMemberId?: string,
|
||||||
): Promise<APIEmbed | null> {
|
): Promise<APIEmbed | null> {
|
||||||
const thisServer = serverId === pluginData.guild.id ? pluginData.guild : null;
|
const thisServer = serverId === pluginData.guild.id ? pluginData.guild : null;
|
||||||
const [restGuild, guildPreview] = await Promise.all([
|
const [restGuild, guildPreview] = await Promise.all([
|
||||||
|
|
|
@ -10,7 +10,7 @@ export async function getSnowflakeInfoEmbed(
|
||||||
pluginData: GuildPluginData<UtilityPluginType>,
|
pluginData: GuildPluginData<UtilityPluginType>,
|
||||||
snowflake: string,
|
snowflake: string,
|
||||||
showUnknownWarning = false,
|
showUnknownWarning = false,
|
||||||
requestMemberId?: string,
|
// requestMemberId?: string,
|
||||||
): Promise<APIEmbed> {
|
): Promise<APIEmbed> {
|
||||||
const embed: EmbedWith<"fields" | "author"> = {
|
const embed: EmbedWith<"fields" | "author"> = {
|
||||||
fields: [],
|
fields: [],
|
||||||
|
|
|
@ -26,7 +26,7 @@ export async function getUserInfoEmbed(
|
||||||
pluginData: GuildPluginData<UtilityPluginType>,
|
pluginData: GuildPluginData<UtilityPluginType>,
|
||||||
userId: string,
|
userId: string,
|
||||||
compact = false,
|
compact = false,
|
||||||
requestMemberId?: string,
|
// requestMemberId?: string,
|
||||||
): Promise<APIEmbed | null> {
|
): Promise<APIEmbed | null> {
|
||||||
const user = await resolveUser(pluginData.client, userId);
|
const user = await resolveUser(pluginData.client, userId);
|
||||||
if (!user || user instanceof UnknownUser) {
|
if (!user || user instanceof UnknownUser) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue