mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-30 02:55:44 -05:00
19 lines
842 B
JavaScript
19 lines
842 B
JavaScript
const urban = require('urban-dictionary')
|
|
module.exports = {
|
|
name: 'urban',
|
|
alias: [],
|
|
description: 'Working Urban Dictionary',
|
|
usage: '<word>',
|
|
trusted: 0,
|
|
execute (bot, username, usernameraw, sender, prefix, args, config, hash, ownerhash, selector) {
|
|
urban.autocompleteExtra(args[0], (error, results) => {
|
|
if (error) {
|
|
bot.tellraw(selector, [{ text: '[', color: 'dark_red' }, { text: 'Urban', color: 'red' }, { text: '] ', color: 'dark_red' }, { text: error.message, color: 'red' }])
|
|
return
|
|
}
|
|
results.forEach(({ preview, term }) => {
|
|
bot.tellraw(selector, [{ text: '[', color: 'dark_red' }, { text: 'Urban', color: 'red' }, { text: '] ', color: 'dark_red' }, { text: term, color: 'white' }, { text: ' - ', color: 'white' }, { text: preview, color: 'white' }])
|
|
})
|
|
})
|
|
}
|
|
}
|