Fixed Deprecation of Ephemeral
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
const { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require("discord.js")
|
const { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, MessageFlags } = require("discord.js")
|
||||||
const { mClient } = require("../..")
|
const { mClient } = require("../..")
|
||||||
require('dotenv').config()
|
require('dotenv').config()
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ module.exports = {
|
|||||||
await interaction.reply({
|
await interaction.reply({
|
||||||
embeds: [embed],
|
embeds: [embed],
|
||||||
components: [row],
|
components: [row],
|
||||||
ephemeral: true
|
flags: MessageFlags.Ephemeral
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
const { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require("discord.js")
|
const { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, MessageFlags } = require("discord.js")
|
||||||
const { mClient } = require("../..")
|
const { mClient } = require("../..")
|
||||||
require('dotenv').config()
|
require('dotenv').config()
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ module.exports = {
|
|||||||
await interaction.reply({
|
await interaction.reply({
|
||||||
embeds: [embed],
|
embeds: [embed],
|
||||||
components: [select, row],
|
components: [select, row],
|
||||||
ephemeral: true
|
flags: MessageFlags.Ephemeral
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
const { EmbedBuilder, ButtonBuilder, ActionRowBuilder, ButtonStyle } = require("discord.js")
|
const { EmbedBuilder, ButtonBuilder, ActionRowBuilder, ButtonStyle, MessageFlags } = require("discord.js")
|
||||||
const { mClient } = require("../..")
|
const { mClient } = require("../..")
|
||||||
require('dotenv').config()
|
require('dotenv').config()
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ module.exports = {
|
|||||||
await interaction.reply({
|
await interaction.reply({
|
||||||
embeds: [embed],
|
embeds: [embed],
|
||||||
components: [row],
|
components: [row],
|
||||||
ephemeral: true
|
flags: MessageFlags.Ephemeral
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
const { EmbedBuilder } = require("discord.js")
|
const { EmbedBuilder, MessageFlags } = require("discord.js")
|
||||||
const { mClient } = require("../..")
|
const { mClient } = require("../..")
|
||||||
require('dotenv').config()
|
require('dotenv').config()
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ module.exports = {
|
|||||||
} else if (temp[5] === '**Dishonor**'){
|
} else if (temp[5] === '**Dishonor**'){
|
||||||
honor = -1
|
honor = -1
|
||||||
} else {
|
} else {
|
||||||
return await interaction.reply({content: "ERROR", ephemeral: true})
|
return await interaction.reply({content: "ERROR", flags: MessageFlags.Ephemeral})
|
||||||
}
|
}
|
||||||
const target = await interaction.message.guild.members.fetch(temp[3].slice(2, -1))
|
const target = await interaction.message.guild.members.fetch(temp[3].slice(2, -1))
|
||||||
temp = interaction.message.embeds[0].description.split('\r\n')
|
temp = interaction.message.embeds[0].description.split('\r\n')
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const { EmbedBuilder, UserSelectMenuBuilder, ActionRowBuilder } = require("discord.js")
|
const { EmbedBuilder, UserSelectMenuBuilder, ActionRowBuilder, MessageFlags } = require("discord.js")
|
||||||
const { mClient } = require("../..")
|
const { mClient } = require("../..")
|
||||||
require('dotenv').config()
|
require('dotenv').config()
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@@ -6,12 +6,12 @@ module.exports = {
|
|||||||
description: 'navigate left',
|
description: 'navigate left',
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
let oldEmbed = interaction.message.embeds[0].data
|
let oldEmbed = interaction.message.embeds[0].data
|
||||||
if (!oldEmbed.footer) { return interaction.reply({ content: 'Please use a Filter', ephemeral: true }) }
|
if (!oldEmbed.footer) { return interaction.reply({ content: 'Please use a Filter', flags: MessageFlags.Ephemeral }) }
|
||||||
if (oldEmbed.fields && oldEmbed.fields[0].value == 0) { return interaction.reply({ content: 'This User has no Quotes', ephemeral: true }) }
|
if (oldEmbed.fields && oldEmbed.fields[0].value == 0) { return interaction.reply({ content: 'This User has no Quotes', flags: MessageFlags.Ephemeral }) }
|
||||||
|
|
||||||
let userID = interaction.message.embeds[0].data.footer.text.split(' ')[5].slice(2, -1)
|
let userID = interaction.message.embeds[0].data.footer.text.split(' ')[5].slice(2, -1)
|
||||||
const target = await interaction.guild.members.fetch(userID)
|
const target = await interaction.guild.members.fetch(userID)
|
||||||
if (!target) { return interaction.reply({ content: 'Please use a Filter', ephemeral: true }) }
|
if (!target) { return interaction.reply({ content: 'Please use a Filter', flags: MessageFlags.Ephemeral }) }
|
||||||
|
|
||||||
const db = mClient.db(process.env.M_DB)
|
const db = mClient.db(process.env.M_DB)
|
||||||
const quotesColl = db.collection('items_quotes')
|
const quotesColl = db.collection('items_quotes')
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const { EmbedBuilder, UserSelectMenuBuilder, ActionRowBuilder } = require("discord.js")
|
const { EmbedBuilder, UserSelectMenuBuilder, ActionRowBuilder, MessageFlags } = require("discord.js")
|
||||||
const { mClient } = require("../..")
|
const { mClient } = require("../..")
|
||||||
require('dotenv').config()
|
require('dotenv').config()
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@@ -6,12 +6,12 @@ module.exports = {
|
|||||||
description: 'navigate right',
|
description: 'navigate right',
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
let oldEmbed = interaction.message.embeds[0].data
|
let oldEmbed = interaction.message.embeds[0].data
|
||||||
if (!oldEmbed.footer) { return interaction.reply({ content: 'Please use a Filter', ephemeral: true }) }
|
if (!oldEmbed.footer) { return interaction.reply({ content: 'Please use a Filter', flags: MessageFlags.Ephemeral }) }
|
||||||
if (oldEmbed.fields && oldEmbed.fields[0].value == 0) { return interaction.reply({ content: 'This User has no Quotes', ephemeral: true }) }
|
if (oldEmbed.fields && oldEmbed.fields[0].value == 0) { return interaction.reply({ content: 'This User has no Quotes', flags: MessageFlags.Ephemeral }) }
|
||||||
|
|
||||||
let userID = interaction.message.embeds[0].data.footer.text.split(' ')[5].slice(2, -1)
|
let userID = interaction.message.embeds[0].data.footer.text.split(' ')[5].slice(2, -1)
|
||||||
const target = await interaction.guild.members.fetch(userID)
|
const target = await interaction.guild.members.fetch(userID)
|
||||||
if (!target) { return interaction.reply({ content: 'Please use a Filter', ephemeral: true }) }
|
if (!target) { return interaction.reply({ content: 'Please use a Filter', flags: MessageFlags.Ephemeral }) }
|
||||||
|
|
||||||
const db = mClient.db(process.env.M_DB)
|
const db = mClient.db(process.env.M_DB)
|
||||||
const quotesColl = db.collection('items_quotes')
|
const quotesColl = db.collection('items_quotes')
|
||||||
@@ -19,7 +19,7 @@ module.exports = {
|
|||||||
|
|
||||||
var index = Number((await interaction.message.embeds[0].data.title).split(' ')[2].slice(1))
|
var index = Number((await interaction.message.embeds[0].data.title).split(' ')[2].slice(1))
|
||||||
if (!index) { index = 0 }
|
if (!index) { index = 0 }
|
||||||
//if (index >= quotes.length){ return interaction.reply({content: 'Max Quotes Reached', ephemeral: true})}
|
//if (index >= quotes.length){ return interaction.reply({content: 'Max Quotes Reached', flags: MessageFlags.Ephemeral})}
|
||||||
if (index >= quotes.length) { index-- }
|
if (index >= quotes.length) { index-- }
|
||||||
|
|
||||||
// will automatically reflect the next index due to how arrays think
|
// will automatically reflect the next index due to how arrays think
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const { SlashCommandBuilder, Events } = require('discord.js')
|
const { SlashCommandBuilder, Events, MessageFlags } = require('discord.js')
|
||||||
const { mClient } = require('../..')
|
const { mClient } = require('../..')
|
||||||
require('dotenv').config()
|
require('dotenv').config()
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ async function channelSet(interaction) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
return await interaction.editReply({
|
return await interaction.editReply({
|
||||||
content: `Set <#${channel.id}> as ${purpose} channel!`, ephemeral: true
|
content: `Set <#${channel.id}> as ${purpose} channel!`, flags: MessageFlags.Ephemeral
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
async function channelSimulate(interaction) {
|
async function channelSimulate(interaction) {
|
||||||
@@ -42,7 +42,7 @@ async function channelSimulate(interaction) {
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return interaction.reply({ content: 'Done.', ephemeral: true })
|
return interaction.reply({ content: 'Done.', flags: MessageFlags.Ephemeral })
|
||||||
}
|
}
|
||||||
async function roleSet(interaction) {
|
async function roleSet(interaction) {
|
||||||
const guild = interaction.guild
|
const guild = interaction.guild
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const { SlashCommandBuilder, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, UserSelectMenuBuilder } = require('discord.js')
|
const { SlashCommandBuilder, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, UserSelectMenuBuilder, MessageFlags } = require('discord.js')
|
||||||
const { mClient } = require('../..')
|
const { mClient } = require('../..')
|
||||||
require('dotenv').config()
|
require('dotenv').config()
|
||||||
function delay(ms) { return new Promise(resolve => setTimeout(resolve, ms)); }
|
function delay(ms) { return new Promise(resolve => setTimeout(resolve, ms)); }
|
||||||
@@ -35,7 +35,7 @@ async function honorHoner(interaction) {
|
|||||||
await interaction.reply({
|
await interaction.reply({
|
||||||
embeds: [embed],
|
embeds: [embed],
|
||||||
components: [row],
|
components: [row],
|
||||||
ephemeral: true
|
flags: MessageFlags.Ephemeral
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
async function honerDishonor(interaction) {
|
async function honerDishonor(interaction) {
|
||||||
@@ -69,7 +69,7 @@ async function honerDishonor(interaction) {
|
|||||||
await interaction.reply({
|
await interaction.reply({
|
||||||
embeds: [embed],
|
embeds: [embed],
|
||||||
components: [row],
|
components: [row],
|
||||||
ephemeral: true
|
flags: MessageFlags.Ephemeral
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
async function honorLeaderboard(interaction) {
|
async function honorLeaderboard(interaction) {
|
||||||
@@ -201,7 +201,7 @@ async function honorMenu(interaction) {
|
|||||||
await interaction.reply({
|
await interaction.reply({
|
||||||
embeds: [embed],
|
embeds: [embed],
|
||||||
components: [select, row],
|
components: [select, row],
|
||||||
ephemeral: true
|
flags: MessageFlags.Ephemeral
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const { SlashCommandBuilder, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js')
|
const { SlashCommandBuilder, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, MessageFlags } = require('discord.js')
|
||||||
const { mClient } = require('../..')
|
const { mClient } = require('../..')
|
||||||
require('dotenv').config()
|
require('dotenv').config()
|
||||||
function delay(ms) { return new Promise(resolve => setTimeout(resolve, ms)); }
|
function delay(ms) { return new Promise(resolve => setTimeout(resolve, ms)); }
|
||||||
@@ -31,7 +31,7 @@ async function nutsGive(interaction) {
|
|||||||
await interaction.reply({
|
await interaction.reply({
|
||||||
embeds: [embed],
|
embeds: [embed],
|
||||||
components: [row],
|
components: [row],
|
||||||
ephemeral: true
|
flags: MessageFlags.Ephemeral
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const from = interaction.user
|
const from = interaction.user
|
||||||
@@ -49,7 +49,7 @@ async function nutsGive(interaction) {
|
|||||||
if (yourBalance.nuts < amount) {
|
if (yourBalance.nuts < amount) {
|
||||||
return await interaction.reply({
|
return await interaction.reply({
|
||||||
content: 'Du kannst nicht mehr geben als du hast!',
|
content: 'Du kannst nicht mehr geben als du hast!',
|
||||||
ephemeral: true
|
flags: MessageFlags.Ephemeral
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return tradeWindow('nuts_give_confirm', 'abort')
|
return tradeWindow('nuts_give_confirm', 'abort')
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
Random By Year?
|
Random By Year?
|
||||||
Counter (Leaderboard)
|
Counter (Leaderboard)
|
||||||
*/
|
*/
|
||||||
const { SlashCommandBuilder, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, UserSelectMenuBuilder } = require('discord.js')
|
const { SlashCommandBuilder, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, UserSelectMenuBuilder, MessageFlags } = require('discord.js')
|
||||||
const { mClient } = require('../..')
|
const { mClient } = require('../..')
|
||||||
require('dotenv').config()
|
require('dotenv').config()
|
||||||
function delay(ms) { return new Promise(resolve => setTimeout(resolve, ms)); }
|
function delay(ms) { return new Promise(resolve => setTimeout(resolve, ms)); }
|
||||||
@@ -15,7 +15,7 @@ async function quotesAdd(interaction) {
|
|||||||
if (!messageLink.match(regex)) {
|
if (!messageLink.match(regex)) {
|
||||||
return await interaction.editReply({
|
return await interaction.editReply({
|
||||||
content: `Invalid URL`,
|
content: `Invalid URL`,
|
||||||
ephemeral: true
|
flags: MessageFlags.Ephemeral
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ async function quotesAdd(interaction) {
|
|||||||
const db = mClient.db(process.env.M_DB)
|
const db = mClient.db(process.env.M_DB)
|
||||||
const quotesColl = db.collection('items_quotes')
|
const quotesColl = db.collection('items_quotes')
|
||||||
const found = await quotesColl.findOne({ messageID: messageID })
|
const found = await quotesColl.findOne({ messageID: messageID })
|
||||||
if (found) { return await interaction.editReply({ content: 'Quote Already in Database', ephemeral: true }) }
|
if (found) { return await interaction.editReply({ content: 'Quote Already in Database', flags: MessageFlags.Ephemeral }) }
|
||||||
await quotesColl.findOneAndUpdate({ messageID: messageID }, {
|
await quotesColl.findOneAndUpdate({ messageID: messageID }, {
|
||||||
$set: {
|
$set: {
|
||||||
messageID: messageID,
|
messageID: messageID,
|
||||||
@@ -89,18 +89,18 @@ async function quotesRemove(interaction) {
|
|||||||
const db = mClient.db(process.env.M_DB)
|
const db = mClient.db(process.env.M_DB)
|
||||||
const quotesColl = db.collection('items_quotes')
|
const quotesColl = db.collection('items_quotes')
|
||||||
const found = await quotesColl.findOne({ messageID: id })
|
const found = await quotesColl.findOne({ messageID: id })
|
||||||
if (!found) { return await interaction.reply({ content: 'ID not found!', ephemeral: true }) }
|
if (!found) { return await interaction.reply({ content: 'ID not found!', flags: MessageFlags.Ephemeral }) }
|
||||||
|
|
||||||
await quotesColl.deleteOne({ messageID: id })
|
await quotesColl.deleteOne({ messageID: id })
|
||||||
|
|
||||||
return interaction.reply({ content: 'Quote successfully removed!', ephemeral: true })
|
return interaction.reply({ content: 'Quote successfully removed!', flags: MessageFlags.Ephemeral })
|
||||||
}
|
}
|
||||||
async function quotesSearch(interaction) {
|
async function quotesSearch(interaction) {
|
||||||
const id = interaction.options.getString("id")
|
const id = interaction.options.getString("id")
|
||||||
const db = mClient.db(process.env.M_DB)
|
const db = mClient.db(process.env.M_DB)
|
||||||
const quotesColl = db.collection('items_quotes')
|
const quotesColl = db.collection('items_quotes')
|
||||||
const found = await quotesColl.findOne({ messageID: id })
|
const found = await quotesColl.findOne({ messageID: id })
|
||||||
if (!found) { return await interaction.reply({ content: 'ID not found!', ephemeral: true }) }
|
if (!found) { return await interaction.reply({ content: 'ID not found!', flags: MessageFlags.Ephemeral }) }
|
||||||
|
|
||||||
|
|
||||||
const guild = await interaction.client.guilds.fetch(found.guildID)
|
const guild = await interaction.client.guilds.fetch(found.guildID)
|
||||||
@@ -176,7 +176,7 @@ async function quotesRandom(interaction) {
|
|||||||
]).toArray()
|
]).toArray()
|
||||||
}
|
}
|
||||||
const found = rdm[0]
|
const found = rdm[0]
|
||||||
if (!found) { return await interaction.reply({ content: 'Database Empty', ephemeral: true }) }
|
if (!found) { return await interaction.reply({ content: 'Database Empty', flags: MessageFlags.Ephemeral }) }
|
||||||
const guild = await interaction.client.guilds.fetch(found.guildID)
|
const guild = await interaction.client.guilds.fetch(found.guildID)
|
||||||
const channel = await guild.channels.fetch(found.channelID)
|
const channel = await guild.channels.fetch(found.channelID)
|
||||||
const message = await channel.messages.fetch(found.messageID)
|
const message = await channel.messages.fetch(found.messageID)
|
||||||
@@ -263,7 +263,7 @@ async function quotesList(interaction) {
|
|||||||
await interaction.reply({
|
await interaction.reply({
|
||||||
embeds: [embed],
|
embeds: [embed],
|
||||||
components: [select, row],
|
components: [select, row],
|
||||||
ephemeral: true
|
flags: MessageFlags.Ephemeral
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-10
@@ -1,4 +1,4 @@
|
|||||||
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js')
|
const { SlashCommandBuilder, EmbedBuilder, MessageFlags } = require('discord.js')
|
||||||
const { mClient } = require('../..')
|
const { mClient } = require('../..')
|
||||||
const { configDotenv } = require('dotenv')
|
const { configDotenv } = require('dotenv')
|
||||||
configDotenv()
|
configDotenv()
|
||||||
@@ -40,7 +40,7 @@ async function birthdayAdd(interaction) {
|
|||||||
|
|
||||||
|
|
||||||
if (!isValidDate(day, month)) {
|
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)
|
const db = mClient.db(process.env.M_DB)
|
||||||
@@ -48,7 +48,7 @@ async function birthdayAdd(interaction) {
|
|||||||
|
|
||||||
const found = await bdayColl.findOne({ userID: target.id })
|
const found = await bdayColl.findOne({ userID: target.id })
|
||||||
if (found) {
|
if (found) {
|
||||||
return interaction.reply({ content: "Already in Database", ephemeral: true })
|
return interaction.reply({ content: "Already in Database", flags: MessageFlags.Ephemeral })
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
@@ -81,7 +81,7 @@ async function birthdayDelete(interaction) {
|
|||||||
|
|
||||||
const found = await bdayColl.findOne({ userID: target.id })
|
const found = await bdayColl.findOne({ userID: target.id })
|
||||||
if (!found) {
|
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 })
|
const res = await bdayColl.deleteOne({ userID: target.id })
|
||||||
@@ -98,7 +98,7 @@ async function birthdayEdit(interaction) {
|
|||||||
|
|
||||||
|
|
||||||
if (!isValidDate(day, month)) {
|
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)
|
const db = mClient.db(process.env.M_DB)
|
||||||
@@ -106,7 +106,7 @@ async function birthdayEdit(interaction) {
|
|||||||
|
|
||||||
const found = await bdayColl.findOne({ userID: target.id })
|
const found = await bdayColl.findOne({ userID: target.id })
|
||||||
if (!found) {
|
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 = {
|
const data = {
|
||||||
@@ -147,7 +147,7 @@ async function birthdayGet(interaction) {
|
|||||||
|
|
||||||
const found = await bdayColl.findOne({ userID: target.id })
|
const found = await bdayColl.findOne({ userID: target.id })
|
||||||
if (!found) {
|
if (!found) {
|
||||||
return interaction.reply({ content: "Not in Database!", ephemeral: true })
|
return interaction.reply({ content: "Not in Database!", flags: MessageFlags.Ephemeral })
|
||||||
}
|
}
|
||||||
let unix
|
let unix
|
||||||
if(isDateInPast(found.day,found.month)){
|
if(isDateInPast(found.day,found.month)){
|
||||||
@@ -226,7 +226,7 @@ module.exports = {
|
|||||||
if (!interaction.member.permissions.has("ADMINISTRATOR")) {
|
if (!interaction.member.permissions.has("ADMINISTRATOR")) {
|
||||||
return await interaction.reply({
|
return await interaction.reply({
|
||||||
content: "Unprivileged Access!",
|
content: "Unprivileged Access!",
|
||||||
ephemeral: true
|
flags: MessageFlags.Ephemeral
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
birthdayAdd(interaction)
|
birthdayAdd(interaction)
|
||||||
@@ -235,7 +235,7 @@ module.exports = {
|
|||||||
if (!interaction.member.permissions.has("ADMINISTRATOR")) {
|
if (!interaction.member.permissions.has("ADMINISTRATOR")) {
|
||||||
return await interaction.reply({
|
return await interaction.reply({
|
||||||
content: "Unprivileged Access!",
|
content: "Unprivileged Access!",
|
||||||
ephemeral: true
|
flags: MessageFlags.Ephemeral
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
birthdayDelete(interaction)
|
birthdayDelete(interaction)
|
||||||
@@ -244,7 +244,7 @@ module.exports = {
|
|||||||
if (!interaction.member.permissions.has("ADMINISTRATOR")) {
|
if (!interaction.member.permissions.has("ADMINISTRATOR")) {
|
||||||
return await interaction.reply({
|
return await interaction.reply({
|
||||||
content: "Unprivileged Access!",
|
content: "Unprivileged Access!",
|
||||||
ephemeral: true
|
flags: MessageFlags.Ephemeral
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
birthdayEdit(interaction)
|
birthdayEdit(interaction)
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ module.exports = {
|
|||||||
// Draw the second line of text with black outline
|
// Draw the second line of text with black outline
|
||||||
ctx.strokeText(text, textX, 100 + pfp.height);
|
ctx.strokeText(text, textX, 100 + pfp.height);
|
||||||
ctx.fillText(text, textX, 100 + pfp.height);
|
ctx.fillText(text, textX, 100 + pfp.height);
|
||||||
|
const banner = canvas.toBuffer();
|
||||||
|
|
||||||
channel.send({
|
channel.send({
|
||||||
content: `Bitte guck einmal in die <#455023824791011338> ${member}`,
|
content: `Bitte guck einmal in die <#455023824791011338> ${member}`,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const { Events } = require('discord.js')
|
const { Events, MessageFlags } = require('discord.js')
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: Events.InteractionCreate,
|
name: Events.InteractionCreate,
|
||||||
@@ -22,9 +22,9 @@ async function commandHandler(interaction) {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
if (interaction.replied || interaction.deferred) {
|
if (interaction.replied || interaction.deferred) {
|
||||||
await interaction.followUp({ content: 'There was an error while executing this command!', ephemeral: true });
|
await interaction.followUp({ content: 'There was an error while executing this command!', flags: MessageFlags.Ephemeral });
|
||||||
} else {
|
} else {
|
||||||
await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true });
|
await interaction.reply({ content: 'There was an error while executing this command!', flags: MessageFlags.Ephemeral });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -36,9 +36,9 @@ async function buttonHandler(interaction) {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
if (interaction.replied || interaction.deferred) {
|
if (interaction.replied || interaction.deferred) {
|
||||||
await interaction.followUp({ content: 'There was an error while executing this command!', ephemeral: true });
|
await interaction.followUp({ content: 'There was an error while executing this command!', flags: MessageFlags.Ephemeral });
|
||||||
} else {
|
} else {
|
||||||
await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true });
|
await interaction.reply({ content: 'There was an error while executing this command!', flags: MessageFlags.Ephemeral });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -50,9 +50,9 @@ async function selectMenuHandler(interaction) {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
if (interaction.replied || interaction.deferred) {
|
if (interaction.replied || interaction.deferred) {
|
||||||
await interaction.followUp({ content: 'There was an error while executing this command!', ephemeral: true });
|
await interaction.followUp({ content: 'There was an error while executing this command!', flags: MessageFlags.Ephemeral });
|
||||||
} else {
|
} else {
|
||||||
await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true });
|
await interaction.reply({ content: 'There was an error while executing this command!', flags: MessageFlags.Ephemeral });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
const { EmbedBuilder } = require('discord.js')
|
const { EmbedBuilder, MessageFlags } = require('discord.js')
|
||||||
const { mClient } = require('../../index')
|
const { mClient } = require('../../index')
|
||||||
function delay(ms) { return new Promise(resolve => setTimeout(resolve, ms)); }
|
function delay(ms) { return new Promise(resolve => setTimeout(resolve, ms)); }
|
||||||
require('dotenv').config()
|
require('dotenv').config()
|
||||||
@@ -58,7 +58,7 @@ module.exports = {
|
|||||||
if (yourBalance.nuts < amount) {
|
if (yourBalance.nuts < amount) {
|
||||||
return await message.reply({
|
return await message.reply({
|
||||||
content: 'Du kannst nicht mehr geben als du hast!',
|
content: 'Du kannst nicht mehr geben als du hast!',
|
||||||
ephemeral: true
|
flags: MessageFlags.Ephemeral
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
var content = `Du sendest **${amount}** Nüsse an <@${target.id}>`
|
var content = `Du sendest **${amount}** Nüsse an <@${target.id}>`
|
||||||
|
|||||||
Reference in New Issue
Block a user