Discord Botunuz İçin Radyo

Katılım
10 Kas 2019
Konular
225
Mesajlar
1,057
Çözümler
19
Tepki puanı
1,048
Puanları
8,710
Discord.js.png


Discord botunuz için radyo kodlaması!

Kullanım; {prefix}radyo radyoadı
(örn; a.radyo fenomenfm)


radyo.png


radyo-1.png


Komutlar bölümüne atın.​
Kod:
const Discord = require("discord.js");

exports.run = async (client, msg) => {

const radio = {
    "number1": "http://20723.live.streamtheworld.com/NUMBER1FM_SC?type=.mp3",
    "powerturk": "http://listen.powerapp.com.tr/powerturk/mpeg/icecast.audio?/;stream.nsv",
    "power": "http://listen.powerapp.com.tr/powerfm/mpeg/icecast.audio?/;stream.nsv",
    "metrofm": "http://17703.live.streamtheworld.com/METRO_FM_SC?type=.mp3",
    "fenomen": "http://listen.radyofenomen.com/fenomen/128/icecast.audio?/;stream.nsv",
    "oyunfm": "http://37.247.98.8/stream/30/",
    "fenomenfm": "http://fenomenoriental.listenfenomen.com/fenomenoriental/128/icecast.audio",
}
            if (!msg.guild.voiceConnection) {

                if (!msg.member.voiceChannel) return msg.channel.send('❎ | Lütfen bir **odaya gir!**')

            }
            let args = msg.content.split(" ").slice(1).join(" ").toLowerCase();

      if (!args) return msg.channel.send('❎ | Bir **radyo seçin:** **fenomenfm** | **powerturk** | **powerturk** | **metrofm** | **fenomen** | **oyunfm**')

        if(!radio[args]) return msg.channel.send('❎ | Lütfen yandaki Radyolardan **birini seç:** **number1** | **powerturk** | **fenomenfm** | **metrofm** | **fenomen** | **oyunfm**')

    msg.member.voiceChannel.join().then(connection => {

    require('http').get(radio[args], (res) => {

            connection.playStream(res);

     let embed = new Discord.RichEmbed()
        .setAuthor("Radyo Çalınıyor", `https://images-ext-1.discordapp.net/external/0O8M-0Q93aKVqx6tonQInp6W7QRDjlLkH1E6mHMaCeM/%3Fv%3D1/https/cdn.discordapp.com/emojis/475822981277286400.gif`)
        .setColor("#FFB900")
        .addField("RADYO", args)
        .setFooter(msg.author.username, msg.author.avatarURL);

     msg.channel.send(embed);

          });

  });

  client.on('message', msg => {
  if (msg.author.id === client.user.id) return
  if (msg.content.startsWith('a.kapat')) {
 
    if (!msg.member.voiceChannel) return msg.channel.sendEmbed(new Discord.RichEmbed()
    .setColor('#C34E4E')
    .setDescription('❎ | Sesli bir kanalda değilsin!'));
 
    msg.member.voiceChannel.leave()
 
}});

};


exports.conf = {
    enabled: true,
    guildOnly: false,
    aliases: ["radio"],
    permLevel: 0
};

exports.help = {
    name : "radyo",
    usage: "radyo",
    description: "radyo"
};
 
Son düzenleme:
Katılım
7 Eki 2020
Konular
0
Mesajlar
4
Tepki puanı
0
Puanları
0
ben bunu çalıştıramadım galiba bi sorun var
 
Katılım
15 Ara 2020
Konular
0
Mesajlar
1
Tepki puanı
0
Puanları
705
bi sorun var radyo komutu çalışıyor bişey çalmıyor
 
Katılım
20 Kas 2020
Konular
0
Mesajlar
1
Tepki puanı
0
Puanları
755
bi sorun var radyo komutu çalışıyor bişey çalmıyor
Discord.JS V12 için radyo kodu:

JavaScript:
const Discord = require("discord.js");
const bot = new Discord.Client();
exports.run = async (client, msg) => {

const radio = {
    "number1": "http://20723.live.streamtheworld.com/NUMBER1FM_SC?type=.mp3",
    "powerturk": "http://listen.powerapp.com.tr/powerturk/mpeg/icecast.audio?/;stream.nsv",
    "power": "http://listen.powerapp.com.tr/powerfm/mpeg/icecast.audio?/;stream.nsv",
    "metrofm": "http://17703.live.streamtheworld.com/METRO_FM_SC?type=.mp3",
    "fenomen": "http://listen.radyofenomen.com/fenomen/128/icecast.audio?/;stream.nsv",
    "civasradyo": "http://radyo1.radyo-dinle.tc:8170/stream",
    "slowtr": "https://radyo.dogannet.tv/slowturk",
    "joyturk": "http://17733.live.streamtheworld.com/JOY_TURK_SC",
    "ulkufm": "http://yayin.canliradyolive.com/ulku-fm/live/icecast.audio",
}
            if (!msg.guild.voiceConnection) {
                if (!msg.member.voice.channel) return msg.channel.send('❎ | Lütfen bir **odaya gir!**')
            }
            let args = msg.content.split(" ").slice(1).join(" ").toLowerCase();
      if (!args) return msg.channel.send('❎ | Bir **radyo seçin:** **civasradyo** | **powerturk** | **fenomen** | **metrofm** | **number1** | **joyturk** | **slowtr** | **ulkufm**')
        if(!radio[args]) return msg.channel.send('❎ | Lütfen yandaki Radyolardan **birini seç:** **civasradyo** | **number1** | **powerturk** | **fenomen** | **metrofm** | **joyturk** | **slowtr** | **ulkufm**')
    msg.member.voice.channel.join().then(connection => {
    require('http').get(radio[args], (res) => {
            connection.play(res);
     let embed = new Discord.MessageEmbed()
        .setAuthor("Radyo Çalınıyor", `https://cdn.discordapp.com/emojis/475822981277286400.gif`)
        .setColor("RANDOM")
        .addField("RADYO", args)
        .setFooter(msg.author.username, msg.author.avatarURL());
     msg.channel.send(embed);
          });
  });
  client.on('message', msg => {
  if (msg.author.id === client.user.id) return
  if (msg.content.startsWith('radyo-kapat')) {

    if (!msg.member.voice.channel) return msg.channel.send(new Discord.MessageEmbed()
    .setColor('#C34E4E')
    .setDescription('❎ | Sesli bir kanalda değilsin!'));

    msg.member.voice.channel.leave()
    return msg.channel.send(new Discord.MessageEmbed()
    .setColor('#C34E4E')
    .setDescription('❎ | Radyo kapatıldı!'));

}});
};
exports.conf = {
    enabled: true,
    guildOnly: false,
    aliases: ["radio"],
    permLevel: 0
};
exports.help = {
    name: "radyo",
    description: "Belirtilen radyo istasyonunu bulunduğu kanalda paylaşır.",
    usage: "radyo <name>"
};
 
Son düzenleme:
Katılım
3 May 2021
Konular
1
Mesajlar
9
Tepki puanı
0
Puanları
405
dostum bende sesliye giriyor birşey calmıyor ?
 
Katılım
22 May 2021
Konular
0
Mesajlar
1
Tepki puanı
0
Puanları
355
Discord.JS V12 için radyo kodu:

JavaScript:
const Discord = require("discord.js");
const bot = new Discord.Client();
exports.run = async (client, msg) => {

const radio = {
    "number1": "http://20723.live.streamtheworld.com/NUMBER1FM_SC?type=.mp3",
    "powerturk": "http://listen.powerapp.com.tr/powerturk/mpeg/icecast.audio?/;stream.nsv",
    "power": "http://listen.powerapp.com.tr/powerfm/mpeg/icecast.audio?/;stream.nsv",
    "metrofm": "http://17703.live.streamtheworld.com/METRO_FM_SC?type=.mp3",
    "fenomen": "http://listen.radyofenomen.com/fenomen/128/icecast.audio?/;stream.nsv",
    "civasradyo": "http://radyo1.radyo-dinle.tc:8170/stream",
    "slowtr": "https://radyo.dogannet.tv/slowturk",
    "joyturk": "http://17733.live.streamtheworld.com/JOY_TURK_SC",
    "ulkufm": "http://yayin.canliradyolive.com/ulku-fm/live/icecast.audio",
}
            if (!msg.guild.voiceConnection) {
                if (!msg.member.voice.channel) return msg.channel.send('❎ | Lütfen bir **odaya gir!**')
            }
            let args = msg.content.split(" ").slice(1).join(" ").toLowerCase();
      if (!args) return msg.channel.send('❎ | Bir **radyo seçin:** **civasradyo** | **powerturk** | **fenomen** | **metrofm** | **number1** | **joyturk** | **slowtr** | **ulkufm**')
        if(!radio[args]) return msg.channel.send('❎ | Lütfen yandaki Radyolardan **birini seç:** **civasradyo** | **number1** | **powerturk** | **fenomen** | **metrofm** | **joyturk** | **slowtr** | **ulkufm**')
    msg.member.voice.channel.join().then(connection => {
    require('http').get(radio[args], (res) => {
            connection.play(res);
     let embed = new Discord.MessageEmbed()
        .setAuthor("Radyo Çalınıyor", `https://cdn.discordapp.com/emojis/475822981277286400.gif`)
        .setColor("RANDOM")
        .addField("RADYO", args)
        .setFooter(msg.author.username, msg.author.avatarURL());
     msg.channel.send(embed);
          });
  });
  client.on('message', msg => {
  if (msg.author.id === client.user.id) return
  if (msg.content.startsWith('radyo-kapat')) {

    if (!msg.member.voice.channel) return msg.channel.send(new Discord.MessageEmbed()
    .setColor('#C34E4E')
    .setDescription('❎ | Sesli bir kanalda değilsin!'));

    msg.member.voice.channel.leave()
    return msg.channel.send(new Discord.MessageEmbed()
    .setColor('#C34E4E')
    .setDescription('❎ | Radyo kapatıldı!'));

}});
};
exports.conf = {
    enabled: true,
    guildOnly: false,
    aliases: ["radio"],
    permLevel: 0
};
exports.help = {
    name: "radyo",
    description: "Belirtilen radyo istasyonunu bulunduğu kanalda paylaşır.",
    usage: "radyo <name>"
};
Merhabalar botum ses kanalına bağlanıyor ama ses vermiyor,ne yapabilirim?