Skip to content
Permalink
Browse files
Add files via upload
  • Loading branch information
busario2 committed Nov 30, 2018
1 parent 4923c1c commit 4ddfbb57f271185a1cd9ec4216cf9394edbcdf6e
Showing 1 changed file with 2 additions and 0 deletions.
@@ -5,6 +5,7 @@ import urllib.request #used for opening links for api's
from discord.ext import commands #used for commands that will be needed to communicate with the bot on python

##############Section in which the youtube video helped me to connect the bot to discord.###############
###############YouTube video link https://www.youtube.com/watch?v=2YO96GFBSLw ####################
Client = discord.Client() #connects discord to the python program
token ="NTExMzM2MjE3OTUwODE0MjA5.Dspdvg.X-1PT7UBuUsbF6ihpzh1rPbOYCs" #serves as a login for the bot
client = commands.Bot(command_prefix = "!") #whatever prefix chosen is used to run the functions made
@@ -79,6 +80,7 @@ async def Temp(msg):
await client.say(completedStatement)

##########Example of how i learnt and adapted the code from the video i watched##############
##################YouTube video link https://www.youtube.com/watch?v=19-LOqdI61k&t=130s##################
def locationIdFind(input): #this function gets the location id of all the cities the user asks information for and returns it
try:
url1 = "https://www.metaweather.com/api/location/search/?query="

0 comments on commit 4ddfbb5

Please sign in to comment.