Giter VIP home page Giter VIP logo

mydiscord's Introduction

MyDiscord

This project isn't maintained, and hasn't been in a while. If you want, you can submit a PR and I'll review it, but I'm not making any changes myself.

Simple Python script that adds CSS hot-reload and Custom JavaScript support to Discord.

psst: there's a rewrite effort going on over here.

Credit where it's due

I quite liked leovoel's BeautifulDiscord's lightweight implementation of stylesheets in Discord, so I modified leovoel's script to also include JavaScript support.

Because this is a fork, most of the code (and the usage section) was written by leovoel, so go show him some love.

Disclaimer

I am not responsible for anything stupid you do with this. Use common sense.

Usage

  • Install python 3+

  • Open the command line - (cmd.exe AS ADMIN on Windows, Terminal on macOS/*nix)

  • Open Discord

  • Run the following commands:

python3 -m pip install -U https://github.com/justinoboyle/MyDiscord/archive/master.zip
mydiscord

(If that fails, then run this):

python -m pip install -U https://github.com/justinoboyle/MyDiscord/archive/master.zip
mydiscord
  • Have fun!

More detailed command line usage

Just invoke the script when installed. If you don't pass the --css and --js flags, the resources will be placed wherever the Discord app resources are found.

NOTE: Discord has to be running for this to work in first place. The script works by scanning the active processes and looking for the Discord ones.

(yes, this also means you can fool the program into trying to apply this to some random program named Discord)

$ mydiscord --css ~/discord.css --js ~/discord.js
Found Discord Canary under /Applications/Discord Canary.app/Contents/MacOS

Done!

You may now edit your CSS in /Users/justin/discord.css,
which will be reloaded whenever it's saved.
You can also edit your JavaScript in /Users/justin/discord.js
,but you must reload (CMD/CTRL + R) Discord to re-run it

*Do not insert code that you do not understand, as it could steal your account!*

Relaunching Discord now...
$

Pass the --revert flag to remove the extracted app.asar (it's the resources/app folder) and rename original_app.asar to app.asar. You can also do this manually if your Discord install gets screwed up.

$ mydiscord --revert
Found Discord Canary under /Applications/Discord Canary.app/Contents/MacOS

Reverted changes, no more CSS hot-reload :(
$

You can also run it as a package - i.e. python3 -m mydiscord - if somehow you cannot install it as a script that you can run from anywhere.

Requirements

Normally, pip should install any required dependencies.

Themes

Some people have started a theming community for the original BeautifulDiscord over here: https://github.com/beautiful-discord-community/resources/

They have a Discord server as well: https://discord.gg/EDwd5wr

Plugins

We started a scripting community for MyDiscord over here: https://github.com/justinoboyle/mydiscord-resources

We have a small chat on the BeautifulDiscord's server: https://discord.gg/rN3WMWn

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.