Skip to content

Mauro2226/discord-placeholder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DISCORD PLACEHOLDER

This is a simple placeholder package for discord.js.

You can install this package with:

npm i discord-placeholders

Below are some code examples using this package:

const client = new discord.Cient()
const placeholder = require('discord-placeholder')

let placeholder = {
  //Use @ in front of the placeholder name to tag a user
   "@{user}":"1234",
   //Use # in front of the placeholder name to tag a channel
   "#{channel}":"1234",
   //Use & in front of the placeholder name to tag a role
   "&{role}":"1234",
   //Use nothing to replace 'example' with 'Hi'
   "example":"Hi"
}

let string = "example , @{user}.You can read the rule in #{channel}. &{role}"

placeholder = placeholder.placeHolder(string,placeholder)
//placeholder.placeHolder(string,placeholder) will return the string with placeholder applied

For any problem you can contact me on discord: Maurizio#0268.

About

A discord placeholder package for npm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published