Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How to create a command that receives attributes in Discord in 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}
Arguments: ${args}`);
}
Source by discordjs.guide #
 
PREVIOUS NEXT
Tagged: #How #create #command #receives #attributes #Discord #js
ADD COMMENT
Topic
Name
3+6 =