Added and update COC message

imgbot
Kieran 2022-07-09 10:57:16 +01:00
parent fd89c15e13
commit e3967dda1e
1 changed files with 10 additions and 2 deletions

View File

@ -33,8 +33,16 @@ client.on("interactionCreate", async (interaction) => {
// Button Handling
if (interaction.isButton()) {
if(interaction.customId == "codeOfConduct"){
interaction.member.roles.add("973646380771979304")
await interaction.reply({ content: 'Roles have been updated', ephemeral: true});
if(interaction.member.roles.cache.has("973646380771979304"))
{
interaction.reply({ content: 'You already have agreed to the code of conduct!', ephemeral: true})
}
else
{
interaction.member.roles.add("973646380771979304")
await interaction.reply({ content: 'Thank you for agreeing to the code of conduct!\r\nYou can now access the rest of the server!', ephemeral: true});
}
}
if(interaction.customId == "paidModal")