#Cannot get *message_count* attribute from TextChannel instance

1 messages · Page 1 of 1 (latest)

edgy dome
#

hey guys

errant reef
#

Read the error

edgy dome
#

I see but why

#

it's defined but I can't use that

cosmic cove
#

read the guide/docs

#
import discord

bot = discord.Bot()

@bot.slash_command()
async def hello(ctx):
    await ctx.respond("Hello!")

bot.run("your token here")
edgy dome
#

welp nvm

cosmic cove
#

if you wanna use commands.Bot

#

it'd be

@bot.slash_command()
#

i believe?

edgy dome
#

I use cog

#

commands.Cog + setup()

#

each command in different file

errant reef
#

commands.slash_command()

edgy dome
#

no, it's working, I have other problem. I can't get message_count attribute for some reason, but it exists

errant reef
#

you have to loop the channel messages

edgy dome
#

it's not a class var

errant reef
#

message_count doesnt exist

cosmic cove
#

message_count is for threads