Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -61,7 +61,7 @@ async def on_message(message):
|
|
61 |
if message.content.startswith('.tetriouser'):
|
62 |
username = message.content.split(' ')[1].lower()
|
63 |
api = 'https://ch.tetr.io/api/users/' + username
|
64 |
-
response = requests.get(api)
|
65 |
json_data = json.loads(response.text)
|
66 |
if json_data['success'] is False:
|
67 |
await message.channel.send('User not found')
|
|
|
61 |
if message.content.startswith('.tetriouser'):
|
62 |
username = message.content.split(' ')[1].lower()
|
63 |
api = 'https://ch.tetr.io/api/users/' + username
|
64 |
+
response = requests.get(api, headers={"User-Agent": "discord-bot"})
|
65 |
json_data = json.loads(response.text)
|
66 |
if json_data['success'] is False:
|
67 |
await message.channel.send('User not found')
|