37 lines
910 B
C#
37 lines
910 B
C#
using Discord;
|
|
using Discord.Commands;
|
|
using Discord.WebSocket;
|
|
using Sean.Services;
|
|
using System;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Sean.Modules
|
|
{
|
|
[RequireContext(ContextType.DM)]
|
|
|
|
public class DMModule : ModuleBase<SocketCommandContext>
|
|
{
|
|
#region Methods
|
|
[Command("echo")]
|
|
[Summary("Echoes parameter")]
|
|
[Alias("say")]
|
|
public async Task EchoAsync([Summary("The text to echo")] [Remainder]string text)
|
|
{
|
|
await ReplyAsync(text);
|
|
}
|
|
|
|
[Command("exit")]
|
|
[Summary("Quit")]
|
|
[Alias("quit")]
|
|
public async Task ExitAsync()
|
|
{
|
|
foreach (SocketGuild guild in Context.Client.Guilds)
|
|
{
|
|
await guild.DefaultChannel.SendMessageAsync("Ciao les nazes !");
|
|
}
|
|
await Context.Client.StopAsync();
|
|
}
|
|
|
|
#endregion Methods
|
|
}
|
|
} |