GithubHelp home page GithubHelp logo

dorpier's Introduction

DORPIER

Dorpier is a work-in-progress script-based, developer experience focused Discord client mod!

Development

You can clone and build a development version by running the following (assuming node.js and git are installed):

npm install -g pnpm rollup
git clone https://github.com/dorpier/dorpier
pnpm install
pnpm build

You can then run the contents of dist.js in the client.

Installation

As of now, we don't have an extension or injector ready.

If you want to use Dorpier right now, you have two options:

Inject manually

Note that CSP has to be disabled for this to work.

  1. Open Developer Tools on the webapp or desktop client.
  2. Input the following:
fetch(
  "https://raw.githubusercontent.com/dorpier/dists/master/dist.js"
)
  .then((response) => response.text())
  .then((data) => new Function(data)());
  1. Press enter, and you should see something like this:

Screenshot of Developer Tools

  1. If you do, congrats! Dorpier has been injected.

Use TamperMonkey/GreaseMonkey

Simply import from the URL https://raw.githubusercontent.com/dorpier/dists/master/dist.js.

Example

Run this script after injection.

client = new Client();

client.on("message_create", async function(d) {
    let message = d.message;
    if (message.content == "!ping" && message.author.id === client.user.id) {
        await client.sendEphemeralMessage(message.channel_id, "Pong!");
    }
});

client.connect();

Say ping in any channel in Discord, and it should respond with pong! If it does, then you did everything right; Dorpier is working! Now, you can get to making your own scripts.

dorpier's People

Contributors

13-05 avatar dolfies avatar l5050 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dorpier's Issues

Underlying Issues

  • findModule.byProps and findModule.byDisplayName aren't written correctly, could cause issues soon

  • {WONTFIX} Injecting the library before window.webpackChunkdiscord_app is loaded, as a userscript does, can cause issues the way a userscript works (running inside a sandbox) doesn't permit access of the window.webpackChunkdiscord_app, and bypasses that would generally work do not due to CSP

  • Docs aren't currently up to date and frankly aren't the best at the moment

  • Theme injection cannot be disabled

  • Lots of unnecessary logging

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.