quotes-naruto v0.0.12
Эта новый пакет в котром собрание все цитаты персонажей Наруто на русском/английском языке (на данный момент не все). Также цитаты брались с данного сайта: Citaty.info. Информация о изменении в quotes-naruto@0.0.11
Установка
$ npm install quotes-naruto@0.0.12
$ npm install database-sempai@2.0.3
Пример с обычными функциями
const quotesNaruto = require('quotes-naruto');
let text = quotesNaruto.queotesCharacterName('itachi', 'ru');
console.log(`Итачи: ${text}`);
Подключения бази данных
const { Database } = require('quotes-naruto')
const db = new Database({
log: "База данных подключена", // будет показывать в консоле сообщения о подключении/создани базы данных
path: "./database" // название папки
})
db.addQuotes("name", "Хз")
console.log(db.quetesNameContent("name"))
// Люди#new#Хз
Если вы не подключите дб, функции которые связаны с кастом цитатами не будут работать.
queotesAll()
queotesAll('language?')
language
- языкen/ru
Выдаст рандомную цитату без автора
queotesNameAll()
queotesNameAll('type?', 'separator?', 'language?')
Выдаст рандомную цитату вместе с автором
type
- left - автор цитаты будет в конце. right - автор цитаты будет в самом началеseparator
- разделить, точнее то что будет отделать цитату та автораlanguage
- языкen/ru
queotesCharacterName()
queotesCharacterName('name', 'language?')
name
- название персонажаlanguage
- языкen/ru
Выдаст рандомную цитату заданного персонаж. Замена старых функций
queotesJSON()
queotesJSON('name', 'type?', 'language?')
name
- название персонажаtype
-queotes/info/all
language
- языкen/ru
Выдаст цитаты (не только) в формате json
character()
character('name', 'type?', 'language?')
name
- название персонажаtype
- тип:description
- описание,clan
- клан в котором состоит,status
- статус: мёртв/жив/жива,date
- дата рождения,growth
- рост,weight
- кг,element
- элемент,rank
- ранг,family
- семьяlanguage
- языкen/ru
Выдаст заданную информацию о персонаже
isPackageCharacter()
isPackageCharacter('name')
name
- название персонажа Выдастtrue
- если указанный персонаж есть в пакете,false
- если нет
packageCharacter()
packageCharacter('separator?')
separator
- разделитель Выдаст всех доступных персонажей в пакете
isPackageType()
isPackageType('name')
name
- название типа Выдастtrue
- если указанный тип есть,false
- если нет
packageType()
packageType('separator?')
separator
- разделитель Выдаст доступные типиcharacter
randomNames()
randomNames('type?')
type
- тип:weapon
- техники,jinchuriki
- джинчурики,character
- персонаж Выдаст рандомное название персонажей, оружий, техник
randomNarutoFact
randomNarutoFact('language')
language
- языкen/ru
Выдаст рандомный факт о аниме Наруто
addQuotes()
db.addQuotes('name', 'content')
Создаёт новую переменную в которой будет находиться ваша цитата или же фраза, также если уже была создана переменная эта функция просто додаст новое содержимое
name
- название вашей переменнойcontent
- содержимое переменной#new#
- спомощу этого символа вы можете разделить содержимое в переменной на части
db.addQuotes('sempai', 'Люди просто зло#new#Люди это добро#new#Собака лудший друг человека')
console.log(db.quetesName('sempai'))
// Выдаст рандомную цитату/фразу которою вы написали ранние или же додаст
setQuotes()
db.setQuotes('name', 'new content')
Полностью изменит содержимое переменной
quetesJSON()
db.quetesJSON()
Выдаст все переменные и их содержимое в формате json
quetesName()
db.quetesName('name')
Покажет рандомную фразу, если вы использували разделитель, а если нет покажет просто содержимое без рандома
name
- название переменной
quetesNameContent()
db.quetesNameContent('name')
Покажет Всё содержимое которое находится в переменной
isCustomQuetes()
db.isCustomQuetes('name')
name
- название переменнои, Вернётtrue
- если переменная существует,false
- если переменная не существует
quetesDelete()
db.quetesDelete('name')
Удалит переменною
name
- название переменной которою хотите удалить
quetesDeleteAll()
quetesDeleteAll()
Удалит все переменные
ping()
ping()
Покажет задержку в ms
Installation
$ npm install quotes-naruto@0.0.11
$ npm install database-sempai@1.0.0
Example with normal functions
const quotesNaruto = require('quotes-naruto');
let text = quotesNaruto.queotesCharacterName('itachi', 'en');
console.log(`Itachi: ${text}`);
Database connections
const { Database } = require('quotes-naruto')
const db = new Database({
log: "Database is connected", // will show messages about database connection/creation in the console
path: "./database" // folder name
})
db.addQuotes("name", "Xs")
console.log(db.quetesNameContent("name"))
// People#new#Xs
If you don't include a db, the functions that are related to custom quotes won't work.
queotesAll()
queriesAll('language?')
language
- languageen/ru
Gives a random quote without an authorqueuesNameAll()
Will issue a random quote along with the authorqueotesNameAll('type?', 'separator?', 'language?')
type
- left - the quote author will be at the end. right - the author of the quote will be at the very beginningseparator
- separate, or rather what will be used to separate the author's quotelanguage
- languageen/ru
queotesCharacterName()
queotesCharacterName('name', 'language?')
name
- character namelanguage
- languageen/ru
Gives a random quote for the given character. Replacing old functionsqueotesJSON()
queotesJSON('name', 'type?', 'language?')
name
- character nametype
-queotes/info/all
language
- languageen/ru
Gives quotes (not only) in json formatcharacter()
character('name', 'type?', 'language?')
name
- character nametype
- type:description
- description,clan
- clan,status
- status: dead/alive/alive,date
- date of birth,growth
- height,weight
- kg,element
- element,rank
- rank,family
- familylanguage
- languageen/ru
Will give the given information about the characterisPackageCharacter()
isPackageCharacter('name')
name
- character name Returnstrue
if the specified character is in the package,false
if notpackageCharacter()
packageCharacter('separator?')
separator
- separator Will return all available characters in the packisPackageType()
isPackageType('name')
name
- type name Returnstrue
if the specified type exists,false
if notpackageType()
packageType('separator?')
separator
- separator Returns availablecharacter
typesrandomNames()
randomNames('type?')
type
- type:weapon
- techniques,jinchuriki
- jinchuriki,character
- character Will give a random name of characters, weapons, techniciansrandomNarutoFact
randomNarutoFact('language')
language
- languageen/ru
Gives a random fact about Naruto animeaddQuotes()
Creates a new variable in which your quote or phrase will be located, also if a variable has already been created, this function will simply add new contentdb.addQuotes('name', 'content')
name
is the name of your variablecontent
- variable content#new#
- using this symbol you can split the content in a variable into partsdb.addQuotes('sempai', 'People are evil#new#People are good#new#A dog is man's best friend') console.log(db.quetesName('sempai')) // Will give a random quote/phrase that you wrote earlier or add
setQuotes()
db.setQuotes('name', 'new content')
Will completely change the contents of the variable
quetesJSON()
db.quetesJSON()
Will return all variables and their content in json format
quetesName()
db.quetesName('name')
Will show a random phrase if you used a separator, and if not, it will show just the content without a random one
name
- variable namequetesNameContent()
Shows all the content that is in the variabledb.quetesNameContent('name')
isCustomQuets()
db.isCustomQuetes('name')
name
- variable name, Returnstrue
if the variable exists,false
if the variable does not existquetesDelete()
Delete variabledb.quetesDelete('name')
name
- the name of the variable you want to delete
quetesDeleteAll()
quetesDeleteAll()
Remove all variables
ping()
ping()
Show delay in ms