title: Why is my python discord bot not working?
body: <p>I have a problem with my discord ticket bot i made with python. A half year ago the bot worked really well and did what he had to do, but now the bot isnt reacting to any commands he should react to. Maybe you can help me finding the wrong code or know if there were any python updates, that can be relevant for this.</p>
  <p>Heres my code:</p>
  <pre><code>import discord
  from discord import Color, channel
  from discord.ext import commands
  bot = commands.Bot(command_prefix=&quot;!&quot;)
  
  @bot.event
  async def on_reaction_add(reaction, user):
      if user.id != 895389557414039552:
          guild = guildticket
          channelexists = discord.utils.get(guild.text_channels, name=user.name.lower().replace(&quot;#&quot;, &quot;&quot;))
          if channelexists:
              None
          else:
              teamrole = discord.utils.get(guild.roles, id=1018643942801162270)
  
              if reaction.emoji == '':
                  category = discord.utils.get(guild.categories, id=969269138809823273)
                  channel = await guild.create_text_channel(name=f&quot;{user.name}&quot;, category=category)
                  await channel.set_permissions(user, view_channel=True)
                  await channel.send(f&quot;{teamrole.mention}&quot;)
                  await channel.send(f&quot;**`Ticket von {user.name}`**&quot;)
                  await channel.send(&quot;&gt; Bitte schildere uns dein Problem, damit der Support reagieren kann&quot;)
                  await channel.send(&quot;&gt; Sollte dein Problem geklärt worden sein, nutze !close&quot;)
              if reaction.emoji == '✅':
                  await reaction.message.channel.delete(reason=None)
  
  
  @bot.command()
  async def close(ctx):
      if ctx.channel.name == ctx.author.name.lower().replace(&quot;#&quot;, &quot;&quot;):
          emoji = '✅'
          message = await ctx.send(&quot;Willst du dieses Ticket wirklich schließen?&quot;)
          await message.add_reaction(emoji=emoji)
  
  
  @bot.command()
  async def open(ctx):
      global guildticket
      guildticket = ctx.guild
      embed = discord.Embed(
          colour=Color.red()
      )
      embed.add_field(name=&quot;j4nluca's Ticket Bot&quot;,
                      value=&quot;Reagiere mit \&quot;:envelope_with_arrow: \&quot;, um ein Ticket zu erstellen&quot;)
      embed.set_footer(text=&quot;Sollte sich kein Ticket öffnen, nutze !open&quot;)
  
      await ctx.channel.purge(limit=1)
      emoji = &quot;&quot;
      message = await ctx.send(embed=embed)
      await message.add_reaction(emoji=emoji)
  
  
  @bot.command()
  async def rank(ctx, *, question):
      embed = discord.Embed(
          colour=Color.red()
      )
      embed.add_field(name=&quot;BedRush.net Teamlog&quot;, value=f'{question}')
      embed.set_footer(text=&quot;developed by bedrush.net&quot;)
  
      await ctx.channel.purge(limit=1)
      await ctx.send(embed=embed)
  
  
  @bot.command()
  async def rules(ctx, *, question):
      embed = discord.Embed(
          colour=Color.red()
      )
      embed.add_field(name=&quot;BedRush.net Regelwerk&quot;, value=f'{question}')
      embed.set_footer(text=&quot;developed by bedrush.net&quot;)
  
      await ctx.channel.purge(limit=1)
      await ctx.send(embed=embed)
  
  
  @bot.event
  async def on_ready():
      activity = discord.Activity(type=discord.ActivityType.watching, name=&quot;Status • Wartungen&quot;)
      await bot.change_presence(activity=activity, status=discord.Status.do_not_disturb)
      print(&quot;\&quot;j4nluca\'s Bot\&quot; erfolgreich geladen&quot;)
  
  bot.run(&quot;MyBotID&quot;)
  </code></pre>