Skip to content

Commit

Permalink
Luppux
Browse files Browse the repository at this point in the history
V1.0
  • Loading branch information
ertucuk committed Feb 10, 2024
1 parent 7d713d0 commit f9f8022
Show file tree
Hide file tree
Showing 284 changed files with 25,146 additions and 4 deletions.
Binary file added Global/Assets/AbyssinicaSIL-Regular.ttf
Binary file not shown.
Binary file added Global/Assets/DINNextLTPro-Bold.ttf
Binary file not shown.
Binary file added Global/Assets/Helvetica.ttf
Binary file not shown.
Binary file added Global/Assets/HelveticaBold.ttf
Binary file not shown.
Binary file added Global/Assets/KeepCalm-Medium.ttf
Binary file not shown.
Binary file added Global/Assets/LuckiestGuy-Regular.ttf
Binary file not shown.
Binary file added Global/Assets/Manrope-Bold.ttf
Binary file not shown.
Binary file added Global/Assets/Manrope-Regular.ttf
Binary file not shown.
Binary file added Global/Assets/MarlinGeo-Black.otf
Binary file not shown.
Binary file added Global/Assets/NotoEmoji-Regular.ttf
Binary file not shown.
Binary file added Global/Assets/NotoSansSymbols2-Regular.ttf
Binary file not shown.
Binary file added Global/Assets/Poppins-Bold.ttf
Binary file not shown.
Binary file added Global/Assets/Poppins-Regular.ttf
Binary file not shown.
Binary file added Global/Assets/Roboto.ttf
Binary file not shown.
Binary file added Global/Assets/Segoe UI Bold Italic.ttf
Binary file not shown.
Binary file added Global/Assets/Segoe UI Bold.ttf
Binary file not shown.
Binary file added Global/Assets/Segoe UI Italic.ttf
Binary file not shown.
Binary file added Global/Assets/Segoe UI.ttf
Binary file not shown.
Binary file added Global/Assets/SketchMatch.ttf
Binary file not shown.
Binary file added Global/Assets/Vante.otf
Binary file not shown.
Binary file added Global/Assets/theboldfont.ttf
Binary file not shown.
22 changes: 22 additions & 0 deletions Global/Examples/Command.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const { EmbedBuilder,PermissionsBitField, ActionRowBuilder, ButtonBuilder, ButtonStyle ,VoiceChannel,AttachmentBuilder,StringSelectMenuBuilder} = require("discord.js");
const kanal = require("../../../../../../Global/Settings/AyarName");
const ertum = require("../../../../../../Global/Settings/Setup.json");
const ertucuk = require("../../../../../../Global/Settings/System");

module.exports = {
name: "",
description: "",
category: "NONE",
cooldown: 0,
command: {
enabled: true,
aliases: [],
usage: "",
},


onLoad: function (client) { },

onCommand: async function (client, message, args, ertuembed) { },

};
5 changes: 5 additions & 0 deletions Global/Examples/Event.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

module.exports = async () => {

}

75 changes: 75 additions & 0 deletions Global/Helpers/Dates.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
const moment = require('moment');
require("moment-duration-format");
require("moment-timezone");

let allmonths = {
"01": "Ocak",
"02": "Şubat",
"03": "Mart",
"04": "Nisan",
"05": "Mayıs",
"06": "Haziran",
"07": "Temmuz",
"08": "Ağustos",
"09": "Eylül",
"10": "Ekim",
"11": "Kasım",
"12": "Aralık",
};

global.months = allmonths;

const tarihsel = global.tarihsel = function(tarih) {
let tarihci = moment(tarih).tz("Europe/Istanbul").format("DD") + " " + global.months[moment(tarih).tz("Europe/Istanbul").format("MM")] + " " + moment(tarih).tz("Europe/Istanbul").format("YYYY HH:mm")
return tarihci;
};

const kalanzaman = global.kalanzaman = function(tarih) {
return moment.duration((tarih - Date.now())).format('H [Saat,] m [Dakika,] s [Saniye]');
}

const defaultTag = global.defaultTag = function(date) {
return `<t:${Number(String(date).substring(0, 10))}>`;
}

const shortTag = global.shortTag = function(date) {
return `<t:${Number(String(date).substring(0, 10))}:D>`;
}

const longTag = global.longTag = function(date) {
return `<t:${Number(String(date).substring(0, 10))}:F>`;
}

const relativeTag = global.relativeTag = function(date) {
return `<t:${Number(String(date).substring(0, 10))}:R>`;
}

const tarihhesapla = global.tarihHesapla = (date) => {
const startedAt = Date.parse(date);
var msecs = Math.abs(new Date() - startedAt);
const years = Math.floor(msecs / (1000 * 60 * 60 * 24 * 365));
msecs -= years * 1000 * 60 * 60 * 24 * 365;
const months = Math.floor(msecs / (1000 * 60 * 60 * 24 * 30));
msecs -= months * 1000 * 60 * 60 * 24 * 30;
const weeks = Math.floor(msecs / (1000 * 60 * 60 * 24 * 7));
msecs -= weeks * 1000 * 60 * 60 * 24 * 7;
const days = Math.floor(msecs / (1000 * 60 * 60 * 24));
msecs -= days * 1000 * 60 * 60 * 24;
const hours = Math.floor(msecs / (1000 * 60 * 60));
msecs -= hours * 1000 * 60 * 60;
const mins = Math.floor((msecs / (1000 * 60)));
msecs -= mins * 1000 * 60;
const secs = Math.floor(msecs / 1000);
msecs -= secs * 1000;
var string = "";
if (years > 0) string += `${years} yıl`
else if (months > 0) string += `${months} ay ${weeks > 0 ? weeks+" hafta" : ""}`
else if (weeks > 0) string += `${weeks} hafta ${days > 0 ? days+" gün" : ""}`
else if (days > 0) string += `${days} gün ${hours > 0 ? hours+" saat" : ""}`
else if (hours > 0) string += `${hours} saat ${mins > 0 ? mins+" dakika" : ""}`
else if (mins > 0) string += `${mins} dakika ${secs > 0 ? secs+" saniye" : ""}`
else if (secs > 0) string += `${secs} saniye`
else string += `saniyeler`;
string = string.trim();
return `${string} önce`;
};
19 changes: 19 additions & 0 deletions Global/Helpers/Extenders/Events.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
class Event {
constructor(client, {
name = null,
enabled = true
}){
this.client = client;
this.name = name;
this.enabled = enabled;
if(!this.name) throw new Error('Event ismi belirlenmediği için bu event atlandı.');
}

on() {
if(!this.enabled) return;
this.client.on(this.name, this.onLoad);
}

}

module.exports = { Event };
57 changes: 57 additions & 0 deletions Global/Helpers/Extenders/Prototypes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
const { Client, Collection, GuildMember, Guild, MessageEmbed, TextChannel } = require('discord.js');

exports.toFancyNum = function (num) {
let parts = num.toString().split('.');
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return parts.join('.');
};

exports.toShortNum = function (num) {
if (num >= 1000000) return Math.trunc(num / 1000000) + 'M';
else if (num >= 1000) return Math.trunc(num / 1000) + 'K';
else return num;
};

Guild.prototype.findRole = function(content) {
let Role = this.roles.cache.find(r => r.name === content) || this.roles.cache.find(r => r.id === content)
if(!Role) return logger.error(`${content} rolünü ${this.name} sunucusun da aradım fakat bulamadım.`);
return Role;
}

Guild.prototype.findChannel = function(content) {
let Channel = this.channels.cache.find(k => k.name === content) || this.channels.cache.find(k => k.id === content) || this.client.channels.cache.find(e => e.id === content) || this.client.channels.cache.find(e => e.name === content)
if(!Channel) return logger.error(`${content} kanalını ${this.name} sunucusun da aradım fakat bulamadım.`);
return Channel;
}

TextChannel.prototype.wsend = async function (message) {
const hooks = await this.fetchWebhooks();
let webhook = hooks.find(a => a.name === Client.user.username && a.owner.id === Client.user.id);
if (webhook) return webhook.send(message);
webhook = await this.createWebhook(Client.user.username, { avatar: Client.user.avatarURL() });
return webhook.send(message);
};

Array.prototype.listele = function () {
return this.length > 1 ? this.slice(0, -1).map((x) => `${x}`).join(" ") + " ve " + this.map((x) => `${x}`).slice(-1) : this.map((x) => `${x}`).join("");
};

Array.prototype.prefixle = function () {
return this.length > 1 ? this.slice(0, -1).map((x) => `${x}`).join(" | ") + " ve " + this.map((x) => `${x}`).slice(-1) : this.map((x) => `${x}`).join("");
};


Array.prototype.last = function () {
return this[this.length - 1];
};

Collection.prototype.array = function () {
return [...this.values()]
};

Promise.prototype.delete = function (time) {
if (this) this.then(message => {
if (message.deletable)
setTimeout(() => message.delete(), time * 1000)
});
};
69 changes: 69 additions & 0 deletions Global/Helpers/Logger.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
const { EmbedBuilder, WebhookClient } = require("discord.js");
const { green, blue, yellow, red } = require("chalk");
const { tarihsel } = require("./Dates");
const client = global.bot;
const ertucuk = require(`../Settings/System`)

const webhookLogger = ertucuk.WebhookURL ? new WebhookClient({ url: ertucuk.WebhookURL }) : undefined;

let allmonths = {
"01": "Ocak",
"02": "Şubat",
"03": "Mart",
"04": "Nisan",
"05": "Mayıs",
"06": "Haziran",
"07": "Temmuz",
"08": "Ağustos",
"09": "Eylül",
"10": "Ekim",
"11": "Kasım",
"12": "Aralık",
};

function sendWebhook(content, err) {
if (!content && !err) return;
const errString = err?.stack || err;

const embed = new EmbedBuilder()

if (errString)
embed.setDescription(
"```js\n" + (errString.length > 4096 ? `${errString.substr(0, 4000)}...` : errString) + "\n```"
);

embed.addFields({ name: "Description", value: content || err?.message || "NA" });
webhookLogger.send({ username: "YARRAK", embeds: [embed] }).catch((ex) => {});

}

module.exports = class Logger {
static success(content) {
console.log(`${blue(`${content}`)}`);
}

static log(content) {
console.log(`${blue(`${content}`)}`);
}

static warn(content) {
console.log(`${yellow("⚠")} ${blue(`${content}`)}`);
}

static error(content, ex) {
if (ex) {
console.log(`${red("✗")} ${blue(`${content}: ${ex?.message}`)}`);
} else {
console.log(`${red("✗")} ${blue(`${content}`)}`)
}
if (webhookLogger) sendWebhook(content, ex);
}

static debug(content) {
console.log(` ${green("✓")} ${blue(`${content}`)}`);
}

static botReady(content) {
console.log(` ${green("✓")} ${blue(`(${content}) sahaya iniş yaptı`)}`);
}
};
25 changes: 25 additions & 0 deletions Global/Helpers/Numbers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const { Zero, One, Two, Three, Four, Five, Six, Seven, Eight, Nine } = require("../Settings/Emojis.json");

// const rakam = global.rakam = function(sayi) {
// var basamakbir = sayi.toString().replace(/ /g, " ");
// var basamakiki = basamakbir.match(/([0-9])/g);
// basamakbir = basamakbir.replace(/([a-zA-Z])/g, "Belirlenemiyor").toLowerCase();
// if (basamakiki) {
// basamakbir = basamakbir.replace(/([0-9])/g, d => {
// return {
// "0": system.Moderation.EmojiNumbers ? Zero : '0',
// "1": system.Moderation.EmojiNumbers ? One : '1',
// "2": system.Moderation.EmojiNumbers ? Two : '2',
// "3": system.Moderation.EmojiNumbers ? Three : '3',
// "4": system.Moderation.EmojiNumbers ? Four : '4',
// "5": system.Moderation.EmojiNumbers ? Five : '5',
// "6": system.Moderation.EmojiNumbers ? Six : '6',
// "7": system.Moderation.EmojiNumbers ? Seven : '7',
// "8": system.Moderation.EmojiNumbers ? Eight : '8',
// "9": system.Moderation.EmojiNumbers ? Nine : '9',
// }[d];
// });
// }
// return system.Moderation.EmojiNumbers ? basamakbir : `**${basamakbir}**`;
// }

16 changes: 16 additions & 0 deletions Global/Helpers/Replys.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

module.exports = {
unauthorized: `Bu komutu kullanabilmek için herhangi bir yetkiye sahip değilsin.`,
member: `Belirtilen kullanıcı bot olduğu için işlem iptal edildi.`,
time: `İşleme devam edebilmeniz için bir süre belirtiniz`,
reason: `İşleme devam edebilmeniz için bir sebep belirtiniz.`,
insufficient: `İşlem yapmaya çalıştığın kulanıcı senle aynı yetkide veya senden üstün.`,
untouchable: `Bot'un erişimi olmadığı için işleme devam edilemiyor.`,
itself: `Kendi üzerine işlem uygulayamazsın.`,
notfound: `Belirttiğiniz ID sistem içerisinde bulunamadı.`,
membernotfound: `Belirtilen kullanıcı sunucu içerisinde veya sistem içerisinde bulunamadı.`,
nosettings: `Belirtilen komutun ayarları yapılmadığından dolayı işlem iptal edildi. Sistem yöneticisine başvurun!`,
nosetup: `Lütfen kullanılan komut ayarlarını tamamlayın. \` .setup \` komutundan kurulumunu yapınız.`,
datanotfound: `Belirtilen kullanıcının geçmişi bulunamadı.`,
sensikitutmussun: `Kullanım hakkınız dolduğu için işleminiz iptal edildi.`
}
36 changes: 36 additions & 0 deletions Global/Helpers/Utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
const { readdirSync, lstatSync } = require("fs");
const { join, extname } = require("path");
module.exports = class Utils {
static recursiveReadDirSync(dir, allowedExtensions = [".js"]) {
const filePaths = [];
const readCommands = (dir) => {
const files = readdirSync(join(process.cwd(), dir));
files.forEach((file) => {
const stat = lstatSync(join(process.cwd(), dir, file));
if (stat.isDirectory()) {
readCommands(join(dir, file));
} else {
const extension = extname(file);
if (!allowedExtensions.includes(extension)) return;
const filePath = join(process.cwd(), dir, file);
filePaths.push(filePath);
}
});
};
readCommands(dir);
return filePaths;
}

static timeformat(timeInSeconds) {
const days = Math.floor((timeInSeconds % 31536000) / 86400);
const hours = Math.floor((timeInSeconds % 86400) / 3600);
const minutes = Math.floor((timeInSeconds % 3600) / 60);
const seconds = Math.round(timeInSeconds % 60);
return (
(days > 0 ? `${days} güm, ` : "") +
(hours > 0 ? `${hours} saat, ` : "") +
(minutes > 0 ? `${minutes} dakika, ` : "") +
(seconds > 0 ? `${seconds} saniye` : "")
);
}
};
Binary file added Global/Images/Background1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Global/Images/Background2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Global/Images/Background3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Global/Images/Background4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Global/Images/Background5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Global/Images/Spotify.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions Global/Models/CameraStat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const { Schema, model } = require("mongoose");

const CameraStat = Schema({
guildID:String,
userID:String,
TotalStat: { type: Number, default: 0 },
DailyStat: { type: Number, default: 0 },
WeeklyStat: { type: Number, default: 0 },
MonthlyStat: { type: Number, default: 0 },
});

module.exports = model("CameraStat", CameraStat);
10 changes: 10 additions & 0 deletions Global/Models/CameraUserChannel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const { Schema, model } = require("mongoose");

const CameraUserChannel = Schema({
guildID: String,
userID: String,
ChannelID: String,
ChannelData: Number,
});

module.exports = model("CameraUserChannel", CameraUserChannel);
8 changes: 8 additions & 0 deletions Global/Models/JoinedAt.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const { Schema, model } = require("mongoose");

const VoiceJoinedAt = Schema({
userID: String,
Date: Number,
});

module.exports = model("VoiceJoinedAt", VoiceJoinedAt);
8 changes: 8 additions & 0 deletions Global/Models/JoinedAt2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const { Schema, model } = require("mongoose");

const StreamerJoinedAt = Schema({
userID: String,
Date: Number,
});

module.exports = model("StreamerJoinedAt", StreamerJoinedAt);
8 changes: 8 additions & 0 deletions Global/Models/JoinedAt3.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const { Schema, model } = require("mongoose");

const CameraJoinedAt = Schema({
userID: String,
Date: Number,
});

module.exports = model("CameraJoinedAt", CameraJoinedAt);
Loading

0 comments on commit f9f8022

Please sign in to comment.