def write(self, ctx, person: discord.User, amount: decimal.Decimal):
"""Overwrite someone's wallet.
This command does not check for incorrect values (like -2 or infinity).
"""
account = await self.get_account(person.id)
if account is None:
raise self.SayException('account not found you dumbass')
amount = round(amount, 3)
await self.jcoin_coll.update_one({'id': person.id},
{'$set': {'amount': str(amount)}})
self.cache_invalidate(person.id)
await ctx.send(f'Set {self.get_name(account["id"])} to {amount}')
评论列表
文章目录