title: Need advice about discord.py bot
body: <p>Writing my first bot. I'm trying to make a bot that will change the username and role of a member by command. </p>
  
  <p>Example: !setnick [member] [newnick] ; !giverole [member] [role]</p>
  
  <p>I have the role command working great, however I'm getting confused with the change nickname documentation <a href="https://discordpy.readthedocs.io/en/v0.16.7/api.html#discord.Client.change_nickname" rel="nofollow noreferrer">here</a></p>
  
  <pre><code>    @bot.command(pass_context=True)
  async def setnick(ctx, nickname):
      await change_nickname(server.get_member, nickname)
      await ctx.send(f"User's nickname has been changed.")
  </code></pre>
  
  <p>The bot runs, but when I enter the command in discord it returns with this error:</p>
  
  <pre><code>Ignoring exception in command setnick:
  Traceback (most recent call last):
    File "FILEPATH", line 79, in wrapped
      ret = await coro(*args, **kwargs)
    File "FILEPATH", line 23, in setnick
      await change_nickname(server.get_member, nickname)
  NameError: name 'change_nickname' is not defined
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "FILEPATH", line 863, in invoke
      await ctx.command.invoke(ctx)
    File "FILEPATH", line 728, in invoke
      await injected(*ctx.args, **ctx.kwargs)
    File "FILEPATH", line 88, in wrapped
      raise CommandInvokeError(exc) from exc
  discord.ext.commands.errors.CommandInvokeError: Command raised an exception: NameError: name 'change_nickname' is not defined
  </code></pre>
  
  <p>Thanks in advance!</p>