Skip to content

Commit

Permalink
permissions fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mirdukkkkk committed Feb 14, 2024
1 parent 5da3d98 commit 0ee4231
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/commands/GameCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class GameCommand extends PixelCommand {
}

async run(message, args) {
if(![...message.client.config.owner, '578729769898737668'].includes(message.author.id))
if(!message.client.config.admin.has(message.author.id))
return message.reply({ content: 'Вы не являетесь создателем проекта/специальным модератором, доступ к команде ограничен' });

if(isNaN(Number(args[0]))) {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/TokenCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class TokenCommand extends PixelCommand {
content: null,
embeds: [
new EmbedBuilder()
.setTitle(`🦜 | Информация о выдаче ${action ? 'бана' : 'разбана'}`)
.setTitle(`🦜 Информация о выдаче ${action ? 'бана' : 'разбана'}`)
.setColor(0x5865F2)
.setDescription(
`> Модератор: \`${message.author.globalName || message.author.username} (${message.author.id})\`\n` +
Expand Down
2 changes: 1 addition & 1 deletion src/services/AntiNewAccountService.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class AntiNewAccountService {
.setLabel('Забанить')
.setStyle(ButtonStyle.Danger)
.setEmoji('⚠️')
.setCustomId(`ban_acc_${(await this.client.database.collection('users').findOne({ userID: member.id }))._id}`)
.setCustomId(`ban_acc_${(await this.client.database.collection('users').findOne({ userID: member.id }))?._id ?? member.id}`)
])
]
});
Expand Down

0 comments on commit 0ee4231

Please sign in to comment.