Forums > Javascript >

Some pretty cool discord.js functions


Posts: 757

Threads: 58

Joined: Feb, 2021

Reputation: 3

Posted

I will be naming some cool discord.js functions

So the first one is one that the WeAreDevs discord bot has. It is called startTyping (this makes it so that it says at the bottom BotName is typing) Example:

channel.startTyping(5);

Than you can do like 

channel.stopTyping(true);

To stop it its pretty cool makes the bot have human feel

The next ones are customization

Custom status (Will say Playing a game than the custom game thingy)

So when you have this line (If you dont copy and paste)

client.on('ready', () => {
  console.log(`Logged in as ${client.user.tag}!`);
});

That part you can make a new line after the console.log(`Logged in as ${client.user.tag}!`)

And type the following:

client.user.setActivity("Replace this with the message")

The next one is statuses like do not disturb and idle

It is pretty easy start by making a new line (I already explained) and type this:

client.user.setStatus("dnd") or client.user.setStatus("idle")

Pretty cool function.

Thank you for reading! My hands hurt I might make a part 2 who knows.

no

Error: The signature must be between 3-200 characters

Posts: 39

Threads: 2

Joined: Feb, 2021

Reputation: 0

Replied

vouch really good i learned much i am bigbrain now bump this thread :gun:

0x777_

Baba Yaga

Posts: 1714

Threads: 17

Joined: Sep, 2020

Reputation: 24

Replied

PareX is typing.....

Discord -> null#8619

Posts: 757

Threads: 58

Joined: Feb, 2021

Reputation: 3

Replied

@0x777_

Lmao

/chars

no

Error: The signature must be between 3-200 characters