Skip to content

Commit

Permalink
Simplify the usage of SlashCommandParameterAttribute in NetCord's s…
Browse files Browse the repository at this point in the history
…ample
  • Loading branch information
KubaZ2 committed Mar 6, 2024
1 parent 43c2c00 commit f32d27b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samples/Lavalink4NET.Samples.NetCord/MusicModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
public class MusicModule(IAudioService audioService) : ApplicationCommandModule<SlashCommandContext>
{
[SlashCommand("play", "Plays a track!")]
public async Task<string> PlayAsync([SlashCommandParameter(Name = "query", Description = "The query to search for")] string query)
public async Task<string> PlayAsync([SlashCommandParameter(Description = "The query to search for")] string query)
{
var retrieveOptions = new PlayerRetrieveOptions(ChannelBehavior: PlayerChannelBehavior.Join);

var result = await audioService.Players
.RetrieveAsync(Context, playerFactory: PlayerFactory.Queued, retrieveOptions);

if (!result.IsSuccess)
{
return GetErrorMessage(result.Status);
Expand Down

0 comments on commit f32d27b

Please sign in to comment.