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: Voice Channel Send Effects #9288

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

Jiralite
Copy link
Member

@Jiralite Jiralite commented Mar 28, 2023

Please describe the changes this PR makes and why it should be merged:

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating
  • This PR changes the library's interface (methods or parameters added)

@vercel
Copy link

vercel bot commented Mar 28, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
discord-js ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 14, 2023 8:40pm
discord-js-guide ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 14, 2023 8:40pm

@vercel
Copy link

vercel bot commented Mar 28, 2023

@Jiralite is attempting to deploy a commit to the discordjs Team on Vercel.

A member of the Team first needs to authorize it.

@Jiralite Jiralite changed the title feat: initial commit feat: Voice Channel Send Effects Mar 28, 2023
@Jiralite Jiralite added this to the discord.js 14.10 milestone Mar 28, 2023
@github-actions
Copy link

github-actions bot commented Mar 28, 2023

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 89
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100
🟠 PWA 70

Lighthouse ran on https://discord-js-git-fork-jiralite-feat-voice-effects-discordjs.vercel.app/

@jaw0r3k
Copy link
Contributor

jaw0r3k commented Mar 28, 2023

may you add channel getter?

@jaw0r3k
Copy link
Contributor

jaw0r3k commented Mar 28, 2023

also shouldn't it be an action, which handlers just handle
like every other event?

/**
* Represents an effect used in a {@link VoiceChannel}.
*/
class VoiceChannelEffect {

This comment was marked as outdated.

Copy link
Member Author

Choose a reason for hiding this comment

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

Probably not. Extending Base would mean this would (not publically) add _clone(), _patch(), and _update() to the class which are all irrelevant methods. In addition, valueOf() for this structure would return undefined as there is no id sent in voice channel effects.

@Jiralite
Copy link
Member Author

Jiralite commented Apr 2, 2023

may you add channel getter?

This seems to already be done.

@Jiralite
Copy link
Member Author

Jiralite commented Apr 2, 2023

also shouldn't it be an action, which handlers just handle like every other event?

/*
ABOUT ACTIONS
Actions are similar to WebSocket Packet Handlers, but since introducing
the REST API methods, in order to prevent rewriting code to handle data,
"actions" have been introduced. They're basically what Packet Handlers
used to be but they're strictly for manipulating data and making sure
that WebSocket events don't clash with REST methods.
*/

My take on this is until there are any REST events that affect this event or we need to manually call this code, there is no need to add it. It is a very simple structure: receive a WebSocket event then emit it. Also, not every event has an action. So no, it shouldn't be an action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

None yet

2 participants