utils-djs
v0.0.1
Published
- A Easy To Use Package For Beginners - Will Be Updating Regularly (If i can, No Promise) # How To Use ```js const utils = require('utils-djs')
Downloads
2
Maintainers
Readme
Discord-Utils
- A Easy To Use Package For Beginners
- Will Be Updating Regularly (If i can, No Promise)
How To Use
const utils = require('utils-djs')
const Discord = require('discord.js')
const client = new Discord.Client()
const prefix = '!'
client.on('ready', ()=>{
console.log('ready')
})
client.on('messageCreate', (msg) =>{
if(utils.isBot(msg) == 'yes' || !msg.content.startsWith(prefix)) return
let invite = utils.isInvite(msg.content)
if(invite == 'yes') return msg.delete()
let urlcheck = utils.isUrl(msg.content)
if(urlcheck == 'yes') msg.delete()
let bannedWords = ['word1' , 'word2', 'word3', 'word4', 'word5']//...
let bancheck = utils.isABannedWord(msg.content , bannedWords)
if(message.content == prefix + "servermembers"){
if(message.author.id !== ownerid) return;
message.channel.send({ content: utils.allGuildMembers(msg)})
}
if(message.content == prefix + "fact"){
let facts = ['70% of the Earth\'s Surface is Covered in Water' , 'Earth is not flat, but it\'s not perfectly round either' , 'The world wastes about 1 billion metric tons of food each year.' , "Many feet bones don't harden until you're an adult." , "The heads on Easter Island have bodies." , "The moon has moonquakes.", "Goosebumps are meant to ward off predators." , "The hottest spot ever recorded on Earth is El Azizia, in Libya" , 'The "M\'s" in M&Ms stand for "Mars" and "Murrie."' , "Cotton candy was invented by a dentist."]
message.channel.send({content: utils.Randomiser(facts)})
}
})