Skip to content

Conversation

vishnyanetchereshnya
Copy link
Contributor

PermissionsViewer:

  • added context menu icons for Copy User/Role ID and View Server As Role
  • added contextMenuAPIArguments prop to context menus to use in ViewRaw & BetterRoleContext plugins
  • assign modalKey to ViewPermissions modal to close it on Edit Role button click

ViewRaw:

  • added support for PermissionsViewer plugin to open role/user raw

BetterRoleContext:

  • added copy role name / role(plain and gradient in #000 #000 format) / role icon url
  • improved items display sorting: default Copy User/Role ID button > copy buttons from plugin > View Raw
  • added support for PermissionsViewer plugin to copy some properties
  • maked patch appliable for list of guild roles
Discord_sDGzVCGDi3 Discord_zVj2isgV4k Discord_ZfWt3yuUdY

Keenelge and others added 4 commits October 1, 2025 05:07
…s prop to context menus; assign modalKey to permissions modal
…display sorting; support for PermissionsViewer plugin; make patch appliable for list of guild roles
Comment on lines +87 to +101
const contextItems = copyableRoleProperties.reduce((acc, propertyInfo) => {
const propertyValue = propertyInfo.value(role);

if (propertyValue)
acc.push(
<Menu.MenuItem
id={propertyInfo.id}
label={propertyInfo.name}
icon={propertyInfo.icon}
action={() => copyToClipboard(propertyValue)}
/>
);

return acc;
}, [] as React.ReactElement[]);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use .map() and just return null to render nothing

contextMenus: {
"guild-context": MakeContextCallback("Guild"),
"guild-settings-role-context": MakeContextCallback("Role"),
"vc-permviewer-role-context-menu": MakeContextCallback("Role"),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't do this. just make the plugin export a function like buildContextMenuEntries() and import that


children = p.children;
} else {
if (!Vencord.Plugins.isPluginEnabled("BetterRoleContext")) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this for

const GuildSettingsActions = findByPropsLazy("open", "selectRole", "updateGuild");

const DeveloperMode = getUserSettingLazy("appearance", "developerMode")!;
const DeveloperMode = getUserSettingLazy("appearance", "developerMode");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undo this change

Suggested change
const DeveloperMode = getUserSettingLazy("appearance", "developerMode");
const DeveloperMode = getUserSettingLazy("appearance", "developerMode")!;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants