Skip to content

fix: ticket category on discord - #35

Merged
Nivmizz7 merged 1 commit into
mainfrom
fix-ticket
Aug 14, 2026
Merged

fix: ticket category on discord#35
Nivmizz7 merged 1 commit into
mainfrom
fix-ticket

Conversation

@Nivmizz7

@Nivmizz7 Nivmizz7 commented Aug 14, 2026

Copy link
Copy Markdown
Member

Summary by cubic

Fixes ticket creation to target the Discord category named "🆘 --- Support ---" instead of "ticket", so new tickets are filed under the correct category.

  • Changes the category lookup from "ticket" to "🆘 --- Support ---".
  • The code lowercases channel names but compares to a mixed-case literal; consider lowercasing the literal to "🆘 --- support ---" or removing the lowercase to avoid mismatches.
  • If the category is missing, existing fallback behavior remains; ensure the server has a category named "🆘 --- Support ---".

Written for commit 077f477. Summary will update on new commits.

Review in cubic

Signed-off-by: Niv <148060940+Nivmizz7@users.noreply.github.com>
@codeant-ai

codeant-ai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@Nivmizz7
Nivmizz7 merged commit 5309e11 into main Aug 14, 2026
6 of 8 checks passed
@Nivmizz7
Nivmizz7 deleted the fix-ticket branch August 14, 2026 18:29
@codeant-ai

codeant-ai Bot commented Aug 14, 2026

Copy link
Copy Markdown

🏁 CodeAnt Quality Gate Results

Commit: 077f4772
Scan Time: 2026-08-14 18:30:29 UTC

✅ Overall Status: PASSED

Quality Gate Details

Quality Gate Status Details
Secrets ✅ PASSED 0 secrets found
Duplicate Code ✅ PASSED 0.0% duplicated
SAST ✅ PASSED No security issues
Bugs ✅ PASSED Rating S: No bugs
IAC ✅ PASSED No IAC issues

View Full Results

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 83352344-4e5b-495f-aa19-dbd90e243839

📥 Commits

Reviewing files that changed from the base of the PR and between 9c27100 and 077f477.

📒 Files selected for processing (1)
  • src/interactions/buttonHandlers.js

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Ticket creation now correctly searches for the designated 🆘 Support category.
    • All other ticket creation behavior remains unchanged.

Walkthrough

Ticket creation now searches for the 🆘 --- Support --- category. Other ticket creation behavior remains unchanged.

Changes

Support category lookup

Layer / File(s) Summary
Update support category matching
src/interactions/buttonHandlers.js
The ticket category lookup now matches 🆘 --- Support --- instead of ticket.

Estimated code review effort: 1 (Trivial) | ~2 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-ticket

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codeant-ai codeant-ai Bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Aug 14, 2026
@codeant-ai

codeant-ai Bot commented Aug 14, 2026

Copy link
Copy Markdown

PR Code Suggestions ✨

Latest suggestions up to commit 077f477
CategorySuggestion                                                                                                                                    SeverityGenerated at (UTC)
Incorrect condition logic
Lowercasing only the channel name prevents the configured support category from ever matching

The channel name is lowercased before comparison, but the expected literal still
contains uppercase Support. Therefore a category named 🆘 --- Support --- becomes 🆘
--- support --- and never matches, causing every ticket creation attempt to take the
missing-category path. Lowercase the expected literal as well, or compare both names
using the same normalization.

src/interactions/buttonHandlers.js [32]

Why it matters? 🤔
  • ❌ Ticket creation always reports the configured category missing.
  • ❌ Users cannot create support tickets through the button.
  • ⚠️ Existing tickets are never checked or created.
Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** src/interactions/buttonHandlers.js
**Line:** 32:32
**Comment:**
	*Incorrect Condition Logic: The channel name is lowercased before comparison, but the expected literal still contains uppercase `Support`. Therefore a category named `🆘 --- Support ---` becomes `🆘 --- support ---` and never matches, causing every ticket creation attempt to take the missing-category path. Lowercase the expected literal as well, or compare both names using the same normalization.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
Critical2026-08-14 18:30

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

Labels

size:XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant