Class ReportService
- Namespace
- Uncreated.Warfare.Moderation.Reports
- Assembly
- Uncreated.Warfare.dll
[GenerateRpcSource]
[RpcDefaultTargetType("Uncreated.Web.Bot.Services.DiscordReportService, uncreated-web")]
[Priority(-100)]
[RpcGeneratedProxyType(TypeSetupMethodName = "__ModularRpcsGeneratedSetupStaticGeneratedProxy")]
public class ReportService : IDisposable, IHostedService, IEventListener<PlayerLeft>, IEventListener<PlayerChatSent>, IEventListener<PlayerUseableEquipped>
- Inheritance
-
ReportService
- Implements
-
- Inherited Members
-
Constructors
ReportService(IPlayerService, ILoopTickerFactory, DatabaseInterface, ILogger<ReportService>)
public ReportService(IPlayerService playerService, ILoopTickerFactory loopTickerFactory, DatabaseInterface moderationSql, ILogger<ReportService> logger)
Parameters
playerService IPlayerService
loopTickerFactory ILoopTickerFactory
moderationSql DatabaseInterface
logger ILogger<ReportService>
Properties
SelectPlayers
public IEnumerable<WarfarePlayer> SelectPlayers { get; }
Property Value
- IEnumerable<WarfarePlayer>
Methods
RequestChatRecords(uint, CancellationToken)
[RpcReceive]
public string[]? RequestChatRecords(uint reportId, CancellationToken token = default)
Parameters
reportId uint
token CancellationToken
Returns
- string[]
RequestScreenshot(uint, CancellationToken)
[RpcReceive]
public Task<byte[]?> RequestScreenshot(uint reportId, CancellationToken token = default)
Parameters
reportId uint
token CancellationToken
Returns
- Task<byte[]>
RequestShots(uint, CancellationToken)
[RpcReceive]
public Task<ArraySegment<byte>> RequestShots(uint reportId, CancellationToken token = default)
Parameters
reportId uint
token CancellationToken
Returns
- Task<ArraySegment<byte>>
RequestVoiceChatRecords(uint, CancellationToken)
[RpcReceive]
public byte[]? RequestVoiceChatRecords(uint reportId, CancellationToken token = default)
Parameters
reportId uint
token CancellationToken
Returns
- byte[]
SendReport(uint)
[RpcSend]
public RpcTask<string?> SendReport(uint reportId)
Parameters
reportId uint
Returns
- RpcTask<string>
StartReport(CSteamID, IModerationActor?, string?, ReportType, CancellationToken)
public Task<(Report Report, bool Sent)> StartReport(CSteamID target, IModerationActor? reporter, string? message, ReportType reportType, CancellationToken token = default)
Parameters
target CSteamID
reporter IModerationActor
message string
reportType ReportType
token CancellationToken
Returns
- Task<(Report Report, bool Sent)>