Merge pull request #364 from VermiumSifell/dev

Minor fixes
This commit is contained in:
Axel Olausson Holtenäs 2022-06-13 14:17:56 +02:00 committed by GitHub
commit 1e30420eaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 13 additions and 27 deletions

View file

@ -1,3 +1,4 @@
{
"extends": ["config:base"]
"extends": ["config:base"],
"baseBranches": ["dev"]
}

View file

@ -3,7 +3,6 @@ import { CommandInteraction, ButtonInteraction, Message } from "discord.js";
import logger from "../../logger";
import getEmbedConfig from "../../helpers/getEmbedConfig";
import timeoutSchema from "../../models/timeout";
import addSeconds from "../../helpers/addSeconds";

View file

@ -1,8 +1,8 @@
import { CommandInteraction } from "discord.js";
import { ButtonInteraction } from "discord.js";
import logger from "../../../logger";
export const metadata = { guildOnly: false, ephemeral: false };
export const execute = async (interaction: CommandInteraction) => {
logger.debug("primary button clicked!");
export const execute = async (interaction: ButtonInteraction) => {
logger.debug(interaction.customId, "primary button clicked!");
};

View file

@ -1,6 +1,5 @@
import { CommandInteraction } from "discord.js";
import { SlashCommandBuilder } from "@discordjs/builders";
import logger from "../../../logger";
import modules from "../../commands/counters/modules";

View file

@ -4,7 +4,6 @@ import { CommandInteraction } from "discord.js";
// Groups
import modules from "../../commands/manage/modules";
import logger from "../../../logger";
export const moduleData = modules;

View file

@ -1,6 +1,5 @@
import { CommandInteraction } from "discord.js";
import { SlashCommandSubcommandGroupBuilder } from "@discordjs/builders";
import logger from "../../../../../logger";
import modules from "./modules";

View file

@ -6,7 +6,6 @@ import { CommandInteraction } from "discord.js";
import modules from "./modules";
// Handlers
import logger from "../../../logger";
export const moduleData = modules;

View file

@ -37,8 +37,9 @@ export default {
execute: async (interaction: CommandInteraction) => {
const { options, user, guild } = interaction;
const { errorColor, successColor, footerText, footerIcon } =
await getEmbedConfig(guild); // Destructure
const { successColor, footerText, footerIcon } = await getEmbedConfig(
guild
); // Destructure
const optionTarget = options?.getUser("target");
const optionType = options?.getString("type");

View file

@ -16,7 +16,6 @@ import pluralize from "../../../../../helpers/pluralize";
import apiSchema from "../../../../../models/api";
import fetchUser from "../../../../../helpers/fetchUser";
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import { message } from "../../../../../helpers/cooldown/index";
export default {
metadata: { guildOnly: true, ephemeral: true },

View file

@ -1,14 +1,9 @@
// Dependencies
import {
CommandInteraction,
MessageActionRow,
MessageButton,
} from "discord.js";
import { CommandInteraction } from "discord.js";
// Configurations
import getEmbedConfig from "../../../../../helpers/getEmbedConfig";
import { hosterName, hosterUrl } from "../../../../../config/other";
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
// Function

View file

@ -1,5 +1,5 @@
import logger from "../../../logger";
import { GuildMember, MessageEmbed, TextChannel } from "discord.js";
import { GuildMember, MessageEmbed } from "discord.js";
import guildSchema from "../../../models/guild";

View file

@ -1,5 +1,5 @@
import logger from "../../../logger";
import { GuildMember, MessageEmbed, TextChannel } from "discord.js";
import { GuildMember, MessageEmbed } from "discord.js";
import guildSchema from "../../../models/guild";

View file

@ -3,8 +3,6 @@ import { Interaction } from "discord.js";
import button from "./button";
import command from "./command";
import logger from "../../../../logger";
export const execute = async (interaction: Interaction) => {
await button(interaction);
await command(interaction);

View file

@ -14,9 +14,6 @@ export default {
if (author.bot) return;
if (channel?.type !== "GUILD_TEXT") return;
const { id: guildId } = guild;
const { id: userId } = author;
const guildData = await fetchGuild(guild);
const userData = await fetchUser(author, guild);

View file

@ -29,7 +29,7 @@ export default async (message: Message) => {
await channel?.send(`${author} said **${word}**.`);
logger?.silly(`${author} said ${word} in ${channel}`);
})
?.catch(async (error: any) => {
?.catch(async (error) => {
logger?.error(error);
});
};

View file

@ -10,5 +10,5 @@ export const options: IEventOptions = {
};
export const execute = async (client: Client) => {
logger.warn("Discord's API client is rate-limited!");
logger.warn(`Discord's API client (${client?.user?.tag}) is rate-limited!`);
};