S
S
sqtr2020-12-25 17:45:05
Node.js
sqtr, 2020-12-25 17:45:05

How to send commands from console?

For example, I enter a certain command in the console and the bot should send it to the text channel

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-12-25
@sqtr

let Console = process.openStdin()
Console.addListener("data", res => {
    let content = res.toString().trim().split(/ +/g)
    client.channels.cache.get("id_канала").send(content)
})

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question