Skip to content

Commit

Permalink
Merge branch 'release/5.9.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverbooth committed Jul 21, 2024
2 parents 4011a22 + 33cf31e commit 268a6e6
Show file tree
Hide file tree
Showing 73 changed files with 797 additions and 339 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x
- name: Add NuGet source
run: dotnet nuget add source --username oliverbooth --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/oliverbooth/index.json"
- name: Restore dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Add GitHub NuGet source
run: dotnet nuget add source --username oliverbooth --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/oliverbooth/index.json"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Add GitHub NuGet source
run: dotnet nuget add source --username oliverbooth --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/oliverbooth/index.json"
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM mcr.microsoft.com/dotnet/runtime:7.0 AS base
FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ["Hammer/Hammer.csproj", "Hammer/"]
RUN dotnet restore "Hammer/Hammer.csproj"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using DSharpPlus;
using DSharpPlus;
using DSharpPlus.Entities;
using DSharpPlus.Exceptions;
using DSharpPlus.SlashCommands;
using Hammer.Data;
using Hammer.Extensions;
using Hammer.Services;
using Microsoft.Extensions.DependencyInjection;
using X10D.DSharpPlus;

namespace Hammer.AutocompleteProviders;

Expand Down
2 changes: 1 addition & 1 deletion Hammer/AutocompleteProviders/RuleAutocompleteProvider.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using DSharpPlus.Entities;
using DSharpPlus.Entities;
using DSharpPlus.SlashCommands;
using Hammer.Data;
using Hammer.Services;
Expand Down
19 changes: 12 additions & 7 deletions Hammer/Commands/AltCommand.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Text;
using System.Text;
using DSharpPlus;
using DSharpPlus.Entities;
using DSharpPlus.SlashCommands;
using DSharpPlus.SlashCommands.Attributes;
using Hammer.Extensions;
using Hammer.Services;
using X10D.DSharpPlus;

namespace Hammer.Commands;

Expand All @@ -25,8 +25,10 @@ public AltCommand(AltAccountService altAccountService)
[SlashCommand("add", "Adds an alt account to a user.", false)]
[SlashRequireGuild]
public async Task AddAltAsync(InteractionContext context,
[Option("user", "The user to add an alt account to.")] DiscordUser user,
[Option("alt", "The alt account to add.")] DiscordUser alt)
[Option("user", "The user to add an alt account to.")]
DiscordUser user,
[Option("alt", "The alt account to add.")]
DiscordUser alt)
{
await context.DeferAsync().ConfigureAwait(false);
await _altAccountService.AddAltAsync(user, alt, context.Member).ConfigureAwait(false);
Expand All @@ -47,8 +49,10 @@ public async Task AddAltAsync(InteractionContext context,
[SlashCommand("remove", "Removes an alt account from a user.", false)]
[SlashRequireGuild]
public async Task RemoveAltAsync(InteractionContext context,
[Option("user", "The user to remove an alt account from.")] DiscordUser user,
[Option("alt", "The alt account to remove.")] DiscordUser alt)
[Option("user", "The user to remove an alt account from.")]
DiscordUser user,
[Option("alt", "The alt account to remove.")]
DiscordUser alt)
{
await context.DeferAsync().ConfigureAwait(false);
await _altAccountService.RemoveAltAsync(user, alt, context.Member).ConfigureAwait(false);
Expand All @@ -67,7 +71,8 @@ public async Task RemoveAltAsync(InteractionContext context,
[SlashCommand("view", "Views the alt accounts for a user.", false)]
[SlashRequireGuild]
public async Task ViewAltsAsync(InteractionContext context,
[Option("user", "The user to add an alt account to.")] DiscordUser user)
[Option("user", "The user to add an alt account to.")]
DiscordUser user)
{
await context.DeferAsync().ConfigureAwait(false);
IReadOnlyCollection<ulong> altAccounts = _altAccountService.GetAltsFor(user.Id);
Expand Down
4 changes: 2 additions & 2 deletions Hammer/Commands/BanCommand.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using DSharpPlus.Entities;
using DSharpPlus.Entities;
using DSharpPlus.SlashCommands;
using DSharpPlus.SlashCommands.Attributes;
using Hammer.AutocompleteProviders;
using Hammer.Data;
using Hammer.Extensions;
using Hammer.Services;
using Humanizer;
using Microsoft.Extensions.Logging;
using X10D.DSharpPlus;
using X10D.Text;
using X10D.Time;

Expand Down
4 changes: 2 additions & 2 deletions Hammer/Commands/GagCommand.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using DSharpPlus;
using DSharpPlus;
using DSharpPlus.Entities;
using DSharpPlus.SlashCommands;
using DSharpPlus.SlashCommands.Attributes;
using Hammer.Extensions;
using Hammer.Services;
using Microsoft.Extensions.Logging;
using X10D.DSharpPlus;

namespace Hammer.Commands;

Expand Down
4 changes: 2 additions & 2 deletions Hammer/Commands/InfoCommand.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System.Text;
using System.Text;
using DSharpPlus;
using DSharpPlus.Entities;
using DSharpPlus.SlashCommands;
using DSharpPlus.SlashCommands.Attributes;
using Hammer.Extensions;
using Hammer.Services;
using Humanizer;
using X10D.DSharpPlus;

namespace Hammer.Commands;

Expand Down
2 changes: 1 addition & 1 deletion Hammer/Commands/Infractions/HistoryCommand.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using DSharpPlus;
using DSharpPlus;
using DSharpPlus.Entities;
using DSharpPlus.SlashCommands;
using DSharpPlus.SlashCommands.Attributes;
Expand Down
2 changes: 1 addition & 1 deletion Hammer/Commands/Infractions/InfractionCommand.Clear.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
using DSharpPlus.SlashCommands;
using DSharpPlus.SlashCommands.Attributes;
using Hammer.Data;
using Hammer.Extensions;
using Humanizer;
using X10D.DSharpPlus;

namespace Hammer.Commands.Infractions;

Expand Down
2 changes: 1 addition & 1 deletion Hammer/Commands/Infractions/InfractionCommand.Copy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using DSharpPlus.SlashCommands;
using DSharpPlus.SlashCommands.Attributes;
using Hammer.Data;
using X10D.DSharpPlus;
using Hammer.Extensions;

namespace Hammer.Commands.Infractions;

Expand Down
2 changes: 1 addition & 1 deletion Hammer/Commands/Infractions/InfractionCommand.Delete.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using DSharpPlus.SlashCommands;
using DSharpPlus.SlashCommands.Attributes;
using Hammer.Data;
using X10D.DSharpPlus;
using Hammer.Extensions;

namespace Hammer.Commands.Infractions;

Expand Down
2 changes: 1 addition & 1 deletion Hammer/Commands/Infractions/InfractionCommand.Edit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using DSharpPlus.SlashCommands.Attributes;
using Hammer.AutocompleteProviders;
using Hammer.Data;
using X10D.DSharpPlus;
using Hammer.Extensions;

namespace Hammer.Commands.Infractions;

Expand Down
2 changes: 1 addition & 1 deletion Hammer/Commands/Infractions/InfractionCommand.Move.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using DSharpPlus.SlashCommands;
using DSharpPlus.SlashCommands.Attributes;
using Hammer.Data;
using X10D.DSharpPlus;
using Hammer.Extensions;

namespace Hammer.Commands.Infractions;

Expand Down
2 changes: 1 addition & 1 deletion Hammer/Commands/Infractions/InfractionCommand.View.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
using DSharpPlus.SlashCommands;
using DSharpPlus.SlashCommands.Attributes;
using Hammer.Data;
using Hammer.Extensions;
using Humanizer;
using X10D.DSharpPlus;

namespace Hammer.Commands.Infractions;

Expand Down
4 changes: 2 additions & 2 deletions Hammer/Commands/Infractions/StaffHistoryCommand.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System.Text;
using System.Text;
using DSharpPlus;
using DSharpPlus.Entities;
using DSharpPlus.SlashCommands;
using DSharpPlus.SlashCommands.Attributes;
using Hammer.Data;
using Hammer.Extensions;
using Hammer.Services;
using Humanizer;
using X10D.DSharpPlus;

namespace Hammer.Commands.Infractions;

Expand Down
4 changes: 2 additions & 2 deletions Hammer/Commands/KickCommand.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using DSharpPlus.Entities;
using DSharpPlus.Entities;
using DSharpPlus.Exceptions;
using DSharpPlus.SlashCommands;
using DSharpPlus.SlashCommands.Attributes;
using Hammer.AutocompleteProviders;
using Hammer.Data;
using Hammer.Extensions;
using Hammer.Services;
using Microsoft.Extensions.Logging;
using X10D.DSharpPlus;
using X10D.Text;

namespace Hammer.Commands;
Expand Down
9 changes: 5 additions & 4 deletions Hammer/Commands/MessageCommand.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using DSharpPlus;
using DSharpPlus;
using DSharpPlus.Entities;
using DSharpPlus.SlashCommands;
using DSharpPlus.SlashCommands.Attributes;
using Hammer.Extensions;
using Hammer.Interactivity;
using Hammer.Services;
using X10D.DSharpPlus;

namespace Hammer.Commands;

Expand All @@ -27,7 +27,8 @@ public MessageCommand(MessageService messageService)
[SlashRequireGuild]
public async Task MessageAsync(
InteractionContext context,
[Option("member", "The member to message.")] DiscordUser user
[Option("member", "The member to message.")]
DiscordUser user
)
{
var embed = new DiscordEmbedBuilder();
Expand Down Expand Up @@ -55,7 +56,7 @@ public async Task MessageAsync(
string? content = message.Value?.Trim();
var builder = new DiscordFollowupMessageBuilder();
builder.AsEphemeral();

if (string.IsNullOrWhiteSpace(content))
{
embed = new DiscordEmbedBuilder();
Expand Down
4 changes: 2 additions & 2 deletions Hammer/Commands/MessageHistoryCommand.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using DSharpPlus;
using DSharpPlus;
using DSharpPlus.Entities;
using DSharpPlus.SlashCommands;
using Hammer.Data;
using Hammer.Extensions;
using Hammer.Services;
using X10D.DSharpPlus;

namespace Hammer.Commands;

Expand Down
3 changes: 1 addition & 2 deletions Hammer/Commands/MuteCommand.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using DSharpPlus.Entities;
using DSharpPlus.Entities;
using DSharpPlus.SlashCommands;
using DSharpPlus.SlashCommands.Attributes;
using Hammer.AutocompleteProviders;
Expand All @@ -8,7 +8,6 @@
using Hammer.Services;
using Humanizer;
using Microsoft.Extensions.Logging;
using X10D.DSharpPlus;
using X10D.Text;
using X10D.Time;

Expand Down
2 changes: 1 addition & 1 deletion Hammer/Commands/Notes/NoteCommand.Delete.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using DSharpPlus.SlashCommands.Attributes;
using Hammer.AutocompleteProviders;
using Hammer.Data;
using X10D.DSharpPlus;
using Hammer.Extensions;

namespace Hammer.Commands.Notes;

Expand Down
2 changes: 1 addition & 1 deletion Hammer/Commands/Notes/NoteCommand.EditContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using DSharpPlus.SlashCommands.Attributes;
using Hammer.AutocompleteProviders;
using Hammer.Data;
using X10D.DSharpPlus;
using Hammer.Extensions;

namespace Hammer.Commands.Notes;

Expand Down
2 changes: 1 addition & 1 deletion Hammer/Commands/Notes/NoteCommand.EditType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using DSharpPlus.SlashCommands.Attributes;
using Hammer.AutocompleteProviders;
using Hammer.Data;
using X10D.DSharpPlus;
using Hammer.Extensions;

namespace Hammer.Commands.Notes;

Expand Down
1 change: 0 additions & 1 deletion Hammer/Commands/Notes/NoteCommand.View.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using Hammer.Configuration;
using Hammer.Data;
using Hammer.Extensions;
using X10D.DSharpPlus;
using PermissionLevel = Hammer.Data.PermissionLevel;

namespace Hammer.Commands.Notes;
Expand Down
1 change: 0 additions & 1 deletion Hammer/Commands/Notes/NoteCommand.ViewAll.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using Hammer.Data;
using Hammer.Extensions;
using Microsoft.Extensions.Logging;
using X10D.DSharpPlus;

namespace Hammer.Commands.Notes;

Expand Down
2 changes: 1 addition & 1 deletion Hammer/Commands/Notes/NoteCommand.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using DSharpPlus.SlashCommands;
using DSharpPlus.SlashCommands;
using Hammer.Services;
using Microsoft.Extensions.Logging;

Expand Down
2 changes: 1 addition & 1 deletion Hammer/Commands/Reports/ReportCommands.BlockReports.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using DSharpPlus.Entities;
using DSharpPlus.SlashCommands;
using DSharpPlus.SlashCommands.Attributes;
using X10D.DSharpPlus;
using Hammer.Extensions;

namespace Hammer.Commands.Reports;

Expand Down
2 changes: 1 addition & 1 deletion Hammer/Commands/Reports/ReportCommands.UnblockReports.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using DSharpPlus.Entities;
using DSharpPlus.SlashCommands;
using DSharpPlus.SlashCommands.Attributes;
using X10D.DSharpPlus;
using Hammer.Extensions;

namespace Hammer.Commands.Reports;

Expand Down
2 changes: 1 addition & 1 deletion Hammer/Commands/Reports/ReportCommands.ViewReport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using DSharpPlus.SlashCommands;
using DSharpPlus.SlashCommands.Attributes;
using Hammer.Data;
using X10D.DSharpPlus;
using Hammer.Extensions;

namespace Hammer.Commands.Reports;

Expand Down
2 changes: 1 addition & 1 deletion Hammer/Commands/Reports/ReportCommands.ViewReports.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using DSharpPlus.SlashCommands;
using DSharpPlus.SlashCommands.Attributes;
using Hammer.Data;
using Hammer.Extensions;
using Humanizer;
using X10D.DSharpPlus;

namespace Hammer.Commands.Reports;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using DSharpPlus.SlashCommands;
using DSharpPlus.SlashCommands.Attributes;
using Hammer.Data;
using Hammer.Extensions;
using Humanizer;
using X10D.DSharpPlus;

namespace Hammer.Commands.Reports;

Expand Down
2 changes: 1 addition & 1 deletion Hammer/Commands/Reports/ReportCommands.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using DSharpPlus.SlashCommands;
using DSharpPlus.SlashCommands;
using Hammer.Services;

namespace Hammer.Commands.Reports;
Expand Down
Loading

0 comments on commit 268a6e6

Please sign in to comment.