diff options
author | ame <[email protected]> | 2024-05-06 16:16:27 -0500 |
---|---|---|
committer | ame <[email protected]> | 2024-05-06 16:16:27 -0500 |
commit | 51d18877355043c389820b753f717e99d7acf9ce (patch) | |
tree | bf3323f825b1722c29e1e19dd20dcfe1fe979ccb | |
parent | 509293de5af9bab66d624fd044e63d8962577af3 (diff) |
awa
-rw-r--r-- | commands/mod/confirm.js | 2 | ||||
-rw-r--r-- | events/interaction.js | 7 | ||||
-rw-r--r-- | events/member-update.js | 8 |
3 files changed, 11 insertions, 6 deletions
diff --git a/commands/mod/confirm.js b/commands/mod/confirm.js index cbf3846..ff1aa46 100644 --- a/commands/mod/confirm.js +++ b/commands/mod/confirm.js @@ -93,7 +93,7 @@ module.exports = { } async function rec_read(){ - const collectorFilter = i => true;//i.user.id != param.message.author.id && !confirms.includes(i.user.id); + const collectorFilter = i => i.user.id != param.message.author.id && !confirms.includes(i.user.id); try { const confirmation = await mess.awaitMessageComponent({ filter: collectorFilter, time: 60000000 }); //confirmation.deferReply(); diff --git a/events/interaction.js b/events/interaction.js index e384dcc..571d8d0 100644 --- a/events/interaction.js +++ b/events/interaction.js @@ -43,7 +43,7 @@ module.exports = { await command.command.s_main(client,Discord,interaction); } else if (interaction.isAutocomplete()){ - + console.log(interaction.user.id) const focused = interaction.options.getFocused(true); let command = global.s_commands.find(o => o.name === interaction.commandName) if(interaction.options._subcommand!=null){ @@ -57,9 +57,14 @@ module.exports = { const filtered = autocomplete.filter(choice => choice.startsWith(focused.value)); if(filtered.length>25) filtered.length=25 + try{ await interaction.respond( filtered.map(choice => ({ name: choice, value: choice })), ); + } catch(e) { + console.log(e) + console.log("failed to send autocomplete") + } } }) diff --git a/events/member-update.js b/events/member-update.js index bbdc889..8dcfd9e 100644 --- a/events/member-update.js +++ b/events/member-update.js @@ -19,8 +19,8 @@ module.exports = { for(let i = 0; i != global.notif.voted.length - 1; i++){ mess += "<@"+global.notif.voted[i]+">, "; } - if(global.notif.voted.length > 1) mess += " and" - mess += " <@"+global.notif.voted[global.notif.voted.length - 1]+"> just voted! You can too by clicking [here](https://discords.com/servers/486957006628847626/upvote)" + if(global.notif.voted.length > 1) mess += "and " + mess += "<@"+global.notif.voted[global.notif.voted.length - 1]+"> just voted! You can too by clicking [here](https://discords.com/servers/486957006628847626/upvote)" } if(global.notif.joined.length != 0){ @@ -29,8 +29,8 @@ module.exports = { for(let i = 0; i != global.notif.joined.length - 1; i++){ mess += "<@"+global.notif.joined[i]+">, "; } - if(global.notif.joined.length > 1) mess += " and" - mess += " <@"+global.notif.joined[global.notif.joined.length - 1]+">!" + if(global.notif.joined.length > 1) mess += "and " + mess += "<@"+global.notif.joined[global.notif.joined.length - 1]+">!" } message.edit({content: mess, flags:[4096]}) } else { |