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

feat: Mod Actions Panel #136

Merged
merged 13 commits into from
Sep 24, 2024
Merged

feat: Mod Actions Panel #136

merged 13 commits into from
Sep 24, 2024

Conversation

dev-737
Copy link
Member

@dev-737 dev-737 commented Sep 15, 2024

Moderator Actions Context Menu

Display a panel for moderator actions context menu command, including:

  • Delete Message button.
  • Blacklist User/Server
  • Remove all reactions
  • Ban (interchat staff only)
  • View Infractions
  • Message Info Button (too hard)
  • Remove reactions (do this via dashboard plskthx)

This can be made available as a button attached to reports, message info ctx menu, and as a separate "Moderator Actions" ctx menu command.

Improved Message Info/Report Context Menu for Moderation

  • There should be a drop-down that seperates the basic info and the advanced info (if you're a hub moderator): When you select the advanced info, it has buttons to blacklist the user (who sent the message) and the server (where the message is from).

  • Instead of the usual info in the embeds, replace it with information of the user's "Recent Offenses" so that we can make sure if we should lengthen their next blacklist duration.

  • Suggested by: whos.eth4n

Resolves #124
Resolves #111

@dev-737 dev-737 added feature New feature or request commands Improvements or bug fixes related to InterChat's Commands networks Related to a hub's Global Chat aka network labels Sep 15, 2024
@dev-737 dev-737 added this to the v4.0.0 milestone Sep 15, 2024
@dev-737 dev-737 self-assigned this Sep 15, 2024
Copy link

deepsource-io bot commented Sep 15, 2024

Here's the code health analysis summary for commits 869e8ad..6748907. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

Change in average Code Health of affected files: +0.39 (9.49 -> 9.88)

  • Improving Code Health: 2 findings(s) ✅

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

Change in average Code Health of affected files: +0.22 (9.41 -> 9.63)

  • Improving Code Health: 3 findings(s) ✅

View detailed results in CodeScene

src/commands/context-menu/deleteMsg.ts Show resolved Hide resolved
src/utils/RandomComponents.ts Outdated Show resolved Hide resolved
Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

Change in average Code Health of affected files: +0.22 (9.41 -> 9.63)

  • Improving Code Health: 3 findings(s) ✅

View detailed results in CodeScene

@dev-737 dev-737 changed the title rename apps > blacklist to mod actions panel feat: Mod Actions Panel Sep 21, 2024
Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

Change in average Code Health of affected files: +0.04 (9.42 -> 9.47)

  • Declining Code Health: 2 findings(s) 🚩
  • Improving Code Health: 3 findings(s) ✅

View detailed results in CodeScene

@@ -144,4 +144,32 @@ export default class UserDbManager extends BaseBlacklistManager<userData> {

await opts.target.send({ embeds: [embed] }).catch(() => null);
}

Choose a reason for hiding this comment

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

❌ New issue: Primitive Obsession
In this module, 47.8% of all function arguments are primitive types, threshold = 30.0%

Suppress

@@ -144,4 +144,32 @@ export default class UserDbManager extends BaseBlacklistManager<userData> {

await opts.target.send({ embeds: [embed] }).catch(() => null);
}

Choose a reason for hiding this comment

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

❌ New issue: String Heavy Function Arguments
In this module, 47.8% of all arguments to its 13 functions are strings. The threshold for string arguments is 39.0%

Suppress

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

Change in average Code Health of affected files: +0.04 (9.42 -> 9.47)

  • Declining Code Health: 2 findings(s) 🚩
  • Improving Code Health: 3 findings(s) ✅

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

Change in average Code Health of affected files: +0.12 (9.50 -> 9.61)

  • Declining Code Health: 2 findings(s) 🚩
  • Improving Code Health: 4 findings(s) ✅

View detailed results in CodeScene

src/commands/context-menu/modActions.ts Show resolved Hide resolved
src/commands/slash/Main/hub/moderator.ts Show resolved Hide resolved
Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

Change in average Code Health of affected files: +0.12 (9.50 -> 9.62)

  • Declining Code Health: 2 findings(s) 🚩
  • Improving Code Health: 4 findings(s) ✅

View detailed results in CodeScene

@dev-737 dev-737 marked this pull request as ready for review September 24, 2024 14:07
@dev-737 dev-737 merged commit 17c4f1d into main Sep 24, 2024
3 of 4 checks passed
Copy link

sonarcloud bot commented Sep 24, 2024

@dev-737 dev-737 deleted the mod_actions branch September 24, 2024 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
commands Improvements or bug fixes related to InterChat's Commands feature New feature or request networks Related to a hub's Global Chat aka network
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Moderator Actions Panel Message Actions Command
1 participant