Refaction all files into component based folders
This commit is contained in:
parent
55e152f4aa
commit
e3adf55742
102 changed files with 816 additions and 709 deletions
36
Geekbot.net/Commands/Admin/Say.cs
Normal file
36
Geekbot.net/Commands/Admin/Say.cs
Normal file
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
using Discord.Commands;
|
||||
using Geekbot.net.Lib;
|
||||
using Geekbot.net.Lib.ErrorHandling;
|
||||
|
||||
namespace Geekbot.net.Commands.Admin
|
||||
{
|
||||
public class Say : ModuleBase
|
||||
{
|
||||
private readonly IErrorHandler _errorHandler;
|
||||
|
||||
public Say(IErrorHandler errorHandler)
|
||||
{
|
||||
_errorHandler = errorHandler;
|
||||
}
|
||||
|
||||
[RequireUserPermission(GuildPermission.Administrator)]
|
||||
[Command("say", RunMode = RunMode.Async)]
|
||||
[Remarks(CommandCategories.Admin)]
|
||||
[Summary("Say Something.")]
|
||||
public async Task Echo([Remainder] [Summary("What?")] string echo)
|
||||
{
|
||||
try
|
||||
{
|
||||
await Context.Message.DeleteAsync();
|
||||
await ReplyAsync(echo);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_errorHandler.HandleCommandException(e, Context);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue