Updated interfacecs
This commit is contained in:
@@ -9,7 +9,6 @@ import { ContextMenu } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "congratsmessage",
|
name: "congratsmessage",
|
||||||
description: "Congratulate a user.",
|
description: "Congratulate a user.",
|
||||||
type: "contextmenu",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
|
|
||||||
data: new ContextMenuCommandBuilder()
|
data: new ContextMenuCommandBuilder()
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { ContextMenu } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "resetnick",
|
name: "resetnick",
|
||||||
description: "Reset your nickname.",
|
description: "Reset your nickname.",
|
||||||
type: "contextmenu",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
|
|
||||||
data: new ContextMenuCommandBuilder()
|
data: new ContextMenuCommandBuilder()
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import roleManage from "utils/functions/rolesmanage"
|
|||||||
export = {
|
export = {
|
||||||
name: "Update User",
|
name: "Update User",
|
||||||
description: "Updates a user's roles",
|
description: "Updates a user's roles",
|
||||||
type: "contextmenu",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
|
|
||||||
data: new ContextMenuCommandBuilder()
|
data: new ContextMenuCommandBuilder()
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import logToChannel from "utils/functions/logtochannel"
|
|||||||
export = {
|
export = {
|
||||||
name: "ban",
|
name: "ban",
|
||||||
description: "Ban a user",
|
description: "Ban a user",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: false,
|
public: false,
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import { Command } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "check",
|
name: "check",
|
||||||
description: "Check a player's stats.",
|
description: "Check a player's stats.",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: true,
|
public: true,
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import logToChannel from "utils/functions/logtochannel"
|
|||||||
export = {
|
export = {
|
||||||
name: "clear",
|
name: "clear",
|
||||||
description: "Clears messages",
|
description: "Clears messages",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: false,
|
public: false,
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import { Command } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "config",
|
name: "config",
|
||||||
description: "Configure the bot",
|
description: "Configure the bot",
|
||||||
type: "slash",
|
|
||||||
dev: true,
|
dev: true,
|
||||||
public: false,
|
public: false,
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import unban from "./counting/unban"
|
|||||||
export = {
|
export = {
|
||||||
name: "counting",
|
name: "counting",
|
||||||
description: "counting subcommands",
|
description: "counting subcommands",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: true,
|
public: true,
|
||||||
subcommands: true,
|
subcommands: true,
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { Command } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "dev-info",
|
name: "dev-info",
|
||||||
description: "Test command for the bot.",
|
description: "Test command for the bot.",
|
||||||
type: "slash",
|
|
||||||
dev: true,
|
dev: true,
|
||||||
public: false,
|
public: false,
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { Command } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "devel",
|
name: "devel",
|
||||||
description: "Admin command.",
|
description: "Admin command.",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: false,
|
public: false,
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import { getIGN } from "utils/Hypixel"
|
|||||||
export = {
|
export = {
|
||||||
name: "forceunverify",
|
name: "forceunverify",
|
||||||
description: "Force unverify a user",
|
description: "Force unverify a user",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: false,
|
public: false,
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import roleManage from "utils/functions/rolesmanage"
|
|||||||
export = {
|
export = {
|
||||||
name: "forceupdate",
|
name: "forceupdate",
|
||||||
description: "Force update the user",
|
description: "Force update the user",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: false,
|
public: false,
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import logToChannel from "utils/functions/logtochannel"
|
|||||||
export = {
|
export = {
|
||||||
name: "forceverify",
|
name: "forceverify",
|
||||||
description: "Force verify a user.",
|
description: "Force verify a user.",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: false,
|
public: false,
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import guildTop from "./guild/top"
|
|||||||
export = {
|
export = {
|
||||||
name: "guild",
|
name: "guild",
|
||||||
description: "Subcommands for guilds",
|
description: "Subcommands for guilds",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: true,
|
public: true,
|
||||||
subcommands: true,
|
subcommands: true,
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { Command } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "help",
|
name: "help",
|
||||||
description: "Help command",
|
description: "Help command",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: true,
|
public: true,
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { Command } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "instructions",
|
name: "instructions",
|
||||||
description: "Instructions for verification",
|
description: "Instructions for verification",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: false,
|
public: false,
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import logToChannel from "utils/functions/logtochannel"
|
|||||||
export = {
|
export = {
|
||||||
name: "kick",
|
name: "kick",
|
||||||
description: "Kick a member from the server.",
|
description: "Kick a member from the server.",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: false,
|
public: false,
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { Command } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "ping",
|
name: "ping",
|
||||||
description: "Get the bot's ping.",
|
description: "Get the bot's ping.",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: true,
|
public: true,
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import env from "utils/Env"
|
|||||||
export = {
|
export = {
|
||||||
name: "pp",
|
name: "pp",
|
||||||
description: "Shows pp size",
|
description: "Shows pp size",
|
||||||
type: "slash",
|
|
||||||
public: true,
|
public: true,
|
||||||
dev: true,
|
dev: true,
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import logToChannel from "utils/functions/logtochannel"
|
|||||||
export = {
|
export = {
|
||||||
name: "remove",
|
name: "remove",
|
||||||
description: "Remove a person on the waiting list.",
|
description: "Remove a person on the waiting list.",
|
||||||
type: "slash",
|
|
||||||
false: true,
|
false: true,
|
||||||
public: false,
|
public: false,
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import { Command } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "reqs",
|
name: "reqs",
|
||||||
description: "Displays the requirements for the guild.",
|
description: "Displays the requirements for the guild.",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: true,
|
public: true,
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import { Command } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "send",
|
name: "send",
|
||||||
description: "Send a message to a channel.",
|
description: "Send a message to a channel.",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: false,
|
public: false,
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import logToChannel from "utils/functions/logtochannel"
|
|||||||
export = {
|
export = {
|
||||||
name: "setnick",
|
name: "setnick",
|
||||||
description: "Set your nickname",
|
description: "Set your nickname",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: false,
|
public: false,
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import { Command } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "setup",
|
name: "setup",
|
||||||
description: "Used for setup of the bot.",
|
description: "Used for setup of the bot.",
|
||||||
type: "slash",
|
|
||||||
dev: true,
|
dev: true,
|
||||||
public: false,
|
public: false,
|
||||||
subcommands: true,
|
subcommands: true,
|
||||||
@@ -156,10 +155,8 @@ export = {
|
|||||||
|
|
||||||
if (subcommand === "sendwaitinglistmessage") {
|
if (subcommand === "sendwaitinglistmessage") {
|
||||||
title = "Waiting List"
|
title = "Waiting List"
|
||||||
;(description =
|
description = "The people on the waiting list"
|
||||||
"The people below were accepted into the guild\n" +
|
customId = "waitinglistupdate"
|
||||||
"Try to invite them in order."),
|
|
||||||
(customId = "waitinglistupdate")
|
|
||||||
label = "Update"
|
label = "Update"
|
||||||
emoji = "🔄"
|
emoji = "🔄"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import logToChannel from "utils/functions/logtochannel"
|
|||||||
export = {
|
export = {
|
||||||
name: "slowmode",
|
name: "slowmode",
|
||||||
description: "Set the slowmode of a channel.",
|
description: "Set the slowmode of a channel.",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: false,
|
public: false,
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import { SnipeCache } from "typings"
|
|||||||
export = {
|
export = {
|
||||||
name: "snipe",
|
name: "snipe",
|
||||||
description: "Snipes the last deleted message of a user",
|
description: "Snipes the last deleted message of a user",
|
||||||
type: "slash",
|
|
||||||
public: true,
|
public: true,
|
||||||
dev: true,
|
dev: true,
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import updateDiscordRoles from "./staff/updatediscordroles"
|
|||||||
export = {
|
export = {
|
||||||
name: "staff",
|
name: "staff",
|
||||||
description: "Subcommands for staff",
|
description: "Subcommands for staff",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: false,
|
public: false,
|
||||||
subcommands: true,
|
subcommands: true,
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import logToChannel from "utils/functions/logtochannel"
|
|||||||
export = {
|
export = {
|
||||||
name: "timeout",
|
name: "timeout",
|
||||||
description: "Times out a memeber",
|
description: "Times out a memeber",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: false,
|
public: false,
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import logToChannel from "utils/functions/logtochannel"
|
|||||||
export = {
|
export = {
|
||||||
name: "unban",
|
name: "unban",
|
||||||
description: "Unban a user from the server",
|
description: "Unban a user from the server",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: false,
|
public: false,
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { Command } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "update",
|
name: "update",
|
||||||
description: "Update your guild rank.",
|
description: "Update your guild rank.",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: true,
|
public: true,
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import { Command } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "uuid",
|
name: "uuid",
|
||||||
description: "Get a player's UUID",
|
description: "Get a player's UUID",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: true,
|
public: true,
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import { GuildData } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "verify",
|
name: "verify",
|
||||||
description: "Verify yourself as a member of the server.",
|
description: "Verify yourself as a member of the server.",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: true,
|
public: true,
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import { getIGN, getHeadURL } from "utils/Hypixel"
|
|||||||
export = {
|
export = {
|
||||||
name: "whoami",
|
name: "whoami",
|
||||||
description: "Get your user info",
|
description: "Get your user info",
|
||||||
type: "slash",
|
|
||||||
public: true,
|
public: true,
|
||||||
dev: false,
|
dev: false,
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import { Command } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "whois",
|
name: "whois",
|
||||||
description: "Get's the ign of a user.",
|
description: "Get's the ign of a user.",
|
||||||
type: "slash",
|
|
||||||
dev: false,
|
dev: false,
|
||||||
public: false,
|
public: false,
|
||||||
|
|
||||||
|
|||||||
@@ -3,13 +3,10 @@ import { Autocomplete } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "unban",
|
name: "unban",
|
||||||
description: "Unban a user from the server",
|
description: "Unban a user from the server",
|
||||||
type: "autocomplete",
|
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
const focusedOption = interaction.options.getFocused(true)
|
const focusedOption = interaction.options.getFocused(true)
|
||||||
if (focusedOption.name !== "user") {
|
if (focusedOption.name !== "user") return
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (focusedOption.value === "") {
|
if (focusedOption.value === "") {
|
||||||
await interaction.respond([
|
await interaction.respond([
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ import { Button } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "checkstats",
|
name: "checkstats",
|
||||||
description: "Check your stats.",
|
description: "Check your stats.",
|
||||||
type: "button",
|
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import { getGuild } from "utils/Hypixel"
|
|||||||
export = {
|
export = {
|
||||||
name: "guildapplicationaccept",
|
name: "guildapplicationaccept",
|
||||||
description: "Accept a guild application.",
|
description: "Accept a guild application.",
|
||||||
type: "button",
|
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import { Button } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "guildapplicationdeny",
|
name: "guildapplicationdeny",
|
||||||
description: "Deny a guild application.",
|
description: "Deny a guild application.",
|
||||||
type: "button",
|
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
const modal = new ModalBuilder()
|
const modal = new ModalBuilder()
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import { Button } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "guildapply",
|
name: "guildapply",
|
||||||
description: "Guild application button.",
|
description: "Guild application button.",
|
||||||
type: "button",
|
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
const user = interaction.member as GuildMember
|
const user = interaction.member as GuildMember
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ const guildRoles = [
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
name: "guildinactivitylog",
|
name: "guildinactivitylog",
|
||||||
description: "Configure the bot.",
|
description: "Configure the bot.",
|
||||||
type: "button",
|
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
const guild = interaction.guild!
|
const guild = interaction.guild!
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { Button } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "inactiveapplicationaccept",
|
name: "inactiveapplicationaccept",
|
||||||
description: "Accept an inactivity application.",
|
description: "Accept an inactivity application.",
|
||||||
type: "button",
|
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
await interaction.reply({
|
await interaction.reply({
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { Button } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "inactiveapplicationdeny",
|
name: "inactiveapplicationdeny",
|
||||||
description: "Denies an inactivity application.",
|
description: "Denies an inactivity application.",
|
||||||
type: "button",
|
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
await interaction.reply({
|
await interaction.reply({
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import { Button } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "staffapplicationaccept",
|
name: "staffapplicationaccept",
|
||||||
description: "Accept a staff application.",
|
description: "Accept a staff application.",
|
||||||
type: "button",
|
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import { Button } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "staffapplicationdeny",
|
name: "staffapplicationdeny",
|
||||||
description: "Deny a guild application.",
|
description: "Deny a guild application.",
|
||||||
type: "button",
|
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
const modal = new ModalBuilder()
|
const modal = new ModalBuilder()
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import env from "utils/Env"
|
|||||||
export = {
|
export = {
|
||||||
name: "staffapply",
|
name: "staffapply",
|
||||||
description: "Apply for the staff team.",
|
description: "Apply for the staff team.",
|
||||||
type: "button",
|
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
const user = interaction.member as GuildMember
|
const user = interaction.member as GuildMember
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import { Button } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "verify",
|
name: "verify",
|
||||||
description: "Configure the bot.",
|
description: "Configure the bot.",
|
||||||
type: "button",
|
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
const modal = new ModalBuilder()
|
const modal = new ModalBuilder()
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import { Button } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "waitinglistupdate",
|
name: "waitinglistupdate",
|
||||||
description: "Update the waiting list.",
|
description: "Update the waiting list.",
|
||||||
type: "button",
|
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
await interaction.deferReply({ ephemeral: true })
|
await interaction.deferReply({ ephemeral: true })
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import { Modal } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "denyreasonbox",
|
name: "denyreasonbox",
|
||||||
description: "Deny reason box.",
|
description: "Deny reason box.",
|
||||||
type: "modal",
|
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import { Modal } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "staffdenyreasonbox",
|
name: "staffdenyreasonbox",
|
||||||
description: "Deny reason box.",
|
description: "Deny reason box.",
|
||||||
type: "modal",
|
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import { GuildMember } from "discord.js"
|
|||||||
export = {
|
export = {
|
||||||
name: "verifybox",
|
name: "verifybox",
|
||||||
description: "Verify box.",
|
description: "Verify box.",
|
||||||
type: "modal",
|
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
await interaction.deferReply({ ephemeral: true })
|
await interaction.deferReply({ ephemeral: true })
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import logToChannel from "utils/functions/logtochannel"
|
|||||||
export = {
|
export = {
|
||||||
name: "logNewJoins",
|
name: "logNewJoins",
|
||||||
description: "Logs new joins",
|
description: "Logs new joins",
|
||||||
type: "event",
|
|
||||||
event: "guildMemberAdd",
|
event: "guildMemberAdd",
|
||||||
|
|
||||||
execute(member: GuildMember) {
|
execute(member: GuildMember) {
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { Event } from "interfaces"
|
|||||||
export = {
|
export = {
|
||||||
name: "logBtnsCmds",
|
name: "logBtnsCmds",
|
||||||
description: "Logs all button and command interactions",
|
description: "Logs all button and command interactions",
|
||||||
type: "event",
|
|
||||||
event: "interactionCreate",
|
event: "interactionCreate",
|
||||||
|
|
||||||
execute(interaction: ChatInputCommandInteraction | ButtonInteraction) {
|
execute(interaction: ChatInputCommandInteraction | ButtonInteraction) {
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import env from "utils/Env"
|
|||||||
export = {
|
export = {
|
||||||
name: "eval",
|
name: "eval",
|
||||||
description: "Evaluate a JavaScript expression",
|
description: "Evaluate a JavaScript expression",
|
||||||
type: "event",
|
|
||||||
event: "messageCreate",
|
event: "messageCreate",
|
||||||
disabled: true,
|
disabled: true,
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { Message } from "discord.js"
|
|||||||
export = {
|
export = {
|
||||||
name: "ur mom",
|
name: "ur mom",
|
||||||
description: "ur moms someone",
|
description: "ur moms someone",
|
||||||
type: "event",
|
|
||||||
event: "messageCreate",
|
event: "messageCreate",
|
||||||
|
|
||||||
async execute(message: Message) {
|
async execute(message: Message) {
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import { SnipeCache } from "typings"
|
|||||||
export = {
|
export = {
|
||||||
name: "snipecache",
|
name: "snipecache",
|
||||||
description: "Logs messages for the snipe command",
|
description: "Logs messages for the snipe command",
|
||||||
type: "event",
|
|
||||||
event: "messageDelete",
|
event: "messageDelete",
|
||||||
disabled: true,
|
disabled: true,
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import color from "utils/functions/colors"
|
|||||||
export = {
|
export = {
|
||||||
name: "conolelog",
|
name: "conolelog",
|
||||||
description: "console log",
|
description: "console log",
|
||||||
type: "event",
|
|
||||||
event: "ready",
|
event: "ready",
|
||||||
|
|
||||||
execute(client: Client) {
|
execute(client: Client) {
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { color } from "config/options.json"
|
|||||||
export = {
|
export = {
|
||||||
name: "sendonlinemessage",
|
name: "sendonlinemessage",
|
||||||
description: "send an online message",
|
description: "send an online message",
|
||||||
type: "event",
|
|
||||||
event: "ready",
|
event: "ready",
|
||||||
|
|
||||||
execute() {
|
execute() {
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { ExtendedClient as Client } from "utils/Client"
|
|||||||
export = {
|
export = {
|
||||||
name: "status",
|
name: "status",
|
||||||
description: "Sets the status of the bot",
|
description: "Sets the status of the bot",
|
||||||
type: "event",
|
|
||||||
event: "ready",
|
event: "ready",
|
||||||
|
|
||||||
execute(client: Client) {
|
execute(client: Client) {
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import logToChannel from "utils/functions/logtochannel"
|
|||||||
export = {
|
export = {
|
||||||
name: "vcJoinLeave",
|
name: "vcJoinLeave",
|
||||||
description: "Logs when a user joins or leaves a voice channel.",
|
description: "Logs when a user joins or leaves a voice channel.",
|
||||||
type: "event",
|
|
||||||
event: "voiceStateUpdate",
|
event: "voiceStateUpdate",
|
||||||
|
|
||||||
execute(oldState: VoiceState, newState: VoiceState) {
|
execute(oldState: VoiceState, newState: VoiceState) {
|
||||||
|
|||||||
@@ -4,6 +4,5 @@ import { AutocompleteInteraction } from "discord.js"
|
|||||||
export default interface Autocomplete {
|
export default interface Autocomplete {
|
||||||
name: string
|
name: string
|
||||||
description: string
|
description: string
|
||||||
type: "autocomplete"
|
|
||||||
execute: (interacion: AutocompleteInteraction) => Promise<void>
|
execute: (interacion: AutocompleteInteraction) => Promise<void>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,5 @@ import { ButtonInteraction } from "discord.js"
|
|||||||
export default interface Button {
|
export default interface Button {
|
||||||
name: string
|
name: string
|
||||||
description: string
|
description: string
|
||||||
type: "button"
|
|
||||||
execute: (interaction: ButtonInteraction) => Promise<void>
|
execute: (interaction: ButtonInteraction) => Promise<void>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ import { ExtendedClient as Client } from "utils/Client"
|
|||||||
export default interface Command {
|
export default interface Command {
|
||||||
name: string
|
name: string
|
||||||
description: string
|
description: string
|
||||||
type: "slash"
|
|
||||||
dev?: boolean
|
dev?: boolean
|
||||||
public: boolean
|
public: boolean
|
||||||
data: SlashCommandBuilder
|
disabled?: boolean
|
||||||
subcommands?: boolean
|
subcommands?: boolean
|
||||||
|
data: SlashCommandBuilder
|
||||||
execute: (
|
execute: (
|
||||||
interaction: ChatInputCommandInteraction,
|
interaction: ChatInputCommandInteraction,
|
||||||
client: Client,
|
client: Client,
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import {
|
|||||||
export default interface ContextMenu {
|
export default interface ContextMenu {
|
||||||
name: string
|
name: string
|
||||||
description: string
|
description: string
|
||||||
type: "contextmenu"
|
|
||||||
dev?: boolean
|
dev?: boolean
|
||||||
data: ContextMenuCommandBuilder
|
data: ContextMenuCommandBuilder
|
||||||
execute: (interaction: ContextMenuCommandInteraction) => Promise<void>
|
execute: (interaction: ContextMenuCommandInteraction) => Promise<void>
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { ClientEvents } from "discord.js"
|
|||||||
export default interface Event {
|
export default interface Event {
|
||||||
name: string
|
name: string
|
||||||
description: string
|
description: string
|
||||||
type: "event"
|
|
||||||
event: keyof ClientEvents
|
event: keyof ClientEvents
|
||||||
disabled?: boolean
|
disabled?: boolean
|
||||||
execute(...args: any[]): void
|
execute(...args: any[]): void
|
||||||
|
|||||||
@@ -4,6 +4,5 @@ import { ModalSubmitInteraction } from "discord.js"
|
|||||||
export default interface Modal {
|
export default interface Modal {
|
||||||
name: string
|
name: string
|
||||||
description: string
|
description: string
|
||||||
type: "modal"
|
|
||||||
execute: (interaction: ModalSubmitInteraction) => Promise<void>
|
execute: (interaction: ModalSubmitInteraction) => Promise<void>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,8 +27,7 @@ export default function loadAutocompleteEvents(client: Client, ft: FileType) {
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
"name" in autocomplete &&
|
"name" in autocomplete &&
|
||||||
"execute" in autocomplete &&
|
"execute" in autocomplete
|
||||||
autocomplete.type === "autocomplete"
|
|
||||||
) {
|
) {
|
||||||
client.autocomplete.set(autocomplete.name, autocomplete)
|
client.autocomplete.set(autocomplete.name, autocomplete)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export default function loadButtonEvents(client: Client, ft: FileType) {
|
|||||||
const filePath = path.join(btnPath, file)
|
const filePath = path.join(btnPath, file)
|
||||||
const btn: Button = require(filePath)
|
const btn: Button = require(filePath)
|
||||||
|
|
||||||
if ("name" in btn && "execute" in btn && btn.type === "button") {
|
if ("name" in btn && "execute" in btn) {
|
||||||
client.buttons.set(btn.name, btn)
|
client.buttons.set(btn.name, btn)
|
||||||
} else {
|
} else {
|
||||||
console.log(
|
console.log(
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export default function loadSlashCommandsEvents(client: Client, ft: FileType) {
|
|||||||
const filePath = path.join(cmdPath, file)
|
const filePath = path.join(cmdPath, file)
|
||||||
const cmd: Command = require(filePath)
|
const cmd: Command = require(filePath)
|
||||||
|
|
||||||
if ("data" in cmd && "execute" in cmd && cmd.type === "slash") {
|
if ("data" in cmd && "execute" in cmd) {
|
||||||
client.commands.set(cmd.data.name, cmd)
|
client.commands.set(cmd.data.name, cmd)
|
||||||
} else {
|
} else {
|
||||||
console.log(
|
console.log(
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export default function loadContextMenuEvents(client: Client, ft: FileType) {
|
|||||||
const filePath = path.join(contextMenuPath, file)
|
const filePath = path.join(contextMenuPath, file)
|
||||||
const cmd: ContextMenu = require(filePath)
|
const cmd: ContextMenu = require(filePath)
|
||||||
|
|
||||||
if ("data" in cmd && "execute" in cmd && cmd.type === "contextmenu") {
|
if ("data" in cmd && "execute" in cmd) {
|
||||||
client.contextmenus.set(cmd.data.name, cmd)
|
client.contextmenus.set(cmd.data.name, cmd)
|
||||||
} else {
|
} else {
|
||||||
console.log(
|
console.log(
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export default function loadModalEvents(client: Client, ft: FileType) {
|
|||||||
const filePath = path.join(modalPath, file)
|
const filePath = path.join(modalPath, file)
|
||||||
const modal: Modal = require(filePath)
|
const modal: Modal = require(filePath)
|
||||||
|
|
||||||
if ("name" in modal && "execute" in modal && modal.type === "modal") {
|
if ("name" in modal && "execute" in modal) {
|
||||||
client.modals.set(modal.name, modal)
|
client.modals.set(modal.name, modal)
|
||||||
} else {
|
} else {
|
||||||
console.log(
|
console.log(
|
||||||
|
|||||||
197
đ
Normal file
197
đ
Normal file
@@ -0,0 +1,197 @@
|
|||||||
|
import {
|
||||||
|
SlashCommandBuilder,
|
||||||
|
PermissionFlagsBits,
|
||||||
|
ButtonBuilder,
|
||||||
|
ActionRowBuilder,
|
||||||
|
ButtonStyle,
|
||||||
|
ChannelType,
|
||||||
|
TextChannel,
|
||||||
|
} from "discord.js"
|
||||||
|
import { color, devMessage } from "config/options.json"
|
||||||
|
import { Command } from "interfaces"
|
||||||
|
|
||||||
|
export = {
|
||||||
|
name: "setup",
|
||||||
|
description: "Used for setup of the bot.",
|
||||||
|
type: "slash",
|
||||||
|
dev: true,
|
||||||
|
public: false,
|
||||||
|
subcommands: true,
|
||||||
|
|
||||||
|
data: new SlashCommandBuilder()
|
||||||
|
.setName("setup")
|
||||||
|
.setDescription("Configure the bot.")
|
||||||
|
.addSubcommand(subcommand =>
|
||||||
|
subcommand
|
||||||
|
.setName("sendguildapplication")
|
||||||
|
.setDescription("Send the application message to a channel.")
|
||||||
|
.addChannelOption(option =>
|
||||||
|
option
|
||||||
|
.setName("channel")
|
||||||
|
.setDescription(
|
||||||
|
"The channel to send the application to.",
|
||||||
|
)
|
||||||
|
.addChannelTypes(
|
||||||
|
ChannelType.GuildText,
|
||||||
|
ChannelType.GuildAnnouncement,
|
||||||
|
)
|
||||||
|
.setRequired(true),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.addSubcommand(subcommand =>
|
||||||
|
subcommand
|
||||||
|
.setName("sendstaffapplication")
|
||||||
|
.setDescription("Send the application message to a channel.")
|
||||||
|
.addChannelOption(option =>
|
||||||
|
option
|
||||||
|
.setName("channel")
|
||||||
|
.setDescription(
|
||||||
|
"The channel to send the application to.",
|
||||||
|
)
|
||||||
|
.addChannelTypes(
|
||||||
|
ChannelType.GuildText,
|
||||||
|
ChannelType.GuildAnnouncement,
|
||||||
|
)
|
||||||
|
.setRequired(true),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.addSubcommand(subcommand =>
|
||||||
|
subcommand
|
||||||
|
.setName("sendverfiymessage")
|
||||||
|
.setDescription("Send the verfiy message to a channel.")
|
||||||
|
.addChannelOption(option =>
|
||||||
|
option
|
||||||
|
.setName("channel")
|
||||||
|
.setDescription(
|
||||||
|
"The channel to send the verfiy message to.",
|
||||||
|
)
|
||||||
|
.addChannelTypes(
|
||||||
|
ChannelType.GuildText,
|
||||||
|
ChannelType.GuildAnnouncement,
|
||||||
|
)
|
||||||
|
.setRequired(true),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.addSubcommand(subcommand =>
|
||||||
|
subcommand
|
||||||
|
.setName("sendwaitinglistmessage")
|
||||||
|
.setDescription("Send the waiting list message to a channel.")
|
||||||
|
.addChannelOption(option =>
|
||||||
|
option
|
||||||
|
.setName("channel")
|
||||||
|
.setDescription(
|
||||||
|
"The channel to send the waiting list message to.",
|
||||||
|
)
|
||||||
|
.addChannelTypes(
|
||||||
|
ChannelType.GuildText,
|
||||||
|
ChannelType.GuildAnnouncement,
|
||||||
|
)
|
||||||
|
.setRequired(true),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.addSubcommand(subcommand =>
|
||||||
|
subcommand
|
||||||
|
.setName("sendinactivityapplication")
|
||||||
|
.setDescription("Send the application message to a channel.")
|
||||||
|
.addChannelOption(option =>
|
||||||
|
option
|
||||||
|
.setName("channel")
|
||||||
|
.setDescription(
|
||||||
|
"The channel to send the application to.",
|
||||||
|
)
|
||||||
|
.addChannelTypes(
|
||||||
|
ChannelType.GuildText,
|
||||||
|
ChannelType.GuildAnnouncement,
|
||||||
|
)
|
||||||
|
.setRequired(true),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
|
.setDMPermission(false),
|
||||||
|
|
||||||
|
async execute(interaction) {
|
||||||
|
const subcommand = interaction.options.getSubcommand()
|
||||||
|
const channel = interaction.options.getChannel("channel") as TextChannel
|
||||||
|
const embedColor = Number(color.replace("#", "0x"))
|
||||||
|
let title: string = ""
|
||||||
|
let description: string = ""
|
||||||
|
let customId: string = ""
|
||||||
|
let label: string = ""
|
||||||
|
let emoji: string = ""
|
||||||
|
|
||||||
|
if (subcommand === "sendguildapplication") {
|
||||||
|
title = "Guild Application"
|
||||||
|
description =
|
||||||
|
"You can apply for the guild by clicking the button below."
|
||||||
|
customId = "guildapply"
|
||||||
|
label = "Apply"
|
||||||
|
emoji = "✅"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (subcommand === "sendstaffapplication") {
|
||||||
|
title = "Staff Application"
|
||||||
|
description =
|
||||||
|
"You can apply for the staff team by clicking the button below."
|
||||||
|
customId = "staffapply"
|
||||||
|
label = "Apply"
|
||||||
|
emoji = "✅"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (subcommand === "sendinactivityapplication") {
|
||||||
|
title = "Inactivity Log"
|
||||||
|
description =
|
||||||
|
"You can send an inactivity log by clicking the button below."
|
||||||
|
customId = "guildinactivitylog"
|
||||||
|
label = "Submit"
|
||||||
|
emoji = "✅"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (subcommand === "sendverfiymessage") {
|
||||||
|
title = "Verification"
|
||||||
|
description = "You can verify by clicking the button below."
|
||||||
|
customId = "verify"
|
||||||
|
label = "Verify"
|
||||||
|
emoji = "✅"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (subcommand === "sendwaitinglistmessage") {
|
||||||
|
title = "Waiting List"
|
||||||
|
description = "The people on the waiting list"
|
||||||
|
customId = "waitinglistupdate"
|
||||||
|
label = "Update"
|
||||||
|
emoji = "🔄"
|
||||||
|
}
|
||||||
|
|
||||||
|
await channel.send({
|
||||||
|
embeds: [
|
||||||
|
{
|
||||||
|
title: title,
|
||||||
|
description: description,
|
||||||
|
color: embedColor,
|
||||||
|
thumbnail: {
|
||||||
|
url: interaction.guild!.iconURL() || "",
|
||||||
|
},
|
||||||
|
footer: {
|
||||||
|
text: interaction.guild!.name + " | " + devMessage,
|
||||||
|
icon_url: interaction.guild!.iconURL() || undefined,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
components: [
|
||||||
|
new ActionRowBuilder<ButtonBuilder>().addComponents(
|
||||||
|
new ButtonBuilder()
|
||||||
|
.setCustomId(customId)
|
||||||
|
.setLabel(label)
|
||||||
|
.setStyle(ButtonStyle.Primary)
|
||||||
|
.setEmoji({ name: emoji }),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
})
|
||||||
|
|
||||||
|
await interaction.reply({
|
||||||
|
content: "Message sent",
|
||||||
|
ephemeral: true,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
} as Command
|
||||||
|
|
||||||
Reference in New Issue
Block a user