|
24 | 24 | from discord.ext import commands |
25 | 25 | from discord.ext.commands import * |
26 | 26 | from cogs.economy import get_wallet, get_bank, new_bank, new_wallet |
| 27 | +from cogs.isocoin import create_isocoin_key |
27 | 28 |
|
28 | 29 | # Slash option types: |
29 | 30 | # Just use variable types to define option types. |
@@ -136,7 +137,7 @@ async def on_ready(): |
136 | 137 | async def on_message(ctx): |
137 | 138 | new_wallet(ctx.author.id) |
138 | 139 | new_bank(ctx.author.id) |
139 | | - if str(ctx.author.id) not in isocoins: isocoins[str(ctx.author.id)] = 0 |
| 140 | + create_isocoin_key(ctx.author.id) |
140 | 141 | if str(ctx.guild.id) not in warnings: warnings[str(ctx.guild.id)] = {} |
141 | 142 | if str(ctx.author.id) not in warnings[str(ctx.guild.id)]: warnings[str(ctx.guild.id)][str(ctx.author.id)] = [] |
142 | 143 | if str(ctx.author.id) not in items: items[str(ctx.author.id)] = {} |
@@ -301,35 +302,6 @@ async def reload(ctx: ApplicationContext, cog: str): |
301 | 302 | await ctx.respond(embed=discord.Embed(description=f"{cog} cog successfully reloaded.", color=discord.Color.green())) |
302 | 303 | except: await ctx.respond(embed=discord.Embed(description=f"{cog} cog not found.", color=discord.Color.red())) |
303 | 304 |
|
304 | | -# IsoCoins commands |
305 | | -isocoin_system = client.create_group("isocoin", "Commands related to the IsoCoin rewards system.") |
306 | | - |
307 | | -isocoin_system.command( |
308 | | - name="balance", |
309 | | - description="See your IsoCoin balances" |
310 | | -) |
311 | | -async def isocoin_balance(ctx: ApplicationContext): |
312 | | - localembed = discord.Embed(description=f"You currently have **{isocoins[str(ctx.author.id)]}** IsoCoins.") |
313 | | - await ctx.respond(embed=localembed) |
314 | | - |
315 | | -isocoin_system.command( |
316 | | - name="daily", |
317 | | - description="Collect your daily reward of IsoCoins" |
318 | | -) |
319 | | -@commands.cooldown(1, 86400, commands.BucketType.user) |
320 | | -async def isocoin_daily(ctx: ApplicationContext): |
321 | | - isocoins_reward = random.randint(2500, 5000) |
322 | | - isocoins[str(ctx.author.id)] += isocoins_reward |
323 | | - save() |
324 | | - await ctx.respond(f"You have earned {isocoins_reward} IsoCoins from this daily. Come back in 24 hours for the next one!") |
325 | | - |
326 | | -isocoin_system.command( |
327 | | - name="shop", |
328 | | - description="See all the items that you can buy using your IsoCoins." |
329 | | -) |
330 | | -async def isocoin_shop(ctx: ApplicationContext): |
331 | | - await ctx.respond("IsoCoin shop is coming soon! Check back later for new items.") |
332 | | - |
333 | 305 | # Initialization |
334 | 306 | active_cogs = [ |
335 | 307 | "economy", |
|
0 commit comments