IgKniteDev / IgKnite

A unified, Swiss-grade bot, designed for providing fine moderation & music on Discord
https://igknitedev.github.io/docs
MIT License
71 stars 26 forks source link

Add a selection menu inside the `/queue` command. #38

Closed hitblast closed 2 years ago

hitblast commented 2 years ago

Instead of displaying the enqueued songs in the form of a list of strings, adding a selection menu to the view of the /queue command might be a more 'interactive' way to tinker with the queue system.

It must contain every enqueued song as an 'option'. Clicking each one would trigger something similar to the /now command; provide in-depth details about the song itself.

prasoonmhwr commented 2 years ago

May I take this issue

hitblast commented 2 years ago

@prasoonmhwr Sure! Assigning you then. Feel free to ask about any problems you face during your development.

prasoonmhwr commented 2 years ago

@hitblast Is there any document defining the project architecture so that I can know where to start

hitblast commented 2 years ago

@hitblast Is there any document defining the project architecture so that I can know where to start

Well, as of now, the documentation is still in development. However, I'll try modifying the contribution guidelines to contain the code structure for a new command. This will make things easier as you'll only need to think about the backend and not how to write a command properly :)

prasoonmhwr commented 2 years ago

@hitblast Is there any document defining the project architecture so that I can know where to start

Well, as of now, the documentation is still in development. However, I'll try modifying the contribution guidelines to contain the code structure for a new command. This will make things easier as you'll only need to think about the backend and not how to write a command properly :)

One more thing how do i test it in local as it a discord bot

hitblast commented 2 years ago

@hitblast Is there any document defining the project architecture so that I can know where to start

Well, as of now, the documentation is still in development. However, I'll try modifying the contribution guidelines to contain the code structure for a new command. This will make things easier as you'll only need to think about the backend and not how to write a command properly :)

One more thing how do i test it in local as it a discord bot

Oh that, you'll have to create a .env file for storing the credentials for IgKnite. It'll be something similar to this:

DISCORD_TOKEN=
DISCORD_OWNER_ID=
SPOTIFY_CLIENT_ID=
SPOTIFY_CLIENT_SECRET=

The first two variables are easily reachable. You can go to Discord Developers Portal to create a new application. Set it up as a bot and you will get the token for it. Copy and paste it in the first environment variable. Later, get the ID of your Discord account and paste it in the second one.

As of the final two, you'll have to get to Spotify for Developers and create a new application from the dashboard. Go to the application page and copy the client ID and secret. Finally, paste it accordingly inside the .env file!

prasoonmhwr commented 2 years ago

@hitblast I am facing this error while running in local , I have installed all the libraries mentioned in requirement.txt , I have also added the .env with the details provided above.

Screenshot 2022-09-30 at 9 36 22 PM

Am I running it correctly?

hitblast commented 2 years ago

@prasoonmhwr You are. Have you installed the dependencies correctly?

prasoonmhwr commented 2 years ago

@prasoonmhwr You are. Have you installed the dependencies correctly?

yes these are the only dependencies right?

python-decouple disnake[speed,voice] youtube-dl spotipy

hitblast commented 2 years ago

@prasoonmhwr You are. Have you installed the dependencies correctly?

yes these are the only dependencies right?

python-decouple disnake[speed,voice] youtube-dl spotipy

Yeah. Also the library wasn't even updated in recent time. I wonder if something's wrong with your environment. Could you try re-checking the dependencies you've installed and that you're on the correct environment?

prasoonmhwr commented 2 years ago

@hitblast thanks for the help it was environment issue, now may it know how to inject this in a server . I mean what is the next step after this.

Screenshot 2022-09-30 at 10 11 44 PM
hitblast commented 2 years ago

You'll have to generate a link from Discord's Developer Portal for your bot. Navigate to your application's page, click on OAuth2 from the sidebar and choose "URL Generator". Once you're in, follow these steps:

  1. Tick bot and application.commands to enable the bot interface and allow IgKnite to receive slash command requests.

  2. Then, make sure these permissions are allowed:

Screen Shot 2022-09-30 at 10 49 09 PM
  1. Scroll down and copy the generated URL. Finally, paste it in your browser, choose the server you want your bot to be in, voila!
prasoonmhwr commented 2 years ago

@hitblast Thanks again, I was able to integrate it , can you just quickly tell me how to use each command as I am facing error.

Screenshot 2022-09-30 at 10 31 23 PM
hitblast commented 2 years ago

Oh most of those commands are still a little incomplete. To play a song, make sure you're in a voice / stage channel and then try again.

prasoonmhwr commented 2 years ago

@hitblast I have implemented this is this the desired behaviour

New Implementation

https://user-images.githubusercontent.com/52622674/193335266-6b9856be-27f1-41f0-a28a-a08c13a9efd8.mov


Previous Implementation

Screenshot 2022-09-30 at 10 45 47 PM

Please let me know any changes are there :)

hitblast commented 2 years ago

@prasoonmhwr Excellent work! I really like the approach you've taken here. The last things you could do is check if all the buttons work as expected.

prasoonmhwr commented 2 years ago

@hitblast after checking all the buttons i will raise the PR, since its past 11:59pm in my country so it will be counted towards hacktoberfest i think

hitblast commented 2 years ago

Alright, thanks for your contribution!

prasoonmhwr commented 2 years ago

@hitblast I have created a PR for this, can you please check :)

hitblast commented 2 years ago

Sure thing!