Giter Site home page Giter Site logo

Comments (7)

aetheryx avatar aetheryx commented on July 30, 2024 1

to confirm, a fork of Eris' API for Powercord is in the works, and it will be undetectable and API-compliant

from powercord.

katlyn avatar katlyn commented on July 30, 2024

for notifications (not all messages) this can be used (thanks aeth)

const { getModule } = require('powercord/webpack');
const mdl = getModule(['makeTextChatNotification']);
mdl.makeTextChatNotification = (_makeTextChatNotification => (...args) => {
  console.log('gord code goes here');
  return _makeTextChatNotification(...args);
})(mdl.makeTextChatNotification);

from powercord.

cyyynthia avatar cyyynthia commented on July 30, 2024

For Gateway messages you can just get them by doing powercord.on('webSocketMessage:gateway.discord.gg', console.log)
tho it's raw stuff so it needs to be decoded, and there is probably a way to inject somewhere to get them already decoded (or you'll have to decode them by yourself). I think aeth said something about a """""bot client"""" that would just be decoding that and re-mapping a client lib like Eris to use Discord internal functions

For other events it's mostly patching the right method, and you're good (see comment above)

from powercord.

cyyynthia avatar cyyynthia commented on July 30, 2024

So the issue 69 will be closed when the fork of Eris is live I guess

from powercord.

thetakodev avatar thetakodev commented on July 30, 2024

@Bowser65 haha sex number

from powercord.

cyyynthia avatar cyyynthia commented on July 30, 2024

Since it is possible to listen for gateway events through
require('powercord/webpack').getModule([ 'dispatch', '_isDispatching' ], false).subscribe('EVENT_NAME', handler), can we close this issue?

from powercord.

cyyynthia avatar cyyynthia commented on July 30, 2024

I'll consider we can safely close this, as you can easily subscribe to events within plugins through Discord's internals and if the point is to have a plugin forwarding events to an external source this'd belong to the plugins suggestion repo

from powercord.

Related Issues (20)

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.