Skip to content
Discord bot doesn't respond to !command
Profile icon

Even though I enabled send messages for the bot and even gave it admin it won't respond to it's command !alive.
It keeps giving me this:
Ignoring exception in on_message
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/", line 343, in _run_event
await coro(*args, **kwargs)
File "", line 14, in on_message
if message.content.startwith('!alive'):
AttributeError: 'str' object has no attribute 'startwith'

This is my current code for it btw:
import discord
import os

client = discord.Client()
async def on_ready():
print('We have logged in as {0.user}'.format(client))

async def on_message(message):
if == client.user:

if message.content.startwith('!alive'):
await'Sup') (os.environ['TOKEN'])

You are viewing a single comment. View All
Profile icon

Ahh guys nvm I fixed it now