Contents
Installation
Execute npm i discord.mods
, and then install "BetterDiscord"...
And betterdiscord plugin for discord.mods ... Links
It's Ready!
Usage
How to use ? It's THE question.
Authentification
const Discord = require('discord.js')
const client = new Discord.Client()
var DM = require('./packages/index')
var DiscordMods = new DM();
client.login("Super-Secret-Token").then(()=>{
DiscordMods.login(client, "Super-Secret-DiscordMods-Token")
})
DiscordMods.action // Return Action Class
DiscordMods.tools // Return Tools Class
DiscordMods.arter // Return Arter Class
Action
Alert
Create an alert allows you to display a pop-up in an efficient and simple way
DiscordMods.action.alert(Discord.Channel `or` Discord.Guild, Discord.User, {
title: "Your Super title",
subtitle: "The super content :D"
})
Toast
Create a notification
DiscordMods.action.toast(Discord.Channel `or` Discord.Guild, Discord.User, {
title: "A ULTRA SUPER MEGA GOD TITLE OMG... and yes... i'm fine",
type: "danger", // "danger", "success", "warn", "info"
icon: false, // Active icon in the toast ?
timeout: 5000 // How many time alive ?
})
html
Create an empty pop-up, which can contain html elements
DiscordMods.action.html(Discord.Channel `or` Discord.Guild, Discord.User, {
html: `html? OK... <img src="i dont know">`
})
And if you will change size of window... Color Background of close button... Text of close button...
MaxSize is 2 thirds of the discord window pixel value (separately for width and height)
MinSize is 0px
A fix size is not allowed
DiscordMods.action.html(Discord.Channel `or` Discord.Guild, Discord.User, {
html: `<img src="https://discordmods.cmtapp.fr/example2.png" height="150px">`,
minWidth: 400, // you can change "min" to "max"
minHeight: 200,
button: "Don't Touch Me",
color: "magenta"
})
ExampleCeption D:
Tools
isConnected (userId)
Check if user is Connected with DiscordMods
await DiscordMods.tools.isConnected(Discord.User.id) // Return true if the user is connected else return false
escapeHtml (html)
Removes html execution from a text containing html
DiscordMods.tools.escapeHtml("<img src='a super image'>") // Instead of displaying the image it displays : "<img src='a super image'>"
markdown (string)
Convert text to markdown
DiscordMods.tools.markdown("**test**") // Return the markdowned text!
Arter
Links
Help
For Help go to my Discord :D ... Links
And issues : https://github.com/YiraSan/discord.mods/issues
Register Bot
Reback soon!