creesch / discordIRCd

A node.js script that allows you to connect to discord with your irc client.
Apache License 2.0
115 stars 21 forks source link

Give users IRC roles based on permissions. #61

Open Chew opened 3 years ago

Chew commented 3 years ago

For example, server owner should have the "Owner" (+q commonly, prefixed with ~). People with Administrator should have "Admin" (+a commonly, prefixed with &).

It is possible to get user permissions, I'm not entirely sure how. I don't know Discord.js, but it is possible in JDA, so unless they do hacky things, and d.js has a method, shouldn't be terribly difficult.

For Ops and below, it's a bit harder to figure out. Ops and Half-ops are basically indistinguishable, however ops can demote and promote half-ops. Both Half/Ops can manage channel and roles (below them, obviously) so maybe anyone with these permissions could be opped?

People with manage messages only could be half-op, I guess?

Voiced is just a general "notice" role, maybe this could be applied to anyone with a role?

This all relies on d.js and the discord api allowing us to get user's permissions, which I'm almost certain is possible without any roles or special permissions.