question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use Discord Structures

See original GitHub issue

I see your code, that you’re not using discord structure to instantiate the Player for each guild. Rather you’re having a collection of players that is saved to the client. I think that’s not appropriate, to use efficiently. Because it requires to pass the <Guild>.id to each method we want to access, to access the player of that particular guild.

One more thing, why every method of the class Player requires us to pass a message object. That’s really inappropriate and redundant.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:19 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
skdhgcommented, Jun 1, 2021

Discord.js Slash Commands are available from Discord.js v13 and current Discord Player version targets Discord.js v12. We will have a clean rewrite targeting Discord.js v13 with many breaking changes. It’s not a good idea to use this lib (which currently is for v12) with discord.js master (v13) anyways

2reactions
Majoramaricommented, May 30, 2021

I don’t see a point of using Discord Structures in this library (users will do it if they need). However, we can improve the Player where you do not need to pass message to every methods 🤔

using a message prevent you from using slash commands so this need to change

Read more comments on GitHub >

github_iconTop Results From Across the Web

Partial Structures - discord.js Guide
All structures you can choose to use partials for have a new property, fittingly called .partial , indicating if it is a fully...
Read more >
How to Use Discord: An In-Depth Guide - Gary Vaynerchuk
First, what are Discord servers? Servers are essentially different community spaces hosted within the platform. They can be public — typically ...
Read more >
discord-structures - npm
Start using discord-structures in your project by running `npm i ... There are no other projects in the npm registry using discord-structures.
Read more >
Discord-structures NPM - npm.io
Check Discord-structures 1.0.6 package - Last release 1.0.6 with Apache-2.0 licence at our NPM packages aggregator and search engine.
Read more >
441: Community Governance Structures - Discord
Without a suitable governance structure to your moderation team there can be ... Do you take a proactive approach to get feedback from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found