Remove defer reply and fix all slash commands

imgbot
KieranRobson 2022-06-27 15:15:25 +01:00
parent e6e1f1a39b
commit a622bb1173
9 changed files with 21 additions and 23 deletions

View File

@ -36,6 +36,6 @@ module.exports = {
.setTimestamp()
.setTitle("8ball")
.addField(`${questionToSend}`,`${Responses[Math.floor(Math.random() * Responses.length)]}`)
interaction.followUp({ embeds: [embed]});
interaction.reply({ embeds: [embed]});
},
};

View File

@ -27,27 +27,27 @@ module.exports = {
const string = interaction.options.getString('type');
if(string == null){
interaction.followUp({ files: ['./images/gorb.jpg'] })
await interaction.reply({ files: ['./images/gorb.jpg'] })
}
if(string === 'cs'){
interaction.followUp({ files: ['./images/gorbcs.jpg'] })
}
if(string === 'party'){
interaction.followUp({ files: ['./images/gorbcelebration.png'] })
}
if(string === 'christmas'){
interaction.followUp({ files: ['./images/gorbchristmas.png'] })
if(string == 'cs'){
await interaction.reply({ files: ['./images/gorbcs.jpg'] })
}
if(string === 'storm'){
interaction.followUp({ files: ['./images/gorbstorm.png'] })
if(string == 'party'){
await interaction.reply({ files: ['./images/gorbcelebration.png'] })
}
if(string == 'christmas'){
await interaction.reply({ files: ['./images/gorbchristmas.png'] })
}
if(string == 'storm'){
await interaction.reply({ files: ['./images/gorbstorm.png'] })
}
if(string == 'large'){
interaction.followUp({ files: ['./images/gorblarge.png'] })
await interaction.reply({ files: ['./images/gorblarge.png'] })
}

View File

@ -11,6 +11,6 @@ module.exports = {
* @param {String[]} args
*/
run: async (client, interaction, args) => {
interaction.followUp({ files: ['https://c.tenor.com/N8A8lQ3g0YIAAAAd/chaseatlanticgifs-sarahmcfadyen.gif'] });
interaction.reply({ files: ['https://c.tenor.com/N8A8lQ3g0YIAAAAd/chaseatlanticgifs-sarahmcfadyen.gif'] });
},
};

View File

@ -16,7 +16,7 @@ module.exports = {
.setColor('GREEN')
.setFooter(`Called By: ${interaction.user.tag}`)
.addField('You can purchase from below!','https://hulluniunion.com/shop?aid=304')
interaction.followUp({ embeds: [embed] });
interaction.reply({ embeds: [embed] });
},
};

View File

@ -17,6 +17,6 @@ module.exports = {
.setFooter(`Called By: ${interaction.user.tag}`)
.setDescription('Freeside is the student run and maintained linux cluster within the University Of Hull Computer Science Department providing Linux administration experience, mentoring and technical advice alongside other peer-led support. It is completely free to all students to join, irrespective of degree pathway.')
.addField('You can join them from below!','https://discord.com/invite/qAZ8dAp')
interaction.followUp({ embeds: [embed] });
interaction.reply({ embeds: [embed] });
},
};

View File

@ -16,6 +16,6 @@ module.exports = {
.setColor('GREEN')
.setFooter(`Called By: ${interaction.user.tag}`)
.addField('Find us here:','https://hullcss.org/links')
interaction.followUp({ embeds: [embed]});
interaction.reply({ embeds: [embed]});
},
};

View File

@ -23,6 +23,6 @@ module.exports = {
.setTitle("Pong!")
.setDescription(`${client.ws.ping} ping to host`)
.addField('Uptime', ` ${days}days ${hours}hrs ${minutes}min ${seconds}sec`, true)
interaction.followUp({ embeds: [embed]});
interaction.reply({ embeds: [embed]});
},
};

View File

@ -17,6 +17,6 @@ module.exports = {
.setFooter(`Called By: ${interaction.user.tag}`)
.setDescription('Robotics Society are a society where you can gain skills in building an actual robot, or get help with your assignments or exams, but they also run social nights where they go out to do stuff.')
.addField('You can join them from below!','https://discord.gg/cMP5CavnK4')
interaction.followUp({ embeds: [embed]});
interaction.reply({ embeds: [embed]});
},
};

View File

@ -4,8 +4,6 @@ const discord = require("discord.js")
client.on("interactionCreate", async (interaction) => {
// Slash Command Handling
if (interaction.isCommand()) {
await interaction.deferReply({ ephemeral: false }).catch(() => {});
const cmd = client.slashCommands.get(interaction.commandName);
if (!cmd)
return interaction.followUp({ content: "An error has occured " });