Skip to content

Commit

Permalink
Update modalSubmit.js
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphaMSq committed Feb 14, 2023
1 parent 96b7a6c commit 01e614f
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions events/modalSubmit.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ module.exports = {
const requestsChan = client.channels.cache.get(client.config.requestsChannel)
const nicksChan = client.channels.cache.get(client.config.nicknamesChannel)

const responce1 = modal.getTextInputValue('input1')
const nickname = modal.getTextInputValue('input1')
const responce2 = modal.getTextInputValue('input2')
const responce3 = modal.getTextInputValue('input3')
const responce4 = modal.getTextInputValue('input4')
const responce5 = modal.getTextInputValue('input5')

client.db.set(modal.channel.id, nickResponse)
client.db.set(modal.channel.id, nickname)

modal.member.setNickname(nickResponse).catch((e)=>{console.log('\x1b[1m\x1b[33m'+time+' \x1b[37m| \x1b[31mERROR \x1b[37m| \x1b[36mПроизошла Ошибка > \x1b[31m'+e+'\x1b[0m')})
modal.member.setNickname(nickname).catch((e)=>{console.log('\x1b[1m\x1b[33m'+time+' \x1b[37m| \x1b[31mERROR \x1b[37m| \x1b[36mПроизошла Ошибка > \x1b[31m'+e+'\x1b[0m')})
const adminEmbed = new EmbedBuilder()
.setColor('#00bd6d')
.setAuthor({
Expand All @@ -25,23 +25,23 @@ module.exports = {
.setDescription('**Ник участника: <@'+modal.user.id+'>, канал: <#'+modal.channel.id+'>\nДля принятия / отклонения заявки перейдите к каналу.**')
.addFields(
{
name: conf.WhiteList.Question1.Label,
value: '`'+responce1+'`',
name: 'Никнейм:',
value: '`'+nickname+'`',
},
{
name: conf.WhiteList.Question2.Label,
name: conf.WhiteList.Question2.Label+':',
value: '`'+responce2+'`',
},
{
name: conf.WhiteList.Question3.Label,
name: conf.WhiteList.Question3.Label+':',
value: '`'+responce3+'`',
},
{
name: conf.WhiteList.Question4.Label,
name: conf.WhiteList.Question4.Label+':',
value: '`'+responce4+'`',
},
{
name: conf.WhiteList.Question5.Label,
name: conf.WhiteList.Question5.Label+':',
value: '`'+responce5+'`',
},
)
Expand Down Expand Up @@ -83,23 +83,23 @@ module.exports = {
.setDescription('**Заявка была отправлена админам на рассмотрение! Пожалуйста ожидайте!**')
.addFields(
{
name: conf.WhiteList.Question1.Label,
value: '`'+responce1+'`',
name: 'Никнейм:',
value: '`'+nickname+'`',
},
{
name: conf.WhiteList.Question2.Label,
name: conf.WhiteList.Question2.Label+':',
value: '`'+responce2+'`',
},
{
name: conf.WhiteList.Question3.Label,
name: conf.WhiteList.Question3.Label+':',
value: '`'+responce3+'`',
},
{
name: conf.WhiteList.Question4.Label,
name: conf.WhiteList.Question4.Label+':',
value: '`'+responce4+'`',
},
{
name: conf.WhiteList.Question5.Label,
name: conf.WhiteList.Question5.Label+':',
value: '`'+responce5+'`',
},
)
Expand Down

0 comments on commit 01e614f

Please sign in to comment.