Discord.py is not working!

Script:

import discord
import asyncio

client = discord.Client()

@client.event
async def on_ready():
print('Logged in!')

@client.event
async def on_message(message):
if message.content.startswith('ping'):
client.send_message(message.channel, "PONG!")


client.run('THIS IS MY SUPER SECRET TOKEN HEHEHHEHE')

And it doesnt works… And when i typed python it shows python 2 why?

Saying that “it doesn’t work” isn’t that helpful. Maybe answer these questions and then we can help:

  • What do you want it to do?
  • What did it do instead?
  • Have you tried anything to solve this?
  • What error messages, if any, are showing?
3 Likes

You can type python3 in the Console to invoke Python 3, so it’s definitely there!

Take a look at flask-python3 to see how they start their application using Python 3. Pay particular attention to the glitch.json file.

3 Likes