V
V
vladimirtheq2020-07-14 13:41:27
Python
vladimirtheq, 2020-07-14 13:41:27

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

1 answer(s)
A
Alexander, 2020-07-14
@Alexandre888

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 question

Ask a Question

731 491 924 answers to any question