Answer the question
In order to leave comments, you need to log in
I want to make logs how to solve the problem?
I want to make logs but this error comes out
File "C:\Users\Rima Pashayeva\Desktop\neffex\n.py", line 44, in on_message
print('Member: ', message.Member)
AttributeError: 'Message' object has no attribute 'Member'
Here is my code
import discord
from discord.ext import commands
import os, sqlite3
import math
import random
from discord_components import DiscordComponents, Button, ButtonStyle
from asyncio import sleep
import time
from discord import Game
import requests
from discord import FFmpegPCMAudio
import youtube_dl
from os import system
from discord.utils import get
import asyncio
import voice
from discord import utils
import io
from config import settings
client = commands.Bot(command_prefix = settings['PREFIX'], intents=discord.Intents.all())
client.remove_command('help')
@client.event
async def on_ready():
DiscordComponents(client)
print('Ботяна на старте')
await client.change_presence(status = discord.Status.online, activity = discord.Game('Python \n Создатель Могучий#0464') )
global base, cur
base = sqlite3.connect('Ботяна.db')
cur = base.cursor()
if base:
print('DataBase connected...OK')
@client.event
async def on_message(message):
print('Message: ', message.content)# содержимое сообщения
print('Member: ', message.Member)
@client.command()
async def Ы(ctx):
await ctx.send('Я кибер Неффекс служу хакер крафту')
Answer the question
In order to leave comments, you need to log in
message.member is one, two - xs. It makes sense to use the standard logger library
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question