title: Is there a way to update the aliases of a bot discord command?
body: <p>I have a command that sends text copypasta</p>
  <p>example copypasta.json:</p>
  <pre><code>{
      &quot;xxx&quot; : &quot;xxxxxx xxxx xxxxx xxxxx...&quot;,
      &quot;yyy&quot; : &quot;yyyyyy yyyy yyyyy yyyyy...&quot;,
      &quot;zzz&quot; : &quot;zzzzzz zzzz zzzzz zzzzz...&quot;
  }
  </code></pre>
  <p>Code to send the text:</p>
  <pre><code>json_file = 'copypasta.json'
  with open(json_file) as json_data:
      jsonLoad = json.load(json_data)
  
  aliases = list(jsonLoad.keys())
  
  @client.command(aliases=aliases) #problem is here
  async def _copypasta(ctx):
  
      keyCopypasta = ctx.invoked_with
      valueCopypasta = jsonLoad[keyCopypasta]
  
      await ctx.send(valueCopypasta)
  </code></pre>
  <p>If i send -xxx in Discord, the bots sends the value in json &quot;xxxx xxx...&quot;</p>
  <p>So I made a command to add a new element in json:</p>
  <pre><code>async def addCopypasta(ctx, key, *, value):
      
      a_dictionary = {key: value}
  
      with open(&quot;copypasta.json&quot;, &quot;r+&quot;) as file:
          data = json.load(file)
          data.update(a_dictionary)
          file.seek(0)
          json.dump(data, file)
      
      await ctx.send(&quot;successfully added&quot;)
  </code></pre>
  <p>But when I send in Discord the key of the new element added, the bot does not find it, I need to restart the bot so that the command's &quot;aliases&quot; variable is updated.</p>
  <p>Is it possible to update the command aliases without restarting the bot?</p>