=1:returnIRCResponse(ResponseType.Say, self.help, message.ReplyTo) subreddit = message.ParameterList[0].lower() url ="https://api.imgur.com/3/gallery/r/{}/time/all/{}"url = url.format(subreddit, random.randint(0,100)) response = WebUtils.fetchURL(url, self.headers) jsonResponse = ...