Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disnake support for IPC routes/ #87

Closed
Pandabweer opened this issue Oct 26, 2021 · 7 comments
Closed

Disnake support for IPC routes/ #87

Pandabweer opened this issue Oct 26, 2021 · 7 comments
Labels
feature request Request for a new feature

Comments

@Pandabweer
Copy link

Pandabweer commented Oct 26, 2021

Summary

This implementation will allow users to work with disnake to easily communicate with a webserver

What is the feature request for?

disnake.ext.commands

The Problem

This is based off a somewhat well used repo that got abandoned since discord.py has stopped.
Source: discord-ext-ipc

This implementation will allow the user to easily talk to the webserver and easily send information to it.
It's also much faster. I'm pretty active in the official python and whilists there are not many requests on how to make a dashboard, most people easily abandon the matter since it is not well documented and not so user friendly anymore.

I'd also like to see it as a way of being unique since not many forks have this.

Maby later even have something like an implemented Quart, Quart for discord if it really is a succes.

The Ideal Solution

This feature would make it easier for beginners to get started making Discord dashboards. This would also have routing for faster response times.

The Current Solution

This is currently not implemented inside any discord.py fork.

Additional Context

I'm also willing to make a PR or give a concept to the idea, i've not made that yet since i firstly want some more insight of wheter this will be added since it is not a small implementation. This also does not require any manipulation of the core code.

@Pandabweer Pandabweer added the feature request Request for a new feature label Oct 26, 2021
@Pandabweer Pandabweer changed the title Discord support for IPC routes/ Disnake support for IPC routes/ Oct 26, 2021
@thesadru
Copy link
Collaborator

May I know what the use of IPC is here? I'm pretty sure that since your bot object is a singleton you can easily pass it into your app. If you use a decent web framework it should be able to make it easy to access that object from anywhere and in turn completely eliminate the need for IPC.

@Pandabweer
Copy link
Author

May I know what the use of IPC is here? I'm pretty sure that since your bot object is a singleton you can easily pass it into your app. If you use a decent web framework it should be able to make it easy to access that object from anywhere and in turn completely eliminate the need for IPC.

Thanks for the quick reply!

The use, as stated inside the request is to interact with a webserver. While could do that, that wouldn't be the ideal situation since you need to authenticate it user by user and not use the bot object.

This would not only ratelimit the bot very quick since if it is a big bot user could make a lot of requests but it would also only be able to be used to show data, rather than it being a dashboard to interact with.

@Cryptox1337
Copy link

Cryptox1337 commented Oct 26, 2021

dont know if this works but there is a disnake ext ipc from Hunter

https://github.com/Disnake-Extensions/disnake-ext-ipc

@Pandabweer
Copy link
Author

If we would add it to Disnake it would be more encouraged to maintain and it would also be better documented. Altough, i know Hunter but if we implement that it would still need to be serverely debugged.

@thesadru
Copy link
Collaborator

thesadru commented Oct 26, 2021

As far as I know, all the library you linked does is abstract the underlying WebSockets. Doesn't seem like something we should have builtin. I have no problem supporting some sort of serialization using the pre-existing to_dict methods but just simple IPC is rarely needed. Since the disnake community has created extensions I don't think there's any use in putting it in the library itself.

@Pandabweer
Copy link
Author

As far as I know, all the library you linked does is abstract the underlying WebSockets. Doesn't seem like something we should have builtin. I have no problem supporting some sort of serialization using the pre-existing to_dict methods but just simple IPC is rarely needed. Since the disnake community has created extensions I don't think there's any use in putting it in a library itself.

Okay, well it was just a request but thanks for giving it a thought.

@jgayfer
Copy link
Contributor

jgayfer commented Oct 26, 2021

@Pandabweer For my IPC I've implemented my own with a message broker. I like the idea on theory of IPC, but even discord-ext-ipc was half baked at best. I don't think the lib should take care of IPC necessarily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests

4 participants