plex.js
v1.0.2
Published
User friendly and fast package to interact with the Discord API
Downloads
2
Readme
Plex.js
Plex.js is a Discord API wrapper to interact Discord API faster and easier
Basic Examples
Ping-Pong
const plex = require("plex.js")
const plexevents = plex.events
plex.login("YOUR_TOKEN")
plexevents.on("ready", () => {
console.log("Bot is ready")
})
plexevents.on("message", async(msg) => {
if(!msg.author.bot) {
if(msg.content == "ping") {
msg.channel.send("pong")
}
}
})
Embeds
plexevents.on("message", async(msg) => {
if(!msg.author.bot) {
const embed = new plex.Embed()
.Title("Hello World!")
.Color("73,29,206")
.Description("Hello!")
msg.channel.send(embed)
}
})
Creating Roles
plexevents.on("message", async(msg) => {
if(!msg.author.bot) {
if(msg.content == "!cr") {
new plex.guildRole(msg.guild_id, {
name: "rolename" //you can check all of the parameters by going to this link: https://discord.com/developers/docs/resources/guild#create-guild-role
})
}
}
})
Creating Channels
plexevents.on("message", async(msg) => {
if(!msg.author.bot) {
if(msg.content == "!cr") {
new plex.guildChannel(msg.guild_id, {
name: "channelname"//you can check all of the parameters by going to this link: https://discord.com/developers/docs/resources/guild#create-guild-channel
})
}
}
})
To Do
New Events
Overwriting channels and roles
Bug Fixes And Improvements
Buttons