Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathaniel Wood committed Jan 30, 2024
1 parent 6256632 commit da771b3
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/commands/economy/rob.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,16 @@ module.exports = class extends Command {
]
});
} else {
if (!profile.lastMonthly) {
if (user.id == message.author.id) {
await message.channel.sendCustom({
embeds: [
new MessageEmbed()
.setDescription(`hey stupid, seems pretty dumb to steal from urself`)
]
})
} else if (!profile.lastRobbed) {
await Profile.updateOne(
{ userID: message.author.id, guildId: message.guild.id }, { $set: { lastMonthly: Date.now() } }
{ userID: message.author.id, guildId: message.guild.id }, { $set: { lastRobbed: Date.now() } }
);
let amount = Math.floor(Math.random() * profile.wallet);
await Profile.updateOne({
Expand All @@ -50,7 +57,7 @@ module.exports = class extends Command {
})
} else if (Date.now - profile.lastRobbed > 600000) {
await Profile.updateOne(
{ userID: message.author.id, guildId: message.guild.id }, { $set: { lastMonthly: Date.now() } }
{ userID: message.author.id, guildId: message.guild.id }, { $set: { lastRobbed: Date.now() } }
);
let amount = Math.floor(Math.random() * profile.wallet);
await Profile.updateOne({
Expand Down

0 comments on commit da771b3

Please sign in to comment.