title: How do I fix Reaction Functions not working (after bot restarted)
body: <p>So I am working on a discord.js ticket system and I ran through a bug which I can't seem to fix by myself. </p>
  
  <p>Basically, I work with reactions to open &amp; close tickets, but if someone makes a ticket and then I restart the bot, the ticket created before the restart doesn't work.
  The reaction that should close the ticket, doesn't - but it does work on any tickets made <em>after</em> the reset</p>
  
  <p>My code:</p>
  
  <pre class="lang-js prettyprint-override"><code>    else if(reaction.emoji.name === '') {
  
          if(userTickets.has(user.id)) {
              if(reaction.message.channel.id === userTickets.get(user.id)) {
                  reaction.remove(user);
                  let embed = new RichEmbed();
                  embed.setDescription("Ticket will be closed in 5 seconds.")
                  reaction.message.channel.send(embed);
                  setTimeout(() =&gt; {
                      reaction.message.channel.delete('closing ticket')
                      .then(channel =&gt; {
                          console.log("Deleted " + channel.name);
                      })
                      .catch(err =&gt; console.log(err));
                  }, 5000);
              }
          }
  
          else if(reaction.message.guild.channels.some(channel =&gt; channel.name.toLowerCase() === user.username + 's-ticket')) {
              let embed = new RichEmbed();
              embed.setDescription("Ticket will be closed in 5 seconds.");
              reaction.message.channel.send(embed);
              setTimeout(() =&gt; {
                  reaction.message.guild.channels.forEach(channel =&gt; {
                      if(channel.name.toLowerCase() === user.username + 's-ticket') {
                          channel.delete().then(ch =&gt; console.log('Deleted Channel ' + ch.id))
                      }
                  });
              }, 5000);
          }
      }
  });
  </code></pre>