This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

discord.mods

0.4.1 • Public • Published

Version Downloads
npm installInfo

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!

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Published

Version History

  • Version
    Downloads (Last 7 Days)
    • Published

Package Sidebar

Install

npm i discord.mods

Weekly Downloads

1

Version

0.4.1

License

MIT

Unpacked Size

13.3 kB

Total Files

6

Last publish

Collaborators

  • yirasan