This is the code below. the keep alive is another part of code to keep my bot online 24/7.
import os
from keep_alive import keep_alive
from discord.ext import commands
import random
import requests
import json
import asyncio
client = commands.Bot(command_prefix='>')
@client.command()
@commands.has_permissions(ban_members=True)
async def ban(ctx, member: discord.Member, *, reason=None):
await member.ban(reason=reason)
embed=discord.Embed(title="Ban", description=f'User {member} has been banned!', color=0x00FFFF)
await ctx.send(embed=embed)
keep_alive()
client.run(os.getenv('TOKEN'))