Yeni oto rol! (embedli)

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Onaylı Üye
Katılım
11 Kas 2016
Mesajlar
74
Tepki puanı
9
Ödüller
7
Yaş
21
9 HİZMET YILI
Gerekli modüller: fs ve quick.db
Ek olarak: ayarlar/otorol.json adında bir dosya açınız.

Komutlar oto rol:
Bağlantıları görmek için lütfen Giriş Yap

Komutlar oto rol sıfırla:
Bağlantıları görmek için lütfen Giriş Yap

Main dosyanıza:
Bağlantıları görmek için lütfen Giriş Yap


Yaygın olan oto rollerden tek farkı maininde bir kaç değişiklik var, yayımlanan oto rollerde ... id hatasını sürekli loga atıyor, şuanlık bir sorun yok kodlarda, sorun olursa yorum olarak belirtiniz.

Discord: Sarp Palaur#0164

Konu eki, sahibi olduğum atom botu incelemek isterseniz eğer: Konu
 
Son düzenleme:
Onaylı Üye
Katılım
11 Kas 2016
Mesajlar
74
Tepki puanı
9
Ödüller
7
Yaş
21
9 HİZMET YILI
Ultra Üye
Katılım
16 Eyl 2018
Mesajlar
1,810
Çözümler
2
Tepki puanı
901
Ödüller
6
7 HİZMET YILI
Kod'a tıkladığımda bir şey olmuyor. Ya da bende öyle.
Biraz Sabredersen Açılacak
Kod:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
const db = require("quick.db");
const fs = require("fs");
const Discord = require("discord.js");
var otorol = JSON.parse(fs.readFileSync("./ayarlar/otorol.json", "utf8")
);

exports.run = async (bot, message, args) => {
  let prefix = (await db.fetch(`prefix_${message.guild.id}`)) || "a!";
  if (!message.member.hasPermission("BAN_MEMBERS")) {
    const embed = new Discord.RichEmbed()
      .setDescription(`Ne yazık ki bu komutu kullanmaya yetkin yok.`)
      .setColor("BLACK");

    message.channel.send(embed);
    return;
  }

  let kvr = JSON.parse(fs.readFileSync("./ayarlar/otorol.json", "utf8"));
  var mentionedChannel = message.mentions.channels.first();
  if (!mentionedChannel && args[0] !== "sıfırla") {
    const embed = new Discord.RichEmbed()
      .setDescription(`Hatalı kullanım! örnek: ${prefix}otorol <@Rol> <#Kanal>`)
      .setColor("BLACK")
      .setTimestamp()
      .setFooter(bot.user.username, bot.user.avatarURL);
    message.channel.send(embed);
    return;
  }
  if (message.guild.member(message.author.id).hasPermission(0x8)) {
    var mentionedRole = message.mentions.roles.first();
    if (!mentionedRole) {
      const embed = new Discord.RichEmbed()
        .setDescription(`Lütfen rol etiketleyiniz`)
        .setColor("BLACK")
        .setTimestamp()
        .setFooter(bot.user.username, bot.user.avatarURL);
      message.channel.send(embed);
      return;
    }

    if (!kvr[message.guild.id]) {
      kvr[message.guild.id] = {
        role: mentionedRole.id,
        kanal: mentionedChannel.id
      };
    }

    kvr[message.guild.id].role = mentionedRole.id;
    kvr[message.guild.id].kanal = mentionedChannel.id;

    fs.writeFile("./ayarlar/otorol.json", JSON.stringify(profil), err => {
      console.log(err);
    });

    const embed = new Discord.RichEmbed()
      .setDescription(
        `Otorol başarıyla ${mentionedRole} olarak ayarlandı! Otorol kanalı ise, ${mentionedChannel} olarak ayarlandı.`
      )
      .setColor("BLACK")
      .setTimestamp()
      .setFooter(bot.user.username, bot.user.avatarURL);
    message.channel.send(embed);
  }
};

exports.conf = {
  enabled: true,
  guildOnly: true,
  aliases: [],
  permLevel: 2,
  kategori: "sunucu"
};

exports.help = {
  name: "otorol",
  description: "Otorolu ayarlarsınız.",
  usage: "otorol"
};
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Üst