N
N
not important .2021-06-20 16:05:34
Node.js
not important ., 2021-06-20 16:05:34

How to make the bot write to the last created room?

message.guild.channels.create(`${message.author.tag} channel`, {
        type: 'text',
        parent: "parentID",
      }).then((channel) => {
        channel.overwritePermissions([
          {
            id: message.guild.roles.everyone.id,
            deny: ['MANAGE_ROLES', 'MANAGE_CHANNELS', 'MANAGE_MESSAGES', 'MANAGE_WEBHOOKS','ATTACH_FILES', 'EMBED_LINKS', 'SEND_TTS_MESSAGES', 'SEND_MESSAGES'],
            allow: ['VIEW_CHANNEL', 'READ_MESSAGE_HISTORY'],
          },
        ]);
    })


after entering the command, the bot creates a room through the above code. I want to ask you for help in finding a way so that after creating a room, the bot writes something to the room it created.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2021-06-20
@26DiDi12

Well, the channel is returning to you, just write therechannel.send('something');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question