3 from discord.ext import commands
  4 import json
  5 import requests
 12 url = 'https://api.punkapi.com/v2/beers?brewed_before=11-2012&abv_gt=6'
 13 client = commands.Bot(command_prefix='.')           
 14 
 15 @client.event
 16 async def on_ready():
 17     print('Beer Bot Online')
 18 
 19 def get_beer():
 20     res= requests.get(url)
 21     data = json.loads(res.text)
 22     beer=data[0]['name']+data[0]['tagline']
 23     return beer
 24 
 25 @client.event
 26 async def on_message(message):
 27     await client.process_commands(message)
 28     channels=['testers','recipes','general','log']                
 29     valid_users=['M_Roberts#3646','M_Roberts_Bot#4908']        
 30                                                                                           
 31     if str(message.channel)in channels and str(message.author)in valid_users:
 32         if message.content.find('Beer')!=-1:
 33             beer=get_beer()
 34             await message.channel.send(beer)
 35         else:
 36             await message.channel.send('lol')
 37 ++++++++++++
 38 client.run(API_KEY)