Skip to content

Commit 405e8ee

Browse files
committed
Merge branch 'dcjs-v13' of https://github.com/TheArmagan/basit-altyapi into dcjs-v13
2 parents 39f212b + ac48b44 commit 405e8ee

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
lines changed

config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module.exports = new (require("./types/Config"))({
2929
// Kullanıcı hatalarındaki uyarı mesajları/olayları.
3030
userErrors: {
3131
// Arka arkaya interaksiyon kullanma limiti aşıldığında.
32-
coolDown(interaction, uInteraction, coolDown, other, type) {
32+
coolDown(interaction, uInteraction, coolDown, type, other) {
3333
switch (type) {
3434
case "user": {
3535
interaction.reply({ ephemeral: true, content: `Bu interaksiyonu sen tekrardan ${(coolDown / 1000).toFixed(2)} saniye içerisinde kullanabilirsin.` })

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ client.on("interactionCreate", async (interaction) => {
316316
let key = converter[k];
317317
let keyCooldown = uInter.coolDowns.get(key);
318318
if (now < keyCooldown) {
319-
config.userErrors.coolDown(interaction, uInter, keyCooldown - now, other, k);
319+
config.userErrors.coolDown(interaction, uInter, keyCooldown - now, k, other);
320320
return;
321321
}
322322
}

interactions/-ornekKomut.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@ module.exports = new Underline.SlashCommand({
3131
disabled: false,
3232
// Arka arkaya varsayılan interaksiyon kullanma süre limiti.
3333
// Opsiyonel. Varsayılan olarak 0.
34-
// Bu değer other.setCoolDown(1000) fonksiyonu olarak işlem başına değiştirilebilir.
35-
coolDown: 1000,
34+
// Bu değer other.setCoolDown(1000, "user") fonksiyonu olarak işlem başına değiştirilebilir.
35+
coolDown: {
36+
amount: 1000,
37+
type: "user"
38+
},
3639
// İstediğiniz interaksiyon ile alakalı diğer bütün dataları burada tutabilirsiniz.
3740
// Opsiyonel. Varsayılan olarak {}.
3841
other: {},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@types/recursive-readdir": "^2.2.0"
1717
},
1818
"name": "armagan-basit-altyapi",
19-
"version": "1.9",
19+
"version": "1.9.3",
2020
"description": "Kullanımı basit ancak bir yandanda içinde birçek özellik barındıran discord bot altyapısı.",
2121
"main": "index.js",
2222
"repository": {

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Basit Altyapı (Versiyon 1.9) (v13.x)
1+
# Basit Altyapı (Versiyon 1.9.3) (v13.x)
22

33
Kullanımı basit ancak bir yandanda içinde birçek özellik barındıran discord bot altyapısı. Sık sık güncelleme alıyor. (Slash Commands)
44

types/Config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Config {
1212
/** @type {Discord.ClientOptions} */
1313
clientOptions = {};
1414

15-
/** @type {{coolDown(interaction: Discord.CommandInteraction, interaction: Interaction, timeout: number, other: {[key:string|number]: any}, type: "user" | "member" | "channel" | "guild" | "any"): void, disabled(interaction: Discord.CommandInteraction, interaction: Interaction, other: {[key:string|number]: any}): void, blocked(interaction: Discord.CommandInteraction, interaction: Interaction, other: {[key:string|number]: any}): void, botPermsRequired(interaction: Discord.CommandInteraction, interaction: Interaction, perms: string[], other: {setCoolDown(duration:number): void, [key:string|number]: any}): void, userPermsRequired(interaction: Discord.CommandInteraction, interaction: Interaction, perms: string[], other: {setCoolDown(duration:number): void, [key:string|number]: any}): void, developerOnly(interaction: Discord.CommandInteraction, interaction: Interaction, other: {[key:string|number]: any}): void, guildOnly(interaction: Discord.CommandInteraction, interaction: Interaction, other: {[key:string|number]: any}): void}} */
15+
/** @type {{coolDown(interaction: Discord.CommandInteraction, interaction: Interaction, timeout: number, type: "user" | "member" | "channel" | "guild" | "any", other: {[key:string|number]: any}): void, disabled(interaction: Discord.CommandInteraction, interaction: Interaction, other: {[key:string|number]: any}): void, blocked(interaction: Discord.CommandInteraction, interaction: Interaction, other: {[key:string|number]: any}): void, botPermsRequired(interaction: Discord.CommandInteraction, interaction: Interaction, perms: string[], other: {setCoolDown(duration:number): void, [key:string|number]: any}): void, userPermsRequired(interaction: Discord.CommandInteraction, interaction: Interaction, perms: string[], other: {setCoolDown(duration:number): void, [key:string|number]: any}): void, developerOnly(interaction: Discord.CommandInteraction, interaction: Interaction, other: {[key:string|number]: any}): void, guildOnly(interaction: Discord.CommandInteraction, interaction: Interaction, other: {[key:string|number]: any}): void}} */
1616
userErrors = {};
1717

1818
/** @type {{[key: string|number]: any}} */

0 commit comments

Comments
 (0)