What is this?
Hebrew-pack is a pack that built in hebrew, That's mean that all the pack function are in hebrew!
How to use?
Thanks to @MyCool#4453 for helping me.
First: You have to get the package. for example:
const hebrew = require("hebrew-package")
Second: You have to get the function that you need. for example:
let trivia = hebrew.trivia({difficulty: <difficulty>, amount_of_options: "<amount of options>"})
Or
let joke = hebrew.joke()
The functions
The function for now:
trivia,
jokes
Code for example:
const Discord = require('discord.js');
const { Client, Intents } = require('discord.js')
const client = new Client({ intents: [Intents.FLAGS.DIRECT_MESSAGES, Intents.FLAGS.GUILDS] })
const prefix = "!";
const hebrew = require('hebrew-package');
client.on('ready', async () => {
console.log('ready');
})
client.on('message', async message => {
let args = message.content.slice(prefix.length).trim().split(/ +/);
let command = args.shift().toLocaleLowerCase();
//----------Trivia:
if(command === 'trivia'){
let trivia = hebrew.trivia({difficulty: "Easy", amount_of_options: "3"});
message.channel.send(`The question:\n${trivia.question}\n\nThe options:\n${trivia.options.join('\n')}`);
}
//----------Jokes:
if(command === 'jokes'){
let jokes = hebrew.jokes();
message.channel.send(`The joke:\n${jokes.joke}\n\n${jokes.punchline}`);
}
})
client.login("token");