Updated ephemreal deprecation
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { channelMention, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, TextChannel, userMention } from "discord.js"
|
||||
import { channelMention, InteractionContextType, MessageFlags, PermissionFlagsBits, SlashCommandBuilder, TextChannel, userMention } from "discord.js"
|
||||
import { embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/typings"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
@@ -22,7 +22,7 @@ export default {
|
||||
.setContexts(InteractionContextType.Guild),
|
||||
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply({ ephemeral: true })
|
||||
await interaction.deferReply({ flags: MessageFlags.Ephemeral })
|
||||
|
||||
const amount = interaction.options.getInteger("amount")!
|
||||
const channel = interaction.channel as TextChannel
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ComponentType, InteractionContextType, SlashCommandBuilder } from "discord.js"
|
||||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ComponentType, InteractionContextType, MessageFlags, SlashCommandBuilder } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/typings"
|
||||
|
||||
@@ -139,7 +139,7 @@ export default {
|
||||
if (page === 1) {
|
||||
await i.reply({
|
||||
content: "You are already at the first page",
|
||||
ephemeral: true
|
||||
flags: MessageFlags.Ephemeral
|
||||
})
|
||||
return
|
||||
}
|
||||
@@ -161,14 +161,14 @@ export default {
|
||||
|
||||
await i.reply({
|
||||
content: "Page " + page,
|
||||
ephemeral: true
|
||||
flags: MessageFlags.Ephemeral
|
||||
})
|
||||
}
|
||||
if (i.customId === nextId) {
|
||||
if (page === maxPage) {
|
||||
await i.reply({
|
||||
content: "You are already at the last page",
|
||||
ephemeral: true
|
||||
flags: MessageFlags.Ephemeral
|
||||
})
|
||||
return
|
||||
}
|
||||
@@ -190,7 +190,7 @@ export default {
|
||||
|
||||
await i.reply({
|
||||
content: "Page " + page,
|
||||
ephemeral: true
|
||||
flags: MessageFlags.Ephemeral
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ChannelType, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, TextChannel } from "discord.js"
|
||||
import { ChannelType, InteractionContextType, MessageFlags, PermissionFlagsBits, SlashCommandBuilder, TextChannel } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/typings"
|
||||
|
||||
@@ -27,7 +27,7 @@ export default {
|
||||
.setContexts(InteractionContextType.Guild),
|
||||
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply({ ephemeral: true })
|
||||
await interaction.deferReply({ flags: MessageFlags.Ephemeral })
|
||||
|
||||
const message = interaction.options.getString("message")!
|
||||
const channel = (interaction.options.getChannel("channel") || interaction.channel) as TextChannel
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { GuildMember, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
||||
import { GuildMember, InteractionContextType, MessageFlags, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/typings"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
@@ -34,7 +34,7 @@ export default {
|
||||
if (!member.manageable) {
|
||||
interaction.reply({
|
||||
content: "I cannot set the nickname for this user!",
|
||||
ephemeral: true
|
||||
flags: MessageFlags.Ephemeral
|
||||
})
|
||||
return
|
||||
}
|
||||
@@ -74,7 +74,7 @@ export default {
|
||||
icon_url: interaction.guild!.iconURL() || undefined
|
||||
}
|
||||
}],
|
||||
ephemeral: true
|
||||
flags: MessageFlags.Ephemeral
|
||||
})
|
||||
}
|
||||
} as ICommand
|
||||
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
ButtonStyle,
|
||||
ChannelType,
|
||||
InteractionContextType,
|
||||
MessageFlags,
|
||||
PermissionFlagsBits,
|
||||
SlashCommandBuilder,
|
||||
TextChannel
|
||||
@@ -159,7 +160,7 @@ export default {
|
||||
|
||||
await interaction.reply({
|
||||
content: "Message sent",
|
||||
ephemeral: true
|
||||
flags: MessageFlags.Ephemeral
|
||||
})
|
||||
}
|
||||
} as ICommand
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
import { channelMention, ChannelType, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, TextChannel, userMention } from "discord.js"
|
||||
import {
|
||||
channelMention,
|
||||
ChannelType,
|
||||
InteractionContextType,
|
||||
MessageFlags,
|
||||
PermissionFlagsBits,
|
||||
SlashCommandBuilder,
|
||||
TextChannel,
|
||||
userMention
|
||||
} from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { ICommand } from "~/typings"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
@@ -27,7 +36,7 @@ export default {
|
||||
.setContexts(InteractionContextType.Guild),
|
||||
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply({ ephemeral: true })
|
||||
await interaction.deferReply({ flags: MessageFlags.Ephemeral })
|
||||
|
||||
const seconds = interaction.options.getInteger("seconds") ?? 5
|
||||
const channel = (interaction.options.getChannel("channel") || interaction.channel) as TextChannel
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ComponentType } from "discord.js"
|
||||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ComponentType, MessageFlags } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options.js"
|
||||
import { SubCommmndClient } from "~/typings"
|
||||
|
||||
@@ -126,7 +126,7 @@ const cmd: SubCommmndClient = async (interaction, client) => {
|
||||
if (page === 1) {
|
||||
await i.reply({
|
||||
content: "You are already at the first page",
|
||||
ephemeral: true
|
||||
flags: MessageFlags.Ephemeral
|
||||
})
|
||||
return
|
||||
}
|
||||
@@ -148,14 +148,14 @@ const cmd: SubCommmndClient = async (interaction, client) => {
|
||||
|
||||
await i.reply({
|
||||
content: "Page " + page,
|
||||
ephemeral: true
|
||||
flags: MessageFlags.Ephemeral
|
||||
})
|
||||
}
|
||||
if (i.customId === nextId) {
|
||||
if (page === maxPage) {
|
||||
await i.reply({
|
||||
content: "You are already at the last page",
|
||||
ephemeral: true
|
||||
flags: MessageFlags.Ephemeral
|
||||
})
|
||||
return
|
||||
}
|
||||
@@ -177,7 +177,7 @@ const cmd: SubCommmndClient = async (interaction, client) => {
|
||||
|
||||
await i.reply({
|
||||
content: "Page " + page,
|
||||
ephemeral: true
|
||||
flags: MessageFlags.Ephemeral
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user