title: Issue with sending commands Discord.py
body: <p>In discord py, for some odd reason my commands aren't working, it doesn't throw an error, and it doesn't send anything at all which I found quite odd, I was thinking it might be an issue with the events but honestly I've no clue. If anyone could help it would be appreciated. I may be wrong but I think there might be an extra step including some way of adding the commands to the bot, but honestly, I'm not quite sure. The code is below.</p>
  <pre><code># General Imports #
  import discord, qikdb, os, random, requests, urllib, youtube_dl, bs4;
  
  # From Imports #
  from bs4 import BeautifulSoup;
  from server import ping_server;
  from qikdb import DB;
  from time import sleep as wait;
  from datetime import datetime;
  from cmds import cmds_ as commands_list;
  
  # Discord Imports #
  import discord.ext;
  from discord.utils import get;
  from discord.ext import commands, tasks;
  from discord.ext.commands import has_permissions,  CheckFailure, check;
  
  # Discord Configuration #
  client = discord.Client();
  bot = commands.Bot(command_prefix = os.environ[&quot;PREFIX&quot;], case_insensitive = True, help_command = None);
  
  # Essential Variables #
  timestamp = datetime.now().strftime(&quot;%H:%M&quot;);
  colors = {&quot;err&quot;: discord.Color.from_rgb(250, 65, 77), &quot;mod&quot;: discord.Color.from_rgb(87, 64, 255)};
  
  # Class Configurations #
  qik = DB(config = {
    &quot;name&quot;: &quot;database&quot;,
    &quot;directory&quot;: &quot;DB&quot;
  });
  
  
  # Functions #
  def isadmin(ctx):
      if not qik.exists(f&quot;adminrole.{ctx.guild.id}&quot;):
        qik.set(f&quot;adminrole.{ctx.guild.id}&quot;, &quot;Zyten Admin&quot;);
        a_role = qik.get(f&quot;adminrole.{ctx.guild.id}&quot;);
  
      if &quot;Zyten Admin&quot; in ctx.author.roles or a_role in ctx.author.roles:
        return True;
      else:
        return False;
  
      
  # START OF EVENTS #
  @bot.event
  async def on_ready():
      os.system(&quot;clear&quot;);
      print(f&quot;Logged in as {bot.user} at {timestamp}.&quot;);
  
  @bot.event
  async def on_message(msg):
      if not qik.exists(f&quot;automod.{msg.guild.id}&quot;):
        qik.set(f&quot;automod.{msg.guild.id}&quot;, False);
      
      automod = qik.get(f&quot;automod.{msg.guild.id}&quot;);
  
      if automod:
          if not qik.exists(f&quot;banned_words.{msg.guild.id}&quot;):
              qik.set(f&quot;banned_words.{msg.guild.id}&quot;, []);
          banned_words = qik.get(f&quot;banned_words.{msg.guild.id}&quot;);
  
          split_content = msg.content.lower.split(&quot; &quot;);
  
          for i in range(split_content):
              if split_content[i] == &quot;!&quot; or split_content[i] == &quot;.&quot; or split_content[i] == &quot;,&quot; or split_content[i] == &quot;?&quot;:
                  split_content.pop(i);
          
          joined_content = &quot; &quot;.join(split_content);
            
          for word in banned_words:
              if word in joined_content:
                  msg.delete();
                  break;
      else:
          pass;
  # END OF EVENTS #
  
  
  # START OF COMMANDS #
  @bot.command(name = &quot;help&quot;, aliases = [&quot;commands&quot;, &quot;cmds&quot;])
  async def help(ctx, *args):
      args = args.lower();
  
      help_embed = discord.Embed(title = &quot;***help:***&quot;, color = discord.Color.from_rgb(255, 255, 255));
      if len(args) &gt;= 1:
          if args[0] == &quot;misc&quot;:
              for command in commands_list:
                  if hasattr(command, &quot;type&quot;) and command[&quot;type&quot;] == &quot;Misc&quot;:
                    if hasattr(command, &quot;args&quot;):
                        help_embed.add_field(name = f&quot;**{os.environ['PREFIX']}  {command['name']} {command['args']}**&quot;, value = f&quot;*{command['description']}*&quot;);
                    else:
                        help_embed.add_field(name = f&quot;**{os.environ['PREFIX']}{command['name']}**&quot;, value = f&quot;*{command['description']}*&quot;);
          elif args[0] == &quot;mod&quot; or args[0] == &quot;moderation&quot;:
              for command in commands_list:
                  if hasattr(command, &quot;type&quot;) and command[&quot;type&quot;] == &quot;Moderation&quot;:
                      if hasattr(command, &quot;args&quot;):
                          help_embed.add_field(name = f&quot;**{os.environ['PREFIX']}{command['name']} {command['args']}**&quot;, value = f&quot;{command['description']}&quot;);
                      else:
                          help_embed.add_field(name = f&quot;**{os.environ['PREFIX']}{command['name']} {command['args']}**&quot;, value = f&quot;*{command['description']}*&quot;);
      else:
          help_embed.add_field(name = &quot;**Misc:**&quot;, value = &quot;*Misc Commands.*&quot;, inline = True);
          help_embed.add_field(&quot;**Moderation:***&quot;, value = &quot;*Moderation Commands.*&quot;, inline = True);
  
      await ctx.send(embed = help_embed);
  
  # MISC Commands #
  @bot.command(name = &quot;predict&quot;, aliases = [&quot;8ball&quot;, &quot;guess&quot;])
  async def predict(ctx):
      responses = [&quot;Yes.&quot;, &quot;No.&quot;, &quot;Maybe.&quot;, &quot;Certainly.&quot;, &quot;For sure.&quot;, &quot;Never.&quot;, &quot;In your dreams.&quot;];
      
      predict_embed = discord.Embed(title = &quot;***Prediction:***&quot;, description = f&quot;{random.choice(responses)}&quot;, color = discord.Color.from_rgb(255, 255, 255));
      predict_embed.set_footer(text = f&quot;Sent at {timestamp}&quot;);
  
      await ctx.send(embed = predict_embed);
  
  # VC Commands #
  @bot.command(name = &quot;join&quot;, aliases = [&quot;summon&quot;, &quot;connect&quot;])
  async def join(ctx):
      if ctx.author.voice:
          try:
              channel = ctx.author.voice.channel;
              await channel.connect();
          except Exception as err:
              ctx.send(f&quot;I could not connect to the voice channel.\n\nDiscord PY Exception: {err}&quot;);
      else:
          ctx.send(&quot;You are not connected to a VC.&quot;);
  
  @bot.command(name = &quot;leave&quot;, aliases = [&quot;disconnect&quot;, &quot;unsummon&quot;, &quot;fuckoff&quot;])
  async def leave(ctx):
      if ctx.author.voice.channel and ctx.voice_client:
        try:
            await ctx.voice_client.disconnect();
        except Exception as err:
            ctx.send(f&quot;I could not disconnect from the voice channel.\n\nDiscord PY Exception: {err}&quot;);   
  
  @bot.command(name = &quot;play&quot;)
  async def play(ctx, *args):
      title = &quot; &quot;.join(args);
  
  # Automation Commands #
  @bot.command(name = &quot;automod&quot;, aliases = [&quot;amod&quot;])
  async def automod(ctx, *args):
      args = args.lower();
      admin = ctx.author.guild_permissions.administrator;
  
      if admin or isadmin(ctx):
          if len(args) &gt;= 1:
              if args[0] == &quot;enabled&quot; or args[0] == &quot;true&quot; or args[0] == &quot;on&quot;:
                  qik.set(f&quot;automod.{ctx.guild.id}&quot;, True);
              elif args[0] == &quot;disabled&quot; or args[0] == &quot;false&quot; or args[0] == &quot;off&quot;:
                  qik.set(f&quot;automod.{ctx.guild.id}&quot;, False);
              else:
                  error_embed = discord.Embed(title = &quot;***Error:***&quot;, description = &quot;*Error - Invalid argument provided (enabled/disables).&quot;, color = colors[&quot;err&quot;]);
  
                  await ctx.send(embed = error_embed);
          else:
              error_embed = discord.Embed(title = &quot;***Invalid Args Amount:**&quot;, description = &quot;*Error - `Invalid amount of arguments provided.`*&quot;);
      else:
          error_embed = discord.Embed(title = &quot;***Invalid Permissions:***&quot;, description = &quot;*Error - `You do not have valid permissions to enable/disable automod in this guild.`*&quot;, color = colors[&quot;err&quot;]);
  
          await ctx.send(embed = error_embed);
  
  @bot.command(name = &quot;bannedwords&quot;, aliases = [&quot;bw&quot;, &quot;wordsbanned&quot;])
  async def bannedwords(ctx, *args):
      words = qik.get(f&quot;banned_words.{ctx.guild.id}&quot;);
      admin = ctx.author.guild_permission.administrator;
  
      if admin or isadmin(ctx):
          if len(args) &gt;= 1:
              if args[0] == &quot;add&quot;:
                  words.append(args[1]);
              elif args[0] == &quot;remove&quot; or args[0] == &quot;delete&quot;:
                  num = words.index(args[1])
                  words.pop(num);
                  qik.set(f&quot;banned_words.{ctx.guild.id}&quot;, words);
  
  # Moderation Commands #
  @bot.command(name = &quot;kick&quot;, aliases = [&quot;boot&quot;, &quot;italy&quot;, &quot;shapeofitaly&quot;])
  async def kick(ctx, member : discord.Member, *args):
      kick_perms = ctx.author.guild_permissions.kick_members;
  
      if kick_perms or isadmin(ctx):
          try:
              given_reason = &quot; &quot;.join(args[0:]);
              await member.kick(reason = given_reason);
  
              kicked_embed = discord.Embed(title = &quot;**Moderation:***&quot;, description = f&quot;*Kicked: {member.mention}\nReason: `{given_reason}`*&quot;, color = colors[&quot;mod&quot;]);
              kicked_embed.set_footer(text = f&quot; Sent at: {timestamp}&quot;);
  
              await ctx.send(embed = kicked_embed);
          except Exception as err:
              error_embed = discord.Embed(title = &quot;***Error:***&quot;, description = f&quot;*Error Message - `{err}`*&quot;);
              error_embed.set_footer(text = f&quot; Sent at: {timestamp}&quot;);
  
              await ctx.send(embed = error_embed);
  
  @bot.command(name = &quot;ban&quot;)
  async def ban(ctx, member: discord.Member, *args):
      ban_perms = ctx.author.guild_permissions.ban_members;
      
      if ban_perms or isadmin(ctx):
          try:
              given_reason = &quot; &quot;.join(args[0:]);
              await member.ban(reason = given_reason);
  
              banned_embed = discord.Embed(title = &quot;***Moderation:***&quot;, description = f&quot;*Banned: {member.mention}\nReason: `{given_reason}`*&quot;, color = discord.Color.from_rgb(87, 64, 255));
              banned_embed.set_footer(text = f&quot; Sent at: {timestamp}&quot;);
  
              await ctx.send(embed = banned_embed);
          except Exception as err:
              error_embed = discord.Embed(title = &quot;***Error:***&quot;, description = f&quot;*Error Message - `{err}`*&quot;);
              error_embed.set_footer(text = f&quot;Sent at: {timestamp}&quot;);
  
              await ctx.send(embed = error_embed);
      else:
          error_embed = discord.Embed(title = &quot;***Invalid Permissions:***&quot;, description = &quot;*Error - `You do not have the permissions to ban this user.`*&quot;, color = colors[&quot;err&quot;]);
          error_embed.set_footer(text = f&quot; Sent at: {timestamp}&quot;);
  
          await ctx.send(embed = error_embed);
  # END OF COMMANDS #
  
  # ESSENTIALS #
  ping_server();
  bot.run(os.environ[&quot;TOKEN&quot;]); 
  </code></pre>