Fixed Deprecation of Ephemeral
This commit is contained in:
+10
-10
@@ -1,4 +1,4 @@
|
||||
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js')
|
||||
const { SlashCommandBuilder, EmbedBuilder, MessageFlags } = require('discord.js')
|
||||
const { mClient } = require('../..')
|
||||
const { configDotenv } = require('dotenv')
|
||||
configDotenv()
|
||||
@@ -40,7 +40,7 @@ async function birthdayAdd(interaction) {
|
||||
|
||||
|
||||
if (!isValidDate(day, month)) {
|
||||
return interaction.reply({ content: "Invalid Date", ephemeral: true })
|
||||
return interaction.reply({ content: "Invalid Date", flags: MessageFlags.Ephemeral })
|
||||
}
|
||||
|
||||
const db = mClient.db(process.env.M_DB)
|
||||
@@ -48,7 +48,7 @@ async function birthdayAdd(interaction) {
|
||||
|
||||
const found = await bdayColl.findOne({ userID: target.id })
|
||||
if (found) {
|
||||
return interaction.reply({ content: "Already in Database", ephemeral: true })
|
||||
return interaction.reply({ content: "Already in Database", flags: MessageFlags.Ephemeral })
|
||||
}
|
||||
|
||||
const data = {
|
||||
@@ -81,7 +81,7 @@ async function birthdayDelete(interaction) {
|
||||
|
||||
const found = await bdayColl.findOne({ userID: target.id })
|
||||
if (!found) {
|
||||
return interaction.reply({ content: "Not yet in Database", ephemeral: true })
|
||||
return interaction.reply({ content: "Not yet in Database", flags: MessageFlags.Ephemeral })
|
||||
}
|
||||
|
||||
const res = await bdayColl.deleteOne({ userID: target.id })
|
||||
@@ -98,7 +98,7 @@ async function birthdayEdit(interaction) {
|
||||
|
||||
|
||||
if (!isValidDate(day, month)) {
|
||||
return interaction.reply({ content: "Invalid Date", ephemeral: true })
|
||||
return interaction.reply({ content: "Invalid Date", flags: MessageFlags.Ephemeral })
|
||||
}
|
||||
|
||||
const db = mClient.db(process.env.M_DB)
|
||||
@@ -106,7 +106,7 @@ async function birthdayEdit(interaction) {
|
||||
|
||||
const found = await bdayColl.findOne({ userID: target.id })
|
||||
if (!found) {
|
||||
return interaction.reply({ content: "Not yet in Database", ephemeral: true })
|
||||
return interaction.reply({ content: "Not yet in Database", flags: MessageFlags.Ephemeral })
|
||||
}
|
||||
|
||||
const data = {
|
||||
@@ -147,7 +147,7 @@ async function birthdayGet(interaction) {
|
||||
|
||||
const found = await bdayColl.findOne({ userID: target.id })
|
||||
if (!found) {
|
||||
return interaction.reply({ content: "Not in Database!", ephemeral: true })
|
||||
return interaction.reply({ content: "Not in Database!", flags: MessageFlags.Ephemeral })
|
||||
}
|
||||
let unix
|
||||
if(isDateInPast(found.day,found.month)){
|
||||
@@ -226,7 +226,7 @@ module.exports = {
|
||||
if (!interaction.member.permissions.has("ADMINISTRATOR")) {
|
||||
return await interaction.reply({
|
||||
content: "Unprivileged Access!",
|
||||
ephemeral: true
|
||||
flags: MessageFlags.Ephemeral
|
||||
})
|
||||
}
|
||||
birthdayAdd(interaction)
|
||||
@@ -235,7 +235,7 @@ module.exports = {
|
||||
if (!interaction.member.permissions.has("ADMINISTRATOR")) {
|
||||
return await interaction.reply({
|
||||
content: "Unprivileged Access!",
|
||||
ephemeral: true
|
||||
flags: MessageFlags.Ephemeral
|
||||
})
|
||||
}
|
||||
birthdayDelete(interaction)
|
||||
@@ -244,7 +244,7 @@ module.exports = {
|
||||
if (!interaction.member.permissions.has("ADMINISTRATOR")) {
|
||||
return await interaction.reply({
|
||||
content: "Unprivileged Access!",
|
||||
ephemeral: true
|
||||
flags: MessageFlags.Ephemeral
|
||||
})
|
||||
}
|
||||
birthdayEdit(interaction)
|
||||
|
||||
Reference in New Issue
Block a user