title: Discord.js reminder command that works after bot reset
body: <p>I have a reminder command on my bot, but I'd like for it to store reminders in case my bot resets. I don't know how I'd go about doing this. Can anyone help me?</p>
  <p>This is my command:</p>
  <pre class="lang-js prettyprint-override"><code>    const ms = require('ms');
      
      module.exports = {
          name: &quot;remind&quot;,
          category: &quot;fun&quot;,
          description: &quot;Set's a reminder.&quot;,
          run: async (client, message, args) =&gt; {
      
              if (!client.lockit) client.lockit = [];
      
              let time = args[0];
              let validUnlocks = ['release', 'unlock'];
              if (!time) return message.reply('Please set an amount of time you would like your reminder to be! `!reminder [TIME][M-S-H]`').then(m =&gt; { m.delete(20000) });
              if (validUnlocks.includes(time)) {
                  message.channel.overwritePermissions(message.author.id, {
                      SEND_MESSAGES: true,
                  }).then(() =&gt; {
                      message.channel.send(`${message.author}**Your reminder is up!**`);
                      clearTimeout(client.lockit[message.channel.id]);
                      delete client.lockit[message.channel.id];
                  }).catch(error =&gt; {
                      console.log(error);
                  });
              } else {
                  message.channel.overwritePermissions(message.author.id, {
                      SEND_MESSAGES: true
                  }).then(() =&gt; {
                      message.channel.send(`${message.author}, I will remind you about ${args.slice(1).join(' ')} in ___${ms(ms(time), { long: true })}___.`).then(() =&gt; {    
                          client.lockit[message.channel.id] = setTimeout(() =&gt; {
                              message.channel.overwritePermissions(message.author.id, {
                                  SEND_MESSAGES: true
                              }).then(message.channel.send(`${message.author}, you had asked me to remind you, here is your reminder. The title of this reminder is &quot;${args.slice(1).join(' ')}.&quot;`)).catch(console.error);
                              delete client.lockit[message.channel.id];
                          }, ms(time));
      
                      }).catch(error =&gt; {
                          console.log(error);
                      });
                  });
              }
          }
      }
  </code></pre>