“Jak utworzyć polecenie, które odbiera atrybuty w Discord w JS” Kod odpowiedzi

Jak utworzyć polecenie, które odbiera atrybuty w Discord w JS

// client.on('message', message => {
if (!message.content.startsWith(prefix) || message.author.bot) return;

const args = message.content.slice(prefix.length).trim().split(' ');
const command = args.shift().toLowerCase();
// the rest of your code
Weary Whale

Jak utworzyć polecenie, które odbiera atrybuty w Discord w JS

// using the new `command` variable, this makes it easier to manage!
// you can switch your other commands to this format as well
else if (command === 'args-info') {
	if (!args.length) {
		return message.channel.send(`You didn't provide any arguments, ${message.author}!`);
	}

	message.channel.send(`Command name: ${command}\nArguments: ${args}`);
}
Weary Whale

Odpowiedzi podobne do “Jak utworzyć polecenie, które odbiera atrybuty w Discord w JS”

Pytania podobne do “Jak utworzyć polecenie, które odbiera atrybuty w Discord w JS”

Więcej pokrewnych odpowiedzi na “Jak utworzyć polecenie, które odbiera atrybuty w Discord w JS” w JavaScript

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu