Skip to content

Commit

Permalink
Upgrade DSharpPlus and switch back to UserCommandContext
Browse files Browse the repository at this point in the history
Nightly 02426 resolves the bug that was present in DSharpPlus
  • Loading branch information
FloatingMilkshake committed Nov 24, 2024
1 parent 0220804 commit 1dabc79
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Cliptok.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

<ItemGroup>
<PackageReference Include="Abyssal.HumanDateParser" Version="2.0.0-20191113.1" />
<PackageReference Include="DSharpPlus" Version="5.0.0-nightly-02422" />
<PackageReference Include="DSharpPlus.Commands" Version="5.0.0-nightly-02422" />
<PackageReference Include="DSharpPlus" Version="5.0.0-nightly-02426" />
<PackageReference Include="DSharpPlus.Commands" Version="5.0.0-nightly-02426" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.0" />
Expand Down
2 changes: 1 addition & 1 deletion Commands/FunCmds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class FunCmds
[Command("Hug")]
[SlashCommandTypes(DiscordApplicationCommandType.UserContextMenu)]
[AllowedProcessors(typeof(UserCommandProcessor))]
public async Task Hug(SlashCommandContext ctx, DiscordUser targetUser)
public async Task Hug(UserCommandContext ctx, DiscordUser targetUser)
{
var user = targetUser;

Expand Down
2 changes: 1 addition & 1 deletion Commands/UserNoteCmds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ internal class UserNoteCmds
[SlashCommandTypes(DiscordApplicationCommandType.UserContextMenu)]
[AllowedProcessors(typeof(UserCommandProcessor))]
[RequireHomeserverPerm(ServerPermLevel.TrialModerator), RequirePermissions(DiscordPermission.ModerateMembers)]
public async Task ShowNotes(SlashCommandContext ctx, DiscordUser targetUser)
public async Task ShowNotes(UserCommandContext ctx, DiscordUser targetUser)
{
await ctx.RespondAsync(embed: await UserNoteHelpers.GenerateUserNotesEmbedAsync(targetUser), ephemeral: true);
}
Expand Down
4 changes: 2 additions & 2 deletions Commands/UtilityCmds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public class UtilityCmds
[Command("Show Avatar")]
[SlashCommandTypes(DiscordApplicationCommandType.UserContextMenu)]
[AllowedProcessors(typeof(UserCommandProcessor))]
public async Task ContextAvatar(SlashCommandContext ctx, DiscordUser targetUser)
public async Task ContextAvatar(UserCommandContext ctx, DiscordUser targetUser)
{
string avatarUrl = await LykosAvatarMethods.UserOrMemberAvatarURL(targetUser, ctx.Guild);

Expand All @@ -24,7 +24,7 @@ public async Task ContextAvatar(SlashCommandContext ctx, DiscordUser targetUser)
[Command("User Information")]
[SlashCommandTypes(DiscordApplicationCommandType.UserContextMenu)]
[AllowedProcessors(typeof(UserCommandProcessor))]
public async Task ContextUserInformation(SlashCommandContext ctx, DiscordUser targetUser)
public async Task ContextUserInformation(UserCommandContext ctx, DiscordUser targetUser)
{
await ctx.RespondAsync(embed: await DiscordHelpers.GenerateUserEmbed(targetUser, ctx.Guild), ephemeral: true);
}
Expand Down
2 changes: 1 addition & 1 deletion Commands/WarningCmds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ internal class WarningCmds
[Command("Show Warnings")]
[SlashCommandTypes(DiscordApplicationCommandType.UserContextMenu)]
[AllowedProcessors(typeof(UserCommandProcessor))]
public async Task ContextWarnings(SlashCommandContext ctx, DiscordUser targetUser)
public async Task ContextWarnings(UserCommandContext ctx, DiscordUser targetUser)
{
await ctx.RespondAsync(embed: await WarningHelpers.GenerateWarningsEmbedAsync(targetUser), ephemeral: true);
}
Expand Down

0 comments on commit 1dabc79

Please sign in to comment.