Skip to content
Advertisement

How to use a user account to fetch/get messages (discord.py)

I have 2 discord client instances a bot and a user account. I have already figured out how to copy messages from one channel to another channel, basically a on_message event. However, I want to know if there is a way I can use the user account to fetch the messages, I’ve tried fetching messages in different guilds but they didn’t work because the bot was not in the server and the bot is fetching messages. I’ve tried using the user account instance to do it but it didn’t really work.


The comments were there as a guide for myself because I’m not that familiar with Python it’s fairly new to me. If anyone knows how I can use the user account to get or fetch the messages I’d appreciate the help…

PS: I know that some of the code isn’t needed, I haven’t removed anything that isn’t needed. I wanted to actually finish the project before inspecting it.

Advertisement

Answer

I just wanted to know that I have tried this myself and it is not possible. Because from discord.py’s Docs. Which you can find down below, does not allow users (user account) to transfer data to a bot since you would need to request from discord API which leads to user getting banned (Very quickly) theere are some work arrounds but I would suggest not doing so since self botting is against the TOS of discord

https://discordpy.readthedocs.io/en/stable/

EDIT: Another thing is that discord API blocks users from fetching or getting anything using a user account with discord.py

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement