Answer the question
In order to leave comments, you need to log in
Discord.py How to write a message to a file and change it, send it back?
We need code that writes all messages from a specific channel to a text file. Messages contain multiple lines. Then change (for example, divide all the numbers in it by 2) and send back.
Answer the question
In order to leave comments, you need to log in
I advise you to read this article, it describes in detail how to write data to a .json file.
create a condition that when a message is found, the bot writes it to a .json file, after which you can work with this file and change the values in it as you like.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question