When i use ctx.guild.roles
it says that i have no required ctx attribute if message attribute is first and message attribute is missing if ctx is the first.
@client.event
async def on_message(message, ctx):
if message.content == "!lighton":
light = True
role = discord.utils.get(ctx.guild.roles, name="Face")
while light:
await client.edit_role(server=server, role=role, colour=0xF7B0B0)
asyncio.sleep(3)
await client.edit_role(server=server, role=role, colour=0xD36D6D)
asyncio.sleep(3)
elif message.content == "!lightoff":
light = False
I've tried to use server = client.get_server(#server id#)
The console says " 'Bot' object has no attribute 'get_server' "
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…