mirror of
https://github.com/System-End/Discord-Bot.git
synced 2026-04-19 16:28:26 +00:00
Fixed crash cmd
This commit is contained in:
parent
0f3b4c288a
commit
3c68e43669
1 changed files with 25 additions and 0 deletions
|
|
@ -136,6 +136,31 @@ module.exports = async (client, interaction, args) => {
|
|||
|
||||
}
|
||||
})
|
||||
.catch(async () => {
|
||||
index = result + 1;
|
||||
|
||||
Schema.findOne({ Guild: interaction.guild.id, User: user.id },
|
||||
async (err, data) => {
|
||||
if (data) {
|
||||
data.Money -= money;
|
||||
data.save();
|
||||
}
|
||||
}
|
||||
)
|
||||
return client.embed({
|
||||
desc: `Crash Results of ${user}`,
|
||||
type: 'edit',
|
||||
fields: [
|
||||
{
|
||||
name: `Loss`,
|
||||
value: `**${money}**`,
|
||||
inline: false,
|
||||
}
|
||||
],
|
||||
components: [disableRow]
|
||||
}, msg)
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue