You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 15, 2025. It is now read-only.
.setDescription("To log an event, please follow the following format:\n\n<@1344176447551574078>,<@1138235120424325160>,<@110877167897853952>,<@573540579682811906> and so on.\n\nNames must be seperated by commas and must be mentions. Otherwise you'll be asked to re do it.\n\nYou have 2 minutes to submit attendees, before this times out.\n\nTo cancel, please type **cancel**.")
31
-
.setTimestamp()
40
+
.setColor("#9033FF")
41
+
.setTitle("Logging")
42
+
.setDescription("To log an event, please follow the format:\n\n<@user1>,<@user2>,<@user3>...\n\nNames must be separated by commas and must be mentions.")// put peoples names here
return interaction.followUp("Invalid format. Please make sure the names are separated by commas and each name is a mention. Run the command again and use the correct format.");
43
-
}
44
52
45
-
if (error instanceof Error && error.message === 'time') {
46
-
return interaction.reply(`<@${interaction.user.id}> you took too long to follow up, please try again.`);
53
+
if(!mentionRegexthing.test(response!)){
54
+
returninteraction.followUp("Invalid format. Please make sure the names are separated by commas and each name is a mention. Run the command again with the correct format.");
47
55
}
48
-
if (response.toLowerCase() === 'cancel') {
56
+
57
+
if(response?.toLowerCase()==='cancel'){
49
58
returninteraction.reply(`<@${interaction.user.id}> canceled the event log.`);
.setDescription(`A new event was logged.\n\nHost: ${interaction.user.id}\n\nTime: <t:${timestamp}:F>\n\nAttendees: ${mentions.map(id => `<@${id}>`).join(', ')}\n\nSquadron Rally: False`) // set to false until we integrate with squads??
69
-
.setTimestamp()
80
+
.setColor("#9033FF")
81
+
.setTitle("Log Event")
82
+
.setDescription(`A new event was logged.\n\nHost: ${interaction.user.id}\n\nTime: <t:${timestamp}:F>\n\nAttendees: ${mentions.map(id=>`<@${id}>`).join(', ')}\n\nSquadron Rally: False`)
.setDescription("Database updated, event has been logged successfully.")
133
+
.setTimestamp();
134
+
135
+
awaitlogChannel.send({embeds: [dbEmbed]});
136
+
}else{
85
137
consterrorEmbed=newEmbedBuilder()
86
-
.setColor("#E73A3A")
87
-
.setTitle("Error")
88
-
.setDescription("An error occurred while updating the DB. The database has not been updated and the log has failed\nContact <@1344176447551574078> or <@1138235120424325160>")
0 commit comments