|
|
@@ -1,7 +1,6 @@ |
|
|
|
#pragma warning disable CS0618 |
|
|
|
#pragma warning disable CS0618 |
|
|
|
using System; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
|
|
|
|
namespace Discord.Commands |
|
|
|
{ |
|
|
@@ -9,7 +8,7 @@ namespace Discord.Commands |
|
|
|
/// Require that the command is invoked by the owner of the bot. |
|
|
|
/// </summary> |
|
|
|
/// <remarks>This precondition will only work if the bot is a bot account.</remarks> |
|
|
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)] |
|
|
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)] |
|
|
|
public class RequireOwnerAttribute : PreconditionAttribute |
|
|
|
{ |
|
|
|
public override async Task<PreconditionResult> CheckPermissionsAsync(ICommandContext context, CommandInfo command, IServiceProvider services) |
|
|
|