noobingapi

0.2.0 • Public • Published

NoobingAPI

NoobingAPI sizin yazacağınız her kodda işinizi kolaylaştırmak için yapılmış. Çok farklı konularda fonksiyonlar içeren bir npm'dir.

CommonJS:

const napi = require("noobingapi");

ES6:

import napi from "noobingapi";

Örnek kullanımlar

ip

İp fonksiyonu express npm'i ile websitenizi hazırladığınızda sitenize giren kişinin ipsine ulaşmanızı sağlar.

let app = require("express")();
const { ip } = require("noobingapi");

app.get("/", (req, res) => {
  res.send(`Senin ip'in: ${ip(req)}`); // Örnek çıktı: Senin ip'in: 82.639.495.232
});

app.listen(3000);

voteCheck

VoteCheck fonksiyonu top.gg'de botunuza bir kişinin oy verip vermediğini algılanızı sağlar.

const Discord = require("discord.js")
const client = new Discord.Client({intents: 32767})
const { voteCheck } = require("noobingapi")

client.on("messageCreate", await msg => {
let vote = async voteCheck(client, "top.gg bot tokeniniz", msg.author) // client yerine client.id veya msg.author yerine msg.author.id kullanabilirsiniz.
// Örnek çıktı: true
let v = vote ? "vermiş." : "vermemiş."
console.log(`Mesaj atan ${msg.author.username} kişisi oy ${v}`)
// Örnek çıktı: Mesaj atan Noobing kişisi oy vermiş.
})

client.login("botunuzun tokeni.")

discordEmoji

DiscordEmoji fonksiyonu discordda atılan bir sunucuya özel emojinin bilgilerine ulaşmanızı sağlar.

const Discord = require("discord.js")
const client = new Discord.Client({intents: 32767})
const { discordEmoji } = require("noobingapi")

client.on("messageCreate", await msg => {
let emote = discordEmoji(msg.content)
// Örnek çıktı: {animated: true, name: "hi", id: "123456789012345678", url: "https://cdn.discordapp.com/emojis/123456789012345678.gif" }
if(!emote.id) return
msg.reply(`Attığın emojinin url'si: ${emote.url}`)
// Örnek çıktı: Attığın emojinin url'si: https://cdn.discordapp.com/emojis/123456789012345678.gif
})

client.login("botunuzun tokeni.")

randomMeme

RandomMeme fonksiyonu ingilizce ve türkçe seçenekleri olmak üzere istediğiniz bir dilde redditten meme almanızı sağlar.

const { randomMeme } = require("noobingapi");
setInterval(async () => {
  let meme = await randomMeme("en yada tr");
  console.log(meme);
  // Örnek çıktı: {finded: true, title: 'I’m going to bed', image: 'https://i.redd.it/c54sr1qnc99a1.jpg', from: 'r/memes', lang: 'en', upvotes: 14097 }
}, 30000);

tdk

Tdk fonksiyonu türk dil kurumunun orjinal sitesinden bir kelime ile ilgili bilgi çekmenizi sağlar.

const { tdk } = require("noobingapi")
setInterval(() =>
let word = await napi.tdk("kelimeniz")
console.log(word)
// Örnek çıktı: {finded: true, meaning: 'Çocuğu olan kadın, ana, valide, kocakarı, mader, nene, aba', language: 'lisan yok', example: 'Örnek yok', proverb: 'anne olmak', writer: 'yazar yok' }
}, 2000)

ytInfo

YtInfo fonksiyonu bir youtube videosu ve o videoyu atan kanal hakkında bilgi edinmenizi sağlar.

const { ytInfo } = require("noobingapi");
setTimeout(async () => {
  let info = await ytInfo("https://www.youtube.com/watch?v=DJd8D908jd098dJ9dj"); // DJd8D908jd098dJ9dj şeklinde de geçerlidir.
  console.log(info);
  // Örnek çıktı: { name: 'New Toxic Deck DELETES SKILL from Clash Royale ⚠️', description: "✔ Creator Code: SIRTAG \\nHere's the video on my main channel using this same deck: https://www.youtube.com/watch?v=8DRtfcXnLdE\\n► Watch me play the LOWEST DAMAGE DECK: https://youtu.be/tmu8LunH7rc\\n► Subscribe to Me: https://bit.ly/3nqd8AN\\n\\nThis clash royale clone deck is extraordinarily fun to play after the recent balance changes! This giant skeleton clone deck can take towers \\u0026 destroy dreams in seconds.\\n\\n#ClashRoyale #CloneDeck #GiantSkeletonClone", comments: '88', views: '66,974', thumbnail: 'https://i.ytimg.com/vi/cIhon7EUguA/hqdefault.jpg?sqp=-oaymwEiCKgBEF5IWvKriqkDFQgBFQAAAAAYASUAAMhCPQCAokN4AQ==\\u0026rs=AOn4CLCFVukJX_C6y34HUKovtwwyUKknnQ', likes: '3,044', date: 'Dec 19, 2022', channel: { name: 'More Tag', subs: '52.1K' } }
});

timedForEach

TimedForEach fonksiyonu forEach fonksiyonunun yaptığı toplu görevde görevler arasına süre eklemenizi sağlar.

const napi = require("noobingapi");
let things = [0, 1, 2, 3, 4, 5];

things.timedForEach((x) => {
    console.log(x);
    /* Örnek Çıktı:
0
1 (1 saniye sonra)
2 (2 saniye sonra)
3 (3 saniye sonra)
4 (4 saniye sonra)
5 (5 saniye sonra)
*/
  },
  1000
);

websiteSS

WebsiteSS fonksiyonu bir siteye girmeden o sitenin ekran görüntüsünü almanızı sağlar.

const { websiteSS } = require("noobingapi");

console.log(websiteSS("https://google.com")); // google.com şeklinde de geçerlidir.
// Örnek Çıktı: google.com'un ekran görüntüsünü veren link.

howMany

HowMany fonksiyonu bir metinde bir şeyden kaç tane olduğunu bulmanızı sağlar.

const napi = require("noobingapi");

let text = "İstediğiniz metin";
console.log(text.howMany("istediğiniz şey")); // Örnek çıktı: 4

whatsIn

WhatsIn fonksiyonu bir metinde istediğiniz iki işaret veya herhangi iki şey arasındaki metinleri bulmanızı sağlar.

const napi = require("noobingapi");

let text = "İstediğiniz metin";
console.log(text.whatsIn("Baş", "Son")); // Örnek çıktı: ['selam', 'naber']

randomEmoji

RandomEmoji fonksiyonu windows emojileri arasından istediğiniz sayıda rastgele emoji almanızı sağlar.

let { randomEmoji } = require("noobingapi")

setInterval(() => {
console.log(randomEmoji("istediğiniz emoji miktarı")) // Örnek çıktı: [ '👓', '⏬', '🌈', '👔', '🌗', '🎥' ]
}, 1000)

Fonksiyonların kullanımı ile alakalı anlamadığınız bir kısım olursa:

Package Sidebar

Install

npm i noobingapi

Weekly Downloads

12

Version

0.2.0

License

MIT

Unpacked Size

26.7 kB

Total Files

10

Last publish

Collaborators

  • noobing.js