title: Discord.py Getting channel name and server name returns an error message
body: <p>I am currently trying to create a discord bot that, when someone says a command it says what server and what channel they are in. I was able to do this in the past, however in the past I was using <code>on_message(message)</code> and <code>if message.content.startswith('$hello')</code>. I recently started using <code>@bot.command</code> and I'm still trying to get used to it. I tried using <code>message.guild.name</code> and <code>message.channel.mention</code> but I get an error message. <code>Undefined variable 'message'</code> I assume this is because with my old setup, in the <code>on_message(message)</code> I define message, however with my current code it doesn't seem to work.</p>
  <pre><code>import discord
  import asyncio
  from discord.ext import commands
  botToken = token
  bot = commands.Bot(command_prefix = '#')
  client = discord.Client()
  @bot.event
  async def on_ready():
      print('Bot is online and ready.')
  @bot.command()
  async def whereAmI(ctx, *, messageContents):
      link = await ctx.channel.create_invite(max_age = 300)
      message = 'You are in {message.guild.name} in the {message.channel.mention} channel with an invite link of ' + link
      await ctx.message.author.send(message)
  bot.run(botToken)
  </code></pre>
  <p>And I am aware that it might DM the person, however I'm currently working on just my test bot before I bring the command over to my main one. If you have any better ideas please let me know. And the reason why I have the variable there is because I am planning on including the variables in the final product.</p>
  <p>If anything doesn't make sense, let me know and I will edit it to hopefully make it more clear and give more context if needed.</p>