Added contexts for slashcommands
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { anilist } from "anilist"
|
import { anilist } from "anilist"
|
||||||
import { devMessage, embedColor } from "config/options.js"
|
import { devMessage, embedColor } from "config/options.js"
|
||||||
import { SlashCommandBuilder } from "discord.js"
|
import { InteractionContextType, SlashCommandBuilder } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -17,7 +17,8 @@ export default {
|
|||||||
.setName("query")
|
.setName("query")
|
||||||
.setDescription("The anime to search for")
|
.setDescription("The anime to search for")
|
||||||
.setRequired(true)
|
.setRequired(true)
|
||||||
),
|
)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { devMessage, embedColor } from "config/options.js"
|
import { devMessage, embedColor } from "config/options.js"
|
||||||
import { admin, helper } from "config/roles.js"
|
import { admin, helper } from "config/roles.js"
|
||||||
import { GuildMember, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
import { GuildMember, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import logToChannel from "utils/functions/logtochannel.js"
|
import logToChannel from "utils/functions/logtochannel.js"
|
||||||
|
|
||||||
@@ -38,7 +38,8 @@ export default {
|
|||||||
{ name: "7 days", value: 7 }
|
{ name: "7 days", value: 7 }
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.BanMembers),
|
.setDefaultMemberPermissions(PermissionFlagsBits.BanMembers)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { execSync } from "child_process"
|
import { execSync } from "child_process"
|
||||||
import { devMessage, embedColor } from "config/options.js"
|
import { devMessage, embedColor } from "config/options.js"
|
||||||
import { SlashCommandBuilder } from "discord.js"
|
import { InteractionContextType, SlashCommandBuilder } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import { createRequire } from "node:module"
|
import { createRequire } from "node:module"
|
||||||
import os from "os"
|
import os from "os"
|
||||||
@@ -17,7 +17,8 @@ export default {
|
|||||||
|
|
||||||
data: new SlashCommandBuilder()
|
data: new SlashCommandBuilder()
|
||||||
.setName("botinfo")
|
.setName("botinfo")
|
||||||
.setDescription("Get information about the bot"),
|
.setDescription("Get information about the bot")
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction, client }) {
|
async execute({ interaction, client }) {
|
||||||
const castedDeps = dependencies as { [key: string]: string }
|
const castedDeps = dependencies as { [key: string]: string }
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { devMessage, embedColor } from "config/options.js"
|
import { devMessage, embedColor } from "config/options.js"
|
||||||
import { bwfkdr, bwstars, bwwins, duelswins, duelswlr, swkdr, swstars } from "config/reqs.js"
|
import { bwfkdr, bwstars, bwwins, duelswins, duelswlr, swkdr, swstars } from "config/reqs.js"
|
||||||
import { SlashCommandBuilder } from "discord.js"
|
import { InteractionContextType, SlashCommandBuilder } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import { bedwarsLevel, getGuild, getHeadURL, getPlayer, getUUID, hypixelLevel, skywarsLevel } from "utils/Hypixel.js"
|
import { bedwarsLevel, getGuild, getHeadURL, getPlayer, getUUID, hypixelLevel, skywarsLevel } from "utils/Hypixel.js"
|
||||||
|
|
||||||
@@ -20,7 +20,8 @@ export default {
|
|||||||
.setMinLength(3)
|
.setMinLength(3)
|
||||||
.setMaxLength(16)
|
.setMaxLength(16)
|
||||||
.setRequired(true)
|
.setRequired(true)
|
||||||
),
|
)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
await interaction.deferReply({})
|
await interaction.deferReply({})
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { embedColor } from "config/options.js"
|
import { embedColor } from "config/options.js"
|
||||||
import { channelMention, PermissionFlagsBits, SlashCommandBuilder, TextChannel, userMention } from "discord.js"
|
import { channelMention, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, TextChannel, userMention } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import logToChannel from "utils/functions/logtochannel.js"
|
import logToChannel from "utils/functions/logtochannel.js"
|
||||||
|
|
||||||
@@ -18,7 +18,8 @@ export default {
|
|||||||
.setDescription("Amount of messages to clear")
|
.setDescription("Amount of messages to clear")
|
||||||
.setRequired(true)
|
.setRequired(true)
|
||||||
)
|
)
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
await interaction.deferReply({ ephemeral: true })
|
await interaction.deferReply({ ephemeral: true })
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { embedColor } from "config/options.js"
|
import { embedColor } from "config/options.js"
|
||||||
import { PermissionFlagsBits, SlashCommandBuilder } from "discord.js"
|
import { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import settings from "schemas/settingsTag.js"
|
import settings from "schemas/settingsTag.js"
|
||||||
|
|
||||||
@@ -28,7 +28,8 @@ export default {
|
|||||||
.setDescription("The value to set")
|
.setDescription("The value to set")
|
||||||
.setRequired(true)
|
.setRequired(true)
|
||||||
)
|
)
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { devMessage, embedColor } from "config/options.js"
|
import { devMessage, embedColor } from "config/options.js"
|
||||||
import { PermissionFlagsBits, SlashCommandBuilder } from "discord.js"
|
import { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import ban from "./counting/ban.js"
|
import ban from "./counting/ban.js"
|
||||||
import unban from "./counting/unban.js"
|
import unban from "./counting/unban.js"
|
||||||
@@ -36,7 +36,8 @@ export default {
|
|||||||
.setRequired(true)
|
.setRequired(true)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
const subcommand = interaction.options.getSubcommand()
|
const subcommand = interaction.options.getSubcommand()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { devMessage, embedColor } from "config/options.js"
|
import { devMessage, embedColor } from "config/options.js"
|
||||||
import { PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
import { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import verify from "schemas/verifyTag.js"
|
import verify from "schemas/verifyTag.js"
|
||||||
import { getHeadURL, getIGN, getUUID } from "utils/Hypixel.js"
|
import { getHeadURL, getIGN, getUUID } from "utils/Hypixel.js"
|
||||||
@@ -19,7 +19,8 @@ export default {
|
|||||||
.setDescription("The ign to lookup.")
|
.setDescription("The ign to lookup.")
|
||||||
.setRequired(true)
|
.setRequired(true)
|
||||||
)
|
)
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { devMessage, embedColor } from "config/options.js"
|
import { devMessage, embedColor } from "config/options.js"
|
||||||
import { GuildMember, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
import { GuildMember, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import verify from "schemas/verifyTag.js"
|
import verify from "schemas/verifyTag.js"
|
||||||
import logToChannel from "utils/functions/logtochannel.js"
|
import logToChannel from "utils/functions/logtochannel.js"
|
||||||
@@ -21,7 +21,8 @@ export default {
|
|||||||
.setDescription("The user to force unverify")
|
.setDescription("The user to force unverify")
|
||||||
.setRequired(true)
|
.setRequired(true)
|
||||||
)
|
)
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
const member = interaction.options.getMember("user") as GuildMember
|
const member = interaction.options.getMember("user") as GuildMember
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { devMessage, embedColor, hypixelGuildID } from "config/options.js"
|
import { devMessage, embedColor, hypixelGuildID } from "config/options.js"
|
||||||
import { waitingListRole } from "config/roles.js"
|
import { waitingListRole } from "config/roles.js"
|
||||||
import { GuildMember, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
import { GuildMember, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import verify from "schemas/verifyTag.js"
|
import verify from "schemas/verifyTag.js"
|
||||||
import roleManage from "utils/functions/rolesmanage.js"
|
import roleManage from "utils/functions/rolesmanage.js"
|
||||||
@@ -21,7 +21,8 @@ export default {
|
|||||||
.setDescription("The user to force update")
|
.setDescription("The user to force update")
|
||||||
.setRequired(true)
|
.setRequired(true)
|
||||||
)
|
)
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { devMessage, embedColor, hypixelGuildID } from "config/options.js"
|
import { devMessage, embedColor, hypixelGuildID } from "config/options.js"
|
||||||
import { GuildMember, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
import { GuildMember, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import verify from "schemas/verifyTag.js"
|
import verify from "schemas/verifyTag.js"
|
||||||
import logToChannel from "utils/functions/logtochannel.js"
|
import logToChannel from "utils/functions/logtochannel.js"
|
||||||
@@ -25,7 +25,8 @@ export default {
|
|||||||
.setName("ign")
|
.setName("ign")
|
||||||
.setDescription("The user's in-game name.")
|
.setDescription("The user's in-game name.")
|
||||||
)
|
)
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { devMessage, embedColor } from "config/options.js"
|
import { devMessage, embedColor } from "config/options.js"
|
||||||
import { SlashCommandBuilder } from "discord.js"
|
import { InteractionContextType, SlashCommandBuilder } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import guildInfo from "./guild/info.js"
|
import guildInfo from "./guild/info.js"
|
||||||
import guildMember from "./guild/member.js"
|
import guildMember from "./guild/member.js"
|
||||||
@@ -74,7 +74,8 @@ export default {
|
|||||||
.setName("amount")
|
.setName("amount")
|
||||||
.setDescription("The amount of guild members to show. [Default: 10]")
|
.setDescription("The amount of guild members to show. [Default: 10]")
|
||||||
)
|
)
|
||||||
),
|
)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
const subcommand = interaction.options.getSubcommand()
|
const subcommand = interaction.options.getSubcommand()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { devMessage, embedColor } from "config/options.js"
|
import { devMessage, embedColor } from "config/options.js"
|
||||||
import { SlashCommandBuilder } from "discord.js"
|
import { InteractionContextType, SlashCommandBuilder } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -10,7 +10,8 @@ export default {
|
|||||||
|
|
||||||
data: new SlashCommandBuilder()
|
data: new SlashCommandBuilder()
|
||||||
.setName("help")
|
.setName("help")
|
||||||
.setDescription("List's all commands usable by a member"),
|
.setDescription("List's all commands usable by a member")
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction, client }) {
|
async execute({ interaction, client }) {
|
||||||
await interaction.deferReply({ ephemeral: true })
|
await interaction.deferReply({ ephemeral: true })
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { devMessage, embedColor, instructionsgif } from "config/options.js"
|
import { devMessage, embedColor, instructionsgif } from "config/options.js"
|
||||||
import { PermissionFlagsBits, SlashCommandBuilder } from "discord.js"
|
import { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -11,7 +11,8 @@ export default {
|
|||||||
data: new SlashCommandBuilder()
|
data: new SlashCommandBuilder()
|
||||||
.setName("instructions")
|
.setName("instructions")
|
||||||
.setDescription("Instructions for verification")
|
.setDescription("Instructions for verification")
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
await interaction.reply({
|
await interaction.reply({
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { devMessage, embedColor } from "config/options.js"
|
import { devMessage, embedColor } from "config/options.js"
|
||||||
import { admin, helper } from "config/roles.js"
|
import { admin, helper } from "config/roles.js"
|
||||||
import { GuildMember, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
import { GuildMember, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import logToChannel from "utils/functions/logtochannel.js"
|
import logToChannel from "utils/functions/logtochannel.js"
|
||||||
|
|
||||||
@@ -24,7 +24,8 @@ export default {
|
|||||||
.setName("reason")
|
.setName("reason")
|
||||||
.setDescription("Reason for kicking the member.")
|
.setDescription("Reason for kicking the member.")
|
||||||
)
|
)
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.KickMembers),
|
.setDefaultMemberPermissions(PermissionFlagsBits.KickMembers)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { PermissionFlagsBits, SlashCommandBuilder } from "discord.js"
|
import { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import leave from "./music/leave.js"
|
import leave from "./music/leave.js"
|
||||||
import nowplaying from "./music/nowplaying.js"
|
import nowplaying from "./music/nowplaying.js"
|
||||||
@@ -79,7 +79,8 @@ export default {
|
|||||||
.setName("leave")
|
.setName("leave")
|
||||||
.setDescription("Leave the voice channel")
|
.setDescription("Leave the voice channel")
|
||||||
)
|
)
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
const subcommand = interaction.options.getSubcommand()
|
const subcommand = interaction.options.getSubcommand()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { devMessage, embedColor } from "config/options.js"
|
import { devMessage, embedColor } from "config/options.js"
|
||||||
import { SlashCommandBuilder } from "discord.js"
|
import { InteractionContextType, SlashCommandBuilder } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -10,7 +10,8 @@ export default {
|
|||||||
|
|
||||||
data: new SlashCommandBuilder()
|
data: new SlashCommandBuilder()
|
||||||
.setName("ping")
|
.setName("ping")
|
||||||
.setDescription("Get's the bot's ping."),
|
.setDescription("Get's the bot's ping.")
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction, client }) {
|
async execute({ interaction, client }) {
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { embedColor } from "config/options.js"
|
import { embedColor } from "config/options.js"
|
||||||
import { SlashCommandBuilder, User } from "discord.js"
|
import { InteractionContextType, SlashCommandBuilder, User } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import env from "utils/Env.js"
|
import env from "utils/Env.js"
|
||||||
|
|
||||||
@@ -17,7 +17,8 @@ export default {
|
|||||||
.setName("user")
|
.setName("user")
|
||||||
.setDescription("User to show pp size")
|
.setDescription("User to show pp size")
|
||||||
.setRequired(false)
|
.setRequired(false)
|
||||||
),
|
)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
const user = (interaction.options.getUser("user") || interaction.user) as User
|
const user = (interaction.options.getUser("user") || interaction.user) as User
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { devMessage, embedColor } from "config/options.js"
|
import { devMessage, embedColor } from "config/options.js"
|
||||||
import { waitingListRole } from "config/roles.js"
|
import { waitingListRole } from "config/roles.js"
|
||||||
import { GuildMember, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
import { GuildMember, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import waitinglist from "schemas/waitinglistTag.js"
|
import waitinglist from "schemas/waitinglistTag.js"
|
||||||
import logToChannel from "utils/functions/logtochannel.js"
|
import logToChannel from "utils/functions/logtochannel.js"
|
||||||
@@ -26,7 +26,8 @@ export default {
|
|||||||
.setDescription("The reason for removing the user.")
|
.setDescription("The reason for removing the user.")
|
||||||
.setRequired(false)
|
.setRequired(false)
|
||||||
)
|
)
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { devMessage, embedColor } from "config/options.js"
|
import { devMessage, embedColor } from "config/options.js"
|
||||||
import { bwfkdr, bwstars, bwwins, duelswins, duelswlr, swkdr, swstars } from "config/reqs.js"
|
import { bwfkdr, bwstars, bwwins, duelswins, duelswlr, swkdr, swstars } from "config/reqs.js"
|
||||||
import { SlashCommandBuilder } from "discord.js"
|
import { InteractionContextType, SlashCommandBuilder } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -11,7 +11,8 @@ export default {
|
|||||||
|
|
||||||
data: new SlashCommandBuilder()
|
data: new SlashCommandBuilder()
|
||||||
.setName("reqs")
|
.setName("reqs")
|
||||||
.setDescription("Displays the requirements for the guild."),
|
.setDescription("Displays the requirements for the guild.")
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
await interaction.reply({
|
await interaction.reply({
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { devMessage, embedColor } from "config/options.js"
|
import { devMessage, embedColor } from "config/options.js"
|
||||||
import { ChannelType, PermissionFlagsBits, SlashCommandBuilder, TextChannel } from "discord.js"
|
import { ChannelType, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, TextChannel } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -23,7 +23,8 @@ export default {
|
|||||||
.setDescription("The channel to send the message to.")
|
.setDescription("The channel to send the message to.")
|
||||||
.addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement)
|
.addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement)
|
||||||
)
|
)
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
await interaction.deferReply({ ephemeral: true })
|
await interaction.deferReply({ ephemeral: true })
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { devMessage, embedColor } from "config/options.js"
|
import { devMessage, embedColor } from "config/options.js"
|
||||||
import { GuildMember, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
import { GuildMember, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import logToChannel from "utils/functions/logtochannel.js"
|
import logToChannel from "utils/functions/logtochannel.js"
|
||||||
|
|
||||||
@@ -24,7 +24,8 @@ export default {
|
|||||||
.setDescription("The nickname to set")
|
.setDescription("The nickname to set")
|
||||||
.setRequired(true)
|
.setRequired(true)
|
||||||
)
|
)
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.ManageNicknames),
|
.setDefaultMemberPermissions(PermissionFlagsBits.ManageNicknames)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
const member = interaction.options.getMember("user") as GuildMember
|
const member = interaction.options.getMember("user") as GuildMember
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
import { devMessage, embedColor } from "config/options.js"
|
import { devMessage, embedColor } from "config/options.js"
|
||||||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ChannelType, PermissionFlagsBits, SlashCommandBuilder, TextChannel } from "discord.js"
|
import {
|
||||||
|
ActionRowBuilder,
|
||||||
|
ButtonBuilder,
|
||||||
|
ButtonStyle,
|
||||||
|
ChannelType,
|
||||||
|
InteractionContextType,
|
||||||
|
PermissionFlagsBits,
|
||||||
|
SlashCommandBuilder,
|
||||||
|
TextChannel
|
||||||
|
} from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -72,7 +81,8 @@ export default {
|
|||||||
.setRequired(true)
|
.setRequired(true)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
const subcommand = interaction.options.getSubcommand()
|
const subcommand = interaction.options.getSubcommand()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { devMessage, embedColor } from "config/options.js"
|
import { devMessage, embedColor } from "config/options.js"
|
||||||
import { channelMention, ChannelType, PermissionFlagsBits, SlashCommandBuilder, TextChannel, userMention } from "discord.js"
|
import { channelMention, ChannelType, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, TextChannel, userMention } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import logToChannel from "utils/functions/logtochannel.js"
|
import logToChannel from "utils/functions/logtochannel.js"
|
||||||
|
|
||||||
@@ -23,7 +23,8 @@ export default {
|
|||||||
.setDescription("The channel to set the slowmode of.")
|
.setDescription("The channel to set the slowmode of.")
|
||||||
.addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement)
|
.addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement)
|
||||||
)
|
)
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
await interaction.deferReply({ ephemeral: true })
|
await interaction.deferReply({ ephemeral: true })
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { devMessage, embedColor } from "config/options.js"
|
import { devMessage, embedColor } from "config/options.js"
|
||||||
import { PermissionFlagsBits, SlashCommandBuilder } from "discord.js"
|
import { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import beast from "./staff/beast.js"
|
import beast from "./staff/beast.js"
|
||||||
import help from "./staff/help.js"
|
import help from "./staff/help.js"
|
||||||
@@ -48,7 +48,8 @@ export default {
|
|||||||
.setName("updateall")
|
.setName("updateall")
|
||||||
.setDescription("Update the discord roles of all guild members")
|
.setDescription("Update the discord roles of all guild members")
|
||||||
)
|
)
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction, client }) {
|
async execute({ interaction, client }) {
|
||||||
const subcommand = interaction.options.getSubcommand()
|
const subcommand = interaction.options.getSubcommand()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { devMessage, embedColor } from "config/options.js"
|
import { devMessage, embedColor } from "config/options.js"
|
||||||
import { GuildMember, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
import { GuildMember, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import ms from "ms"
|
import ms from "ms"
|
||||||
import prettyMs from "pretty-ms"
|
import prettyMs from "pretty-ms"
|
||||||
@@ -31,7 +31,8 @@ export default {
|
|||||||
.setName("reason")
|
.setName("reason")
|
||||||
.setDescription("The reason for the timeout")
|
.setDescription("The reason for the timeout")
|
||||||
)
|
)
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { devMessage, embedColor } from "config/options.js"
|
import { devMessage, embedColor } from "config/options.js"
|
||||||
import { PermissionFlagsBits, SlashCommandBuilder, User, userMention } from "discord.js"
|
import { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, User, userMention } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import logToChannel from "utils/functions/logtochannel.js"
|
import logToChannel from "utils/functions/logtochannel.js"
|
||||||
|
|
||||||
@@ -25,7 +25,8 @@ export default {
|
|||||||
.setDescription("The reason for unbanning the user")
|
.setDescription("The reason for unbanning the user")
|
||||||
.setRequired(false)
|
.setRequired(false)
|
||||||
)
|
)
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.BanMembers),
|
.setDefaultMemberPermissions(PermissionFlagsBits.BanMembers)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { devMessage, embedColor, hypixelGuildID } from "config/options.js"
|
import { devMessage, embedColor, hypixelGuildID } from "config/options.js"
|
||||||
import { waitingListRole } from "config/roles.js"
|
import { waitingListRole } from "config/roles.js"
|
||||||
import { GuildMember, SlashCommandBuilder } from "discord.js"
|
import { GuildMember, InteractionContextType, SlashCommandBuilder } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import verify from "schemas/verifyTag.js"
|
import verify from "schemas/verifyTag.js"
|
||||||
import roleManage from "utils/functions/rolesmanage.js"
|
import roleManage from "utils/functions/rolesmanage.js"
|
||||||
@@ -14,7 +14,8 @@ export default {
|
|||||||
|
|
||||||
data: new SlashCommandBuilder()
|
data: new SlashCommandBuilder()
|
||||||
.setName("update")
|
.setName("update")
|
||||||
.setDescription("Update your discord roles."),
|
.setDescription("Update your discord roles.")
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { devMessage, embedColor } from "config/options.js"
|
import { devMessage, embedColor } from "config/options.js"
|
||||||
import { SlashCommandBuilder } from "discord.js"
|
import { InteractionContextType, SlashCommandBuilder } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import { formatUuid, getHeadURL, getIGN, getUUID } from "utils/Hypixel.js"
|
import { formatUuid, getHeadURL, getIGN, getUUID } from "utils/Hypixel.js"
|
||||||
|
|
||||||
@@ -19,7 +19,8 @@ export default {
|
|||||||
.setMinLength(3)
|
.setMinLength(3)
|
||||||
.setMaxLength(16)
|
.setMaxLength(16)
|
||||||
.setRequired(true)
|
.setRequired(true)
|
||||||
),
|
)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { devMessage, embedColor, hypixelGuildID } from "config/options.js"
|
import { devMessage, embedColor, hypixelGuildID } from "config/options.js"
|
||||||
import { GuildMember, SlashCommandBuilder } from "discord.js"
|
import { GuildMember, InteractionContextType, SlashCommandBuilder } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import { IPlayerData } from "interfaces"
|
import { IPlayerData } from "interfaces"
|
||||||
import { IGuildData } from "interfaces"
|
import { IGuildData } from "interfaces"
|
||||||
@@ -23,7 +23,8 @@ export default {
|
|||||||
.setMinLength(3)
|
.setMinLength(3)
|
||||||
.setMaxLength(16)
|
.setMaxLength(16)
|
||||||
.setRequired(true)
|
.setRequired(true)
|
||||||
),
|
)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { devMessage, embedColor } from "config/options.js"
|
import { devMessage, embedColor } from "config/options.js"
|
||||||
import { SlashCommandBuilder, userMention } from "discord.js"
|
import { InteractionContextType, SlashCommandBuilder, userMention } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import verify from "schemas/verifyTag.js"
|
import verify from "schemas/verifyTag.js"
|
||||||
import { getHeadURL, getIGN } from "utils/Hypixel.js"
|
import { getHeadURL, getIGN } from "utils/Hypixel.js"
|
||||||
@@ -12,7 +12,8 @@ export default {
|
|||||||
|
|
||||||
data: new SlashCommandBuilder()
|
data: new SlashCommandBuilder()
|
||||||
.setName("whoami")
|
.setName("whoami")
|
||||||
.setDescription("Get your user info"),
|
.setDescription("Get your user info")
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { devMessage, embedColor } from "config/options.js"
|
import { devMessage, embedColor } from "config/options.js"
|
||||||
import { PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
import { InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
||||||
import { ICommand } from "interfaces"
|
import { ICommand } from "interfaces"
|
||||||
import verify from "schemas/verifyTag.js"
|
import verify from "schemas/verifyTag.js"
|
||||||
import { getHeadURL, getIGN } from "utils/Hypixel.js"
|
import { getHeadURL, getIGN } from "utils/Hypixel.js"
|
||||||
@@ -19,7 +19,8 @@ export default {
|
|||||||
.setDescription("The user to get the ign of.")
|
.setDescription("The user to get the ign of.")
|
||||||
.setRequired(true)
|
.setRequired(true)
|
||||||
)
|
)
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
|
.setContexts(InteractionContextType.Guild),
|
||||||
|
|
||||||
async execute({ interaction }) {
|
async execute({ interaction }) {
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|||||||
Reference in New Issue
Block a user