Git Product home page Git Product logo

custom-game-status-in-discord-with-python's Introduction

A guide on how to customize your game status in Discord.

Select the language you want

EN English UA Ukrainian

Step 1:

Create an application on the website discord.com/developers

img


Step 2:

Add images

img


Step 3:

Download the library pypresence

pip install pypresence


Step 4:

Get client id

img


Step 5:

Write this code and replace the values with your own values:

from pypresence import Presence
from time import time

presence = Presence("")  # client id here

buttons = [  # maximum 2 buttons
    {
        "label": "Button 1",  # button name
        "url": "https://none.com/"  # button url
    },
    {
        "label": "Button 2",  # button name
        "url": "https://none.com/"  # button url
    }
]


presence.connect()  # connect
presence.update(  # the first line in the status is the application name
    state="status",  # third line in status
    details="details",  # second line in the status
    start=time(),  # start timer
    buttons=buttons,  # button connection
    large_image="img_1",  # large image, enter its name in large_image from step 2
    small_image="img_2",  # small image, enter its name in small_image from step 2
    large_text="large_image_text",  # text when hovering over a large image
    small_text="small_image_text"  # text when hovering over a small image
)

input()

Step 6:

Launch it, my results:

img


Use:

python 3.9 pypresence 4.3.0

custom-game-status-in-discord-with-python's People

Contributors

tsyhanok-ivan 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.