Get components #325
Answered
by
JU5TDIE
Jacob222222222
asked this question in
Help
Get components
#325
-
Hey, I am trying to get the components from a message, but it says Here is my code import time
import discord
CHANNEL_ID = 989529457704452198
class MyClient(discord.Client):
async def on_ready(self):
print('Logged on as', self.user)
channel = self.get_channel(CHANNEL_ID)
await channel.send('!mine')
time.sleep(5)
message = [message async for message in channel.history(limit=1)][0]
print(message)
print(message.author)
print(message.content)
print(message.created_at)
print(message.mentions)
print(message.embeds[0].description)
print(message.embeds[0].title)
print(message.embeds[0].footer)
print(message.components[0])
client = MyClient()
client.run('TOKEN') |
Beta Was this translation helpful? Give feedback.
Answered by
JU5TDIE
Jul 7, 2022
Replies: 1 comment 4 replies
-
I guess you are using discord.py-self 1.9.2. Try reinstalling it with latest branch |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
Jacob222222222
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I guess you are using discord.py-self 1.9.2. Try reinstalling it with latest branch
pip install git+https://github.com/dolfies/discord.py-self.git