#Empty content
1 messages · Page 1 of 1 (latest)
from interactions import Client, Intents, listen, slash_command, SlashContext
import asyncio
@listen()
async def on_ready():
print(f'Logged on as {client.user}!')
@listen()
async def on_message(message):
print(f'Message from {message.author}: {message.content}')
@listen()
async def on_message_create(event):
# This event is called when a message is sent in a channel the bot can see
print(f"message received: {event.message.content}")
@listen()
async def on_interaction(interaction):
print(f'Interaction from {interaction.user}: {interaction.data}')
@slash_command(name="my_command", description="My first command :)")
async def my_command_function(ctx: SlashContext):
await ctx.send("Hello World")
def run():
global client
client = Client(intents=Intents.DEFAULT)
client.start("toekn")
if __name__ == '__main__':
run()
it was a code that i pasted
message received:
message received:
message received:
message received:
and this is the result of that
omg
sorryd
i forget to write intents
i think the code below the description was written without right intents settings
You need to enable this intent to access message content now
hi, what was ur solution exactly? cuz i got the same problem rn lol
after I add Intents.MESSAGE_CONTENT it looking good for me
bot = Client(intents=Intents.DEFAULT | Intents.MESSAGE_CONTENT)