commit
1e30420eaa
16 changed files with 13 additions and 27 deletions
|
@ -1,3 +1,4 @@
|
||||||
{
|
{
|
||||||
"extends": ["config:base"]
|
"extends": ["config:base"],
|
||||||
|
"baseBranches": ["dev"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@ import { CommandInteraction, ButtonInteraction, Message } from "discord.js";
|
||||||
|
|
||||||
import logger from "../../logger";
|
import logger from "../../logger";
|
||||||
|
|
||||||
import getEmbedConfig from "../../helpers/getEmbedConfig";
|
|
||||||
import timeoutSchema from "../../models/timeout";
|
import timeoutSchema from "../../models/timeout";
|
||||||
import addSeconds from "../../helpers/addSeconds";
|
import addSeconds from "../../helpers/addSeconds";
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { CommandInteraction } from "discord.js";
|
import { ButtonInteraction } from "discord.js";
|
||||||
import logger from "../../../logger";
|
import logger from "../../../logger";
|
||||||
|
|
||||||
export const metadata = { guildOnly: false, ephemeral: false };
|
export const metadata = { guildOnly: false, ephemeral: false };
|
||||||
|
|
||||||
export const execute = async (interaction: CommandInteraction) => {
|
export const execute = async (interaction: ButtonInteraction) => {
|
||||||
logger.debug("primary button clicked!");
|
logger.debug(interaction.customId, "primary button clicked!");
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { CommandInteraction } from "discord.js";
|
import { CommandInteraction } from "discord.js";
|
||||||
import { SlashCommandBuilder } from "@discordjs/builders";
|
import { SlashCommandBuilder } from "@discordjs/builders";
|
||||||
import logger from "../../../logger";
|
|
||||||
|
|
||||||
import modules from "../../commands/counters/modules";
|
import modules from "../../commands/counters/modules";
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ import { CommandInteraction } from "discord.js";
|
||||||
|
|
||||||
// Groups
|
// Groups
|
||||||
import modules from "../../commands/manage/modules";
|
import modules from "../../commands/manage/modules";
|
||||||
import logger from "../../../logger";
|
|
||||||
|
|
||||||
export const moduleData = modules;
|
export const moduleData = modules;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { CommandInteraction } from "discord.js";
|
import { CommandInteraction } from "discord.js";
|
||||||
import { SlashCommandSubcommandGroupBuilder } from "@discordjs/builders";
|
import { SlashCommandSubcommandGroupBuilder } from "@discordjs/builders";
|
||||||
import logger from "../../../../../logger";
|
|
||||||
|
|
||||||
import modules from "./modules";
|
import modules from "./modules";
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@ import { CommandInteraction } from "discord.js";
|
||||||
import modules from "./modules";
|
import modules from "./modules";
|
||||||
|
|
||||||
// Handlers
|
// Handlers
|
||||||
import logger from "../../../logger";
|
|
||||||
|
|
||||||
export const moduleData = modules;
|
export const moduleData = modules;
|
||||||
|
|
||||||
|
|
|
@ -37,8 +37,9 @@ export default {
|
||||||
execute: async (interaction: CommandInteraction) => {
|
execute: async (interaction: CommandInteraction) => {
|
||||||
const { options, user, guild } = interaction;
|
const { options, user, guild } = interaction;
|
||||||
|
|
||||||
const { errorColor, successColor, footerText, footerIcon } =
|
const { successColor, footerText, footerIcon } = await getEmbedConfig(
|
||||||
await getEmbedConfig(guild); // Destructure
|
guild
|
||||||
|
); // Destructure
|
||||||
|
|
||||||
const optionTarget = options?.getUser("target");
|
const optionTarget = options?.getUser("target");
|
||||||
const optionType = options?.getString("type");
|
const optionType = options?.getString("type");
|
||||||
|
|
|
@ -16,7 +16,6 @@ import pluralize from "../../../../../helpers/pluralize";
|
||||||
import apiSchema from "../../../../../models/api";
|
import apiSchema from "../../../../../models/api";
|
||||||
import fetchUser from "../../../../../helpers/fetchUser";
|
import fetchUser from "../../../../../helpers/fetchUser";
|
||||||
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
|
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
|
||||||
import { message } from "../../../../../helpers/cooldown/index";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
metadata: { guildOnly: true, ephemeral: true },
|
metadata: { guildOnly: true, ephemeral: true },
|
||||||
|
|
|
@ -1,14 +1,9 @@
|
||||||
// Dependencies
|
// Dependencies
|
||||||
import {
|
import { CommandInteraction } from "discord.js";
|
||||||
CommandInteraction,
|
|
||||||
MessageActionRow,
|
|
||||||
MessageButton,
|
|
||||||
} from "discord.js";
|
|
||||||
|
|
||||||
// Configurations
|
// Configurations
|
||||||
import getEmbedConfig from "../../../../../helpers/getEmbedConfig";
|
import getEmbedConfig from "../../../../../helpers/getEmbedConfig";
|
||||||
|
|
||||||
import { hosterName, hosterUrl } from "../../../../../config/other";
|
|
||||||
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
|
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
|
||||||
|
|
||||||
// Function
|
// Function
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import logger from "../../../logger";
|
import logger from "../../../logger";
|
||||||
import { GuildMember, MessageEmbed, TextChannel } from "discord.js";
|
import { GuildMember, MessageEmbed } from "discord.js";
|
||||||
|
|
||||||
import guildSchema from "../../../models/guild";
|
import guildSchema from "../../../models/guild";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import logger from "../../../logger";
|
import logger from "../../../logger";
|
||||||
import { GuildMember, MessageEmbed, TextChannel } from "discord.js";
|
import { GuildMember, MessageEmbed } from "discord.js";
|
||||||
|
|
||||||
import guildSchema from "../../../models/guild";
|
import guildSchema from "../../../models/guild";
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@ import { Interaction } from "discord.js";
|
||||||
import button from "./button";
|
import button from "./button";
|
||||||
import command from "./command";
|
import command from "./command";
|
||||||
|
|
||||||
import logger from "../../../../logger";
|
|
||||||
|
|
||||||
export const execute = async (interaction: Interaction) => {
|
export const execute = async (interaction: Interaction) => {
|
||||||
await button(interaction);
|
await button(interaction);
|
||||||
await command(interaction);
|
await command(interaction);
|
||||||
|
|
|
@ -14,9 +14,6 @@ export default {
|
||||||
if (author.bot) return;
|
if (author.bot) return;
|
||||||
if (channel?.type !== "GUILD_TEXT") return;
|
if (channel?.type !== "GUILD_TEXT") return;
|
||||||
|
|
||||||
const { id: guildId } = guild;
|
|
||||||
const { id: userId } = author;
|
|
||||||
|
|
||||||
const guildData = await fetchGuild(guild);
|
const guildData = await fetchGuild(guild);
|
||||||
const userData = await fetchUser(author, guild);
|
const userData = await fetchUser(author, guild);
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ export default async (message: Message) => {
|
||||||
await channel?.send(`${author} said **${word}**.`);
|
await channel?.send(`${author} said **${word}**.`);
|
||||||
logger?.silly(`${author} said ${word} in ${channel}`);
|
logger?.silly(`${author} said ${word} in ${channel}`);
|
||||||
})
|
})
|
||||||
?.catch(async (error: any) => {
|
?.catch(async (error) => {
|
||||||
logger?.error(error);
|
logger?.error(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,5 +10,5 @@ export const options: IEventOptions = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const execute = async (client: Client) => {
|
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!`);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue