Skip to content

Commit

Permalink
update to latest nightly and .net9
Browse files Browse the repository at this point in the history
  • Loading branch information
loukylor committed Nov 28, 2024
1 parent 3a6b77e commit 9be5cd4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions TrickfireCheckIn/Discord/Commands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static class Commands
[Command("setcheckinchannel")]
[Description("Sets the channel the bot sends the checkin message to")]
[InteractionAllowedContexts(DiscordInteractionContextType.Guild)]
[RequirePermissions(DiscordPermissions.None, DiscordPermissions.ManageGuild)]
[RequirePermissions([], [DiscordPermission.ManageGuild])]
public static async Task SetCheckInChannel(
SlashCommandContext context,
[Parameter("channel")]
Expand All @@ -27,12 +27,12 @@ DiscordChannel channel
) {
// Guild is not null because it cannot be called outsides guilds
DiscordPermissions permissions = channel.PermissionsFor(context.Guild!.CurrentMember);
if (!permissions.HasPermission(DiscordPermissions.SendMessages | DiscordPermissions.AccessChannels))
if (!permissions.HasPermission(DiscordPermission.SendMessages | DiscordPermission.ViewChannel))
{
await context.RespondAsync("Bot does not have permission to send messages in that channel");
return;
}
else if (!permissions.HasPermission(DiscordPermissions.ReadMessageHistory))
else if (!permissions.HasPermission(DiscordPermission.ReadMessageHistory))

// Delete old message
try
Expand Down
6 changes: 3 additions & 3 deletions TrickfireCheckIn/TrickfireCheckIn.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="DSharpPlus" Version="5.0.0-nightly-02397" />
<PackageReference Include="DSharpPlus.Commands" Version="5.0.0-nightly-02397" />
<PackageReference Include="DSharpPlus" Version="5.0.0-nightly-02426" />
<PackageReference Include="DSharpPlus.Commands" Version="5.0.0-nightly-02426" />
</ItemGroup>

</Project>

0 comments on commit 9be5cd4

Please sign in to comment.