Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import discord
- from discord.ext import commands
- TOKEN = 'token was here'
- client = commands.Bot(command_prefix=">")
- @client.event
- async def on_ready():
- print("Bot is ready")
- '''
- PayPal Invoice
- 2.9% + $0.30
- eBay
- 10% + 2.9% + $0.30
- Depop
- 10% + 2.9% + $0.30
- Goat
- 9.5% + 2.9% + $0.30 + $5
- Grailed
- 6% + 2.9% + $0.30
- Mercari
- 10% + 2.9% + $0.30
- StockX
- 8.5% + 3%
- '''
- @client.command()
- async def fees(ctx, amount=None):
- if amount is None:
- ctx.send("Please provide a valid amount")
- else:
- amount = float(amount)
- paypal_fee = (amount * 0.029) + 0.30
- ebay_fee = (amount*0.1) + (amount*0.029) + 0.30
- depop_fee = (amount*0.1) + (amount*0.029) + 0.30
- goat_fee = (amount*0.95) + (amount*0.029) + 0.30 + 5.0
- grailed_fee = (amount*0.06) + (amount*0.029) + 0.30
- mercari_fee = (amount*0.1) + (amount*0.029) + 0.30
- stockx_fee = (amount*0.085) + (amount*0.03)
- embed = discord.Embed(
- title = "Fee Calculator",
- description = "Fee may not be exact",
- colour = discord.Colour.dark_green()
- )
- embed.add_field(name="PayPal Invoice", value = f"Price: ${amount - paypal_fee:.2f} \nFee: ${paypal_fee:.2f} ", inline=False)
- embed.add_field(name="eBay", value=f"Price: ${amount - ebay_fee:.2f} \nFee: ${ebay_fee:.2f}", inline=False)
- embed.add_field(name="Depop", value = f"Price: ${amount-depop_fee:.2f} \nFee: ${depop_fee:.2f}", inline=False)
- embed.add_field(name="Goat", value = f"Price: ${amount - goat_fee:.2f} \nFee: ${goat_fee:.2f}", inline=False)
- embed.add_field(name="Grailed_fee", value = f"Price: ${amount - grailed_fee:.2f} \nFee: ${grailed_fee:.2f}", inline=False)
- embed.add_field(name="Mercari", value = f"Price: ${amount - mercari_fee:.2f} \nFee: ${mercari_fee:.2f}", inline=False)
- await ctx.send(embed=embed)
- client.run(TOKEN)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement