-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
05d651c
commit bccf0f7
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const { SlashCommandBuilder } = require("@discordjs/builders"); | ||
const { MessageActionRow, MessageButton } = require("discord.js"); | ||
|
||
module.exports = { | ||
data: new SlashCommandBuilder() | ||
.setName("verifysend") | ||
.setDescription("Verifies the user"), | ||
async execute(interaction) { | ||
const buttonData = new MessageActionRow() | ||
.addComponents( | ||
new MessageButton() | ||
.setCustomId('verifybutt') | ||
.setLabel('Click to Verify') | ||
.setStyle('SUCCESS'), | ||
); | ||
interaction.channel.send({ content: `<@&1059563959037984929> Please __click__ the button __below__ to gain access to the server. Run \`/ticket\` for support!`, components: [buttonData] }) | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
const ROLE_ID = '1219871155952025671'; | ||
const TIMEOUT_DURATION = 7500 | ||
|
||
module.exports = { | ||
name: "messageCreate", | ||
async execute(interaction) { | ||
|
||
if (!interaction.author.bot) { | ||
if (interaction.mentions.users.size > 0) { | ||
for (const user of interaction.mentions.users.values()) { | ||
const member = interaction.guild.members.cache.get(user.id); | ||
if (member && member.roles.cache.has(ROLE_ID)) { | ||
|
||
const deleteReply = await interaction.reply({ | ||
content: `Please refrain from mentioning any users with the \`Upper Class\` role! Our goal is to create a healthy environment; we must remain respectful to their time and notifications!`, | ||
ephemeral: true | ||
}); | ||
|
||
interaction.guild.channels.cache.find(channel => channel.id === '1219872238699020388').send(`⚠️Upper Class Pinged⚠️\n###Who:<@${interaction.user.id}>\n###User Pinged:${user.username}\n###Where: ${interaction.channel.name}\n###Contents: ${interaction.content}`) | ||
|
||
setTimeout(async () => { | ||
try { | ||
await deleteReply.delete(); | ||
} catch (error) { | ||
console.error('Failed to delete reply:', error); | ||
} | ||
}, TIMEOUT_DURATION); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |