RegexBot/Kerobot/Services/CommonFunctions/Kerobot_hooks.cs
Noikoio 47cc8425b2 Added CommonFunctionsService
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.
2018-12-04 19:41:42 -08:00

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);
}
}