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

mydiscord's People

Contributors

justinoboyle avatar leovoel avatar cyyynthia avatar rapptz avatar

Stargazers

 avatar  avatar Sleepyy.Net avatar Bartłomiej Maryńczak avatar Austin Jackson avatar Peter Soboyejo avatar  avatar Bell avatar Sergey Ukolov avatar dying avatar Alexandre GV. avatar Derek Lee avatar Splatsune avatar Ian Macalinao avatar Wolke avatar lewisakura avatar Brandon Russell avatar  ✽ avatar inbtwn avatar Snazzah avatar Evan Jarrett avatar  avatar James S avatar  avatar George L. Albany avatar MAHF avatar SpaceGoat avatar Aaron avatar inoahdev avatar reid avatar

Watchers

James Cloos avatar George L. Albany avatar  avatar Bartłomiej Maryńczak avatar

Forkers

evanjarrett

mydiscord's Issues

Stacking things

Its not really much of an issue but more of a question...
can you stack css/js things?
(example having 2 css uh, things enabled at once)

Issue using mydiscord on MacOS on launch.

Hi I'm having a few issues with mydiscord on both MacOS and Linux (Debian 9) but I will come to the Linux issue later as I'm not on that system until later today.
(It may very well be related as the errors look quite alike if I remember corectly)

My current issue is on using python3 -m my discord (the only way it seems to run the command on MacOS) gives this error > log

I have had no issues on Windows but have run into this issue on MacOS and an issue similar to it on Debian and will post that one as soon as I can.

No such file or directory: './app/index.js'

upon opening mydiscord (i had python 3 way before this), it finds discordcanary as normal, goes to it's directory, and then spits this
Found DiscordCanary.exe under C:\Users\Metro\AppData\Local\DiscordCanary\app-0.0.211 Traceback (most recent call last): File "c:\users\metro\anaconda3\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\users\metro\anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\Metro\Anaconda3\Scripts\mydiscord.exe\__main__.py", line 9, in <module> File "c:\users\metro\anaconda3\lib\site-packages\mydiscord\app.py", line 275, in main with open('./app/index.js', 'r', encoding='utf-8') as f: FileNotFoundError: [Errno 2] No such file or directory: './app/index.js'

checking the file, it seems the most recent version of discord might have changed its filesystem?
index.js seems to now be located (relative to the code) in ./app/app_bootstrap/index.js

Mydiscord on macOS doesn't work

Title.
When running Mydiscord, it shows:

-bash: mydiscord: command not found

When doing ./mydiscord, it shows:

-bash: ./mydiscord: No such file or directory

MyDiscord message broke!

I have just tried to launch discord this morning, but when it loads the window goes dark and I can't click the text that appears so I can't use discord. Please, could you help me resolve this issue. This issue seems to be happening for both regular Discord and Canary.
discordcanary_2017-06-26_07-39-28

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.