Bot launches fine but the commands do not work


Well, this is probably a duplicate question or a noobie python error, but i just cant find the right terms to search for my answer. my bot launches fine, and it even runs the print function on on_ready! however, when I try using the commands there are no responses. it worked fine before i added the class GlobalBanningSystem(commands.Cog): so i dont know!

import discord
from discord.ext import commands

client = commands.Bot(command_prefix = ".") 

class GlobalBanningSystem(commands.Cog):
    def __init__(self, bot): = bot
    @commands.has_role("966695793555804232") # Staff Role ID
    async def gban(self, ctx, member: discord.User):
        channel ="966681817094697020") # Logs Channel ID
        auth =

        await ctx.send("Ban Issue successfuly opened. Now, please type the ban reason!")
        reason = await'message', timeout = 600)

        embed = discord.Embed(title = f"Global Banned {}", colour = 0xFF0000)
        embed.add_field(name = "Reason:", value = reason.content, inline = False)
        embed.add_field(name = "User ID:", value = f"`{}`",)
        embed.add_field(name = "Staff Member:", value = f"{}")
        embed.set_thumbnail(url = member.avatar_url)
        await ctx.send(embed = embed)
        await ctx.send(f"**{}** has been globbaly banned!")
        for guild in
            await guild.ban(member)

async def on_ready():
    print("Global Banning System is online!")

async def ping(ctx):
    await ctx.send(f"Bot's Response Latency: {round(client.latency * 1000)}ms")"token:>") 

What I was trying to do there, was a ban command that would ban the user from

  1. all the servers that the user is in
  2. all the servers that the bot is in

>Solution :

You need to register the cog with your bot:


Leave a Reply Cancel reply