Giter Site home page Giter Site logo

discord-rpc's Introduction

Özel Discord RPC

Bu dökümanı okuyarak, discord'da kendinize özel bir RPC durum ayarlayabilirsiniz!

Gerekenler

  • Discord'a Masaüstü üzerinden giriş yapmanız gerekmektedir. (Mobil veya WEB tarayıcı ile giriş yapmak sayılmaz.)
  • NodeJS (İhtiyaç duyulan modülleri içerisinde barındırıyor.)

Birinci Adım: Uygulamamızı Oluşturalım

  • Developer Portal'a giriş yapın ardından > "New Application" butonuna tıklayın.
  • Uygulama ismini belirtin. (Buraya girdiğiniz isim RPC Durumundaki isminiz olacaktır.)
  • Rich Presence > Art Assets sekmesine girin, bir resim yükleyin (isteğe bağlı) ve bu adı bir yere not edin (lazım olacak.)

İkinci Adım: Projemizi Oluşturalım

  • Yeni bir klasör oluşturun ve ardından bu klasörü kod editörünüz ile birlikte açın.
  • Projenizde bir komut terminali açın ve npm init -y komutunu girin. Böylelikle package.json dosyamızı oluşturduk. (Eğer hata alırsanız: npm init komutu ile kurmayı deneyin.)
  • Ardından discord-rpc modülünü kurun. (npm install discord-rpc)
  • Şimdi bir index.js dosyası oluşturun ve aşağıdakileri kodları ekleyin:
const RPC = require('discord-rpc');
const client = new RPC.Client({
    transport: 'ipc'
});

client.on('ready', () => {
    client.request('SET_ACTIVITY', {
        pid: process.pid,
        activity: {
            details: "Detaylar buraya",
            state: "State kısmı buraya",
            timestamps: {
                start: Date.now()
            },
            assets: {
                large_image: "", // "Developer Portal > Application > Rich Presence" kısmına eklediğiniz resimin anahtarını girin.
                large_text: "buyuk resim yazi" // "Rich Presence" alanına eklediğiniz resmin ismini belirtin.
            },
            buttons: [
                { label: "Buton 1", url: "https://github.com/iawoken" },
                { label: "Buton 2", url: "https://github.com/iawoken" }
            ]
        }
    });
});

client.login({
    clientId: '', // Uygulamanızın ID'sini buraya girin.
    clientSecret: '' // "Client Secret" anahtarını buraya girin.
});

Üçüncü Adım: RPC'yi Başlatma

  • Tüm dosyaları kaydedin, ardından node index.js komutunu komut satırına yazın.
  • Uygulama başlatıldığında profilinizde bu şahane durum gözükür olacaktır.

discord-rpc's People

Contributors

iawoken avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.