Skip to content

Commit

Permalink
🔀 Merge pull request #1422 from TF2Autobot/improve-wipestats
Browse files Browse the repository at this point in the history
🔨 Make sure to also reset the `statistics` options when using the `!wipestats` command
  • Loading branch information
idinium96 authored Nov 13, 2022
2 parents 24facc3 + 0fc3194 commit 53a81ae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/classes/Commands/sub-classes/Status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ export default class StatusCommands {
deletePollData(this.bot.handler.getPaths.files.dir);

this.bot.sendMessage(steamID, '✅ All stats have been deleted.');

this.bot.handler.commands.useUpdateOptionsCommand(
steamID,
'!config statistics.lastTotalTrades=0&statistics.startingTimeInUnix=0&statistics.lastTotalProfitMadeInRef=0&statistics.lastTotalProfitOverpayInRef=0&statistics.profitDataSinceInUnix=0'
);
} catch (err) {
this.bot.sendMessage(steamID, `❌ Error while deleting stats: ${JSON.stringify(err)}`);
}
Expand Down

0 comments on commit 53a81ae

Please sign in to comment.