47cc8425b2
Experimental feature. An attempt to standardize some common functions to ensure consistent execution of those functions, and also to notify services ahead of time that the events they may raise originated from within the bot. This is the initial commit. Implementation may change later.
21 lines
738 B
C#
21 lines
738 B
C#
using Discord.WebSocket;
|
|
using System.Threading.Tasks;
|
|
using Kerobot.Services.CommonFunctions;
|
|
|
|
namespace Kerobot
|
|
{
|
|
partial class Kerobot
|
|
{
|
|
private CommonFunctionsService _svcCommonFunctions;
|
|
|
|
public enum RemovalType { Ban, Kick }
|
|
|
|
/// <summary>
|
|
/// See <see cref="ModuleBase.BanAsync(SocketGuild, string, ulong, int, string, string)"/>
|
|
/// and related methods.
|
|
/// </summary>
|
|
public Task<BanKickResult> BanOrKickAsync(RemovalType t, SocketGuild guild, string source,
|
|
ulong target, int banPurgeDays, string logReason, string dmTemplate)
|
|
=> _svcCommonFunctions.BanOrKickAsync(t, guild, source, target, banPurgeDays, logReason, dmTemplate);
|
|
}
|
|
}
|