-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dropped support for user measures in the API V1
- Loading branch information
Showing
7 changed files
with
30 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 0 additions & 51 deletions
51
src/GrillBot.App/Actions/Api/V1/UserMeasures/CreateUserMeasuresWarning.cs
This file was deleted.
Oops, something went wrong.
62 changes: 0 additions & 62 deletions
62
src/GrillBot.App/Actions/Api/V1/UserMeasures/GetUserMeasuresList.cs
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
src/GrillBot.App/Actions/Commands/UserMeasures/CreateUserMeasuresWarning.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using GrillBot.Core.RabbitMQ.Publisher; | ||
using GrillBot.Core.Services.UserMeasures.Models.Events; | ||
|
||
namespace GrillBot.App.Actions.Commands.UserMeasures; | ||
|
||
public class CreateUserMeasuresWarning : CommandAction | ||
{ | ||
private readonly IRabbitPublisher _rabbitPublisher; | ||
|
||
public CreateUserMeasuresWarning(IRabbitPublisher rabbitPublisher) | ||
{ | ||
_rabbitPublisher = rabbitPublisher; | ||
} | ||
|
||
public Task ProcessAsync(IGuildUser user, string message, bool notification) | ||
{ | ||
var moderatorId = Context.User.Id.ToString(); | ||
var guildId = user.GuildId.ToString(); | ||
|
||
var payload = new MemberWarningPayload(DateTime.UtcNow, message, guildId, moderatorId, user.Id.ToString(), notification); | ||
return _rabbitPublisher.PublishAsync(payload); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 0 additions & 10 deletions
10
src/GrillBot.Data/Models/API/UserMeasures/UserMeasuresListItem.cs
This file was deleted.
Oops, something went wrong.