Skip to content

Commit fd4970e

Browse files
authored
Merge pull request #6 from notsniped/currencyframework-update-4
Add `work` command
2 parents af7b264 + 4c2cfee commit fd4970e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

main.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,17 @@ async def withdraw(ctx:SlashContext, amount=None):
282282
await ctx.send(f'You withdrew `{amount}` coins from your bank account.')
283283
save()
284284

285+
@slash.slash(
286+
name='work',
287+
description='Work for a 30-minute shift and earn cash.'
288+
)
289+
@commands.cooldown(1, (30*60), commands.BucketType.user)
290+
async def work(ctx:SlashContext):
291+
i = random.randint(10000, 20000)
292+
currency['wallet'][str(ctx.author.id)] += i
293+
save()
294+
await ctx.send(f'{ctx.author.mention} worked for a 30-minute shift and earned {i} coins.')
295+
285296
@slash.slash(
286297
name='daily',
287298
description='Claim your daily (every 24 hours)'
@@ -313,4 +324,4 @@ async def monthly(ctx:SlashContext):
313324
await ctx.reply(f'You claimed 1000000 coins from this weekly. Check back in 1 month for your next one!')
314325

315326
# Initialization
316-
client.run(api.auth.token)
327+
client.run(api.auth.token)

0 commit comments

Comments
 (0)