calculator默认四位小数点

This commit is contained in:
Pentacene 2020-11-26 02:37:11 +08:00 committed by GitHub
parent ed663121f6
commit f43ff0c7e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,7 @@ async def cal(context):
return return
await context.edit(f"{command}" ) await context.edit(f"{command}" )
cmd = f'echo {command} | bc' cmd = f'echo "scale=4;{command}" | bc'
result = await execute(cmd) result = await execute(cmd)
if result: if result: