Compare commits

...

5 Commits

Author SHA1 Message Date
Nemo aa96432be1 fix: typos in wordwar 2021-11-14 12:25:27 +01:00
Nemo 5106d3c637 fix: displayed the userName instead of displayName 2021-11-14 12:25:02 +01:00
Nemo c2fdd44901 fix: displayed result of the command in public 2021-11-14 11:45:40 +01:00
Nemo 831f8be7c9 fix: typo in 8ball 2021-11-14 11:20:18 +01:00
Nemo 284e6e12a1 fix: modif des intitulés dans la wordwar 2021-11-14 02:35:47 +01:00
4 changed files with 11 additions and 12 deletions

View File

@ -20,7 +20,7 @@ const responses = [
"Vous pouvez répéter la question ?",
"Bon sang, mais c'est bien sûr !",
"Mais vous êtes fous !",
"Mais evidemment !",
"Mais évidemment !",
"Bizarrement, oui.",
"Essaye plus tard",
"Essaye encore",
@ -51,8 +51,7 @@ module.exports = {
async execute(interaction) {
const question = interaction.options.get('question').value;
const i = Math.floor(Math.random() * responses.length);
const reply = "*" + interaction.user.username + " a demandé : " + question + "*\n" + quote( responses[i] ) ;
//const reply = responses[i] + "\n >>> " + question;
const reply = "*" + interaction.member.displayName + " a demandé : " + question + "*\n" + quote( responses[i] ) ;
await interaction.reply(reply)
.then(console.log("Reply sent to 8ball command."))
.catch(console.error);

View File

@ -5,6 +5,6 @@ module.exports = {
.setName('server')
.setDescription('Replies with Server info!'),
async execute(interaction) {
await interaction.reply(`Server name: ${interaction.guild.name}\nTotal members: ${interaction.guild.memberCount}`);
await interaction.reply({content:`Server name: ${interaction.guild.name}\nTotal members: ${interaction.guild.memberCount}` , ephemeral:true});
},
};

View File

@ -5,6 +5,6 @@ module.exports = {
.setName('user')
.setDescription('Replies with User info!'),
async execute(interaction) {
await interaction.reply(`Your tag: ${interaction.user.tag}\nYour id: ${interaction.user.id}`);
await interaction.reply({content: 'Your tag: ${interaction.user.tag}\nYour id: ${interaction.user.id}', ephemeral:true});
},
};

View File

@ -85,7 +85,7 @@ module.exports = {
ongoingww.set(interaction.user.id, wwRole.name);
interaction.member.roles.add(wwRole.id);
commandReply = "Une wordwar a été initiée. Elle commencera dans " + wwdelay + " minutes et durera " + wwtimer + " minutes.";
commandReply = "la " + wwRole.name + " a été initiée. Elle commencera dans " + wwdelay + " minutes et durera " + wwtimer + " minutes.";
const row = new MessageActionRow()
.addComponents(
@ -114,13 +114,13 @@ module.exports = {
collectorParticipate.on('collect', async i => {
if (i.member.roles.cache.has(wwRole.id)) {
OnlyReply('Vous êtes déjà enregistré pour cette wordwar', i, wwRole);
OnlyReply('Vous êtes déjà enregistré.e pour cette wordwar', i, wwRole);
} else if (ongoingww.has(i.user.id)) {
OnlyReply('Vous êtes déjà enregistré dans la wordwar ' + ongoingww.get(i.user.id), i, wwRole);
OnlyReply('Vous êtes déjà enregistré.e dans la wordwar ' + ongoingww.get(i.user.id), i, wwRole);
} else {
i.member.roles.add(wwRole);
ongoingww.set(i.user.ida, wwRole);
OnlyReply('Participation est enregistrée', i, wwRole);
OnlyReply('Participation enregistrée', i, wwRole);
}
});
@ -134,7 +134,7 @@ module.exports = {
if (!i.member.roles.cache.has(wwRole.id)) {
OnlyReply('Vous n\'êtes pas enregistré pour cette wordwar', i, wwRole);
} else {
OnlyReply('Participation est annulée', i, wwRole);
OnlyReply('Participation annulée', i, wwRole);
i.member.roles.remove(wwRole);
ongoingww.delete(i.user.id);
@ -159,12 +159,12 @@ module.exports = {
setTimeout(async () => {
if (wwRole.deleted != true) {
console.log(wwRole.name + ' launched');
var participantStart = '\nLa wordwar ' + wwRole.name + ' commence. Vous pouvez toujours la rejoindre si vous le désirez. Bonne chance à tou.te.s !! ' + roleMention(wwRole.id) + '\n';
var participantStart = '\nLa ' + wwRole.name + ' commence. Vous pouvez toujours la rejoindre si vous le désirez. Bonne chance à tou.te.s !! ' + roleMention(wwRole.id) + '\n';
publicReplies = await interaction.channel.send({ content: participantStart, fetchReply: true });
setTimeout(async () => {
if (wwRole.deleted != true) {
console.log(wwRole.name + ' ended');
var participantEnd = 'La wordwar ' + wwRole.name + ' est maintenant terminée, merci d\'y avoir participé \! ' + roleMention(wwRole.id) + '\n';
var participantEnd = 'La ' + wwRole.name + ' est maintenant terminée, merci d\'y avoir participé \! ' + roleMention(wwRole.id) + '\n';
await interaction.channel.send({ content: participantEnd, fetchReply: true });
ongoingww.forEach((value,key,ongoingww) => {
if (value == wwRole.name) {