updated for UD

This commit is contained in:
John Facey
2022-06-17 14:14:55 -05:00
parent 8b5a153c4e
commit e5df5c172c
3 changed files with 45 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ module.exports = {
**!random** - Selects a random article: *!random*
**!random category** - Selects a random article by category: *!random sports*
**!answer** - Instant Live Search: *!answer salesforce*
**!slang** - Urban Dictionary Search: *!answer slang*
`
);
}

17
commands/slang.js Normal file
View File

@@ -0,0 +1,17 @@
var libFlayer = require("../libFlayer.js");
module.exports = {
name: 'slang',
description: 'Slang',
async execute(message,args) {
if (args.length < 1) {
message.reply(`Please use in !slang [question] format`);
return;
}
var question = encodeURIComponent(args.join(" "));
var slangData = await libFlayer.getSlang(question);
message.reply(`${slangData.definition} - ${slangData.example}`);
}
};