locking down trackday function only to trackday gamers
This commit is contained in:
parent
589d78211c
commit
1fb2772ade
@ -275,6 +275,9 @@ async def wallpaper(ctx):
|
||||
|
||||
@bot.command(name='trackdays')
|
||||
async def trackdays(ctx):
|
||||
role = discord.utils.find(lambda r: r.name == 'Track day gamers', ctx.message.guild.roles)
|
||||
if role not in ctx.message.author.roles:
|
||||
return await ctx.send('You cant do that')
|
||||
import trackdays
|
||||
|
||||
for track, events in trackdays.get_msreg().items():
|
||||
|
@ -16,7 +16,7 @@ def get_msreg():
|
||||
}
|
||||
events = {}
|
||||
for org_name, org_id in orgs.items():
|
||||
xml_blob = requests.get("%s/%s?exclude_cancelled=true&postalcode=%s&radius=500" % (base_url, org_id, zipcode)).text
|
||||
xml_blob = requests.get("%s/%s?exclude_cancelled=true&postalcode=95035&radius=500" % (base_url, org_id)).text
|
||||
json_blob = json.loads(json.dumps(xmltodict.parse(xml_blob)['response']['events']))
|
||||
pp = pprint.PrettyPrinter(indent=4)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user