refactor: move GroupAddRemoveResponseService into GroupMemberUtils

(it's not a service)
This commit is contained in:
spiral 2021-10-31 01:11:10 -04:00
parent bb8d5dcf12
commit 8d02af7b94
No known key found for this signature in database
GPG Key ID: A6059F0CA0E1BD31
4 changed files with 4 additions and 4 deletions

View File

@ -466,7 +466,7 @@ namespace PluralKit.Bot
}
else return; // otherwise toAction "may be undefined"
await ctx.Reply(GroupAddRemoveResponseService.GenerateResponse(op, members.Count, 1, toAction.Count, members.Count - toAction.Count));
await ctx.Reply(GroupMemberUtils.GenerateResponse(op, members.Count, 1, toAction.Count, members.Count - toAction.Count));
}
public async Task ListGroupMembers(Context ctx, PKGroup target)

View File

@ -54,7 +54,7 @@ namespace PluralKit.Bot
}
else return; // otherwise toAction "may be unassigned"
await ctx.Reply(GroupAddRemoveResponseService.GenerateResponse(op, 1, groups.Count, toAction.Count, groups.Count - toAction.Count));
await ctx.Reply(GroupMemberUtils.GenerateResponse(op, 1, groups.Count, toAction.Count, groups.Count - toAction.Count));
}
public async Task List(Context ctx, PKMember target)

View File

@ -4,7 +4,7 @@ using PluralKit.Core;
namespace PluralKit.Bot
{
public static class GroupAddRemoveResponseService
public static class GroupMemberUtils
{
public static string GenerateResponse(Groups.AddRemoveOperation action, int memberCount, int groupCount, int actionedOn, int notActionedOn)
{

View File

@ -10,7 +10,7 @@ namespace PluralKit.Tests
public class GroupAddRemoveResponseTests
{
private static Func<Groups.AddRemoveOperation, int, int, int, int, string>
func = GroupAddRemoveResponseService.GenerateResponse;
func = GroupMemberUtils.GenerateResponse;
private static Groups.AddRemoveOperation addOp = Groups.AddRemoveOperation.Add;
private static Groups.AddRemoveOperation removeOp = Groups.AddRemoveOperation.Remove;
private static string success = Emojis.Success;