Actualiced commands
This commit is contained in:
parent
33e7687ad0
commit
2ea67a678e
1 changed files with 9 additions and 2 deletions
|
|
@ -27,6 +27,7 @@ namespace Bot_Discord_CSharp.Commands
|
||||||
}
|
}
|
||||||
|
|
||||||
[Command("response")]
|
[Command("response")]
|
||||||
|
[Hidden]
|
||||||
public async Task Response(CommandContext ctx)
|
public async Task Response(CommandContext ctx)
|
||||||
{
|
{
|
||||||
var interactivity = ctx.Client.GetInteractivity();
|
var interactivity = ctx.Client.GetInteractivity();
|
||||||
|
|
@ -39,6 +40,7 @@ namespace Bot_Discord_CSharp.Commands
|
||||||
}
|
}
|
||||||
|
|
||||||
[Command("respondReaction")]
|
[Command("respondReaction")]
|
||||||
|
[Hidden]
|
||||||
public async Task ResponseReaction(CommandContext ctx)
|
public async Task ResponseReaction(CommandContext ctx)
|
||||||
{
|
{
|
||||||
var interactivity = ctx.Client.GetInteractivity();
|
var interactivity = ctx.Client.GetInteractivity();
|
||||||
|
|
@ -86,15 +88,20 @@ namespace Bot_Discord_CSharp.Commands
|
||||||
}
|
}
|
||||||
|
|
||||||
[Command("fecha")]
|
[Command("fecha")]
|
||||||
|
[Description("Te devuelve la fecha de hoy")]
|
||||||
public async Task GetCurrentDay(CommandContext ctx)
|
public async Task GetCurrentDay(CommandContext ctx)
|
||||||
{
|
{
|
||||||
await ctx.Channel.SendMessageAsync(Today());
|
await ctx.Channel.SendMessageAsync(Today());
|
||||||
}
|
}
|
||||||
|
|
||||||
[Command("borrar")]
|
[Command("borrar")]
|
||||||
public async Task DeleteAllMessages(CommandContext ctx)
|
[Description("Borra los últimos X mensajes o si no se pone nada los últimos 100")]
|
||||||
|
public async Task DeleteAllMessages(CommandContext ctx, params string[] command)
|
||||||
{
|
{
|
||||||
IReadOnlyCollection<DiscordMessage> messages = await ctx.Channel.GetMessagesAsync(100);
|
int numberOfMenssages;
|
||||||
|
if (!command.Any()) numberOfMenssages = 100;
|
||||||
|
else numberOfMenssages = Int32.Parse(command[0]);
|
||||||
|
IReadOnlyCollection<DiscordMessage> messages = await ctx.Channel.GetMessagesAsync(numberOfMenssages);
|
||||||
await ctx.Channel.DeleteMessagesAsync(messages);
|
await ctx.Channel.DeleteMessagesAsync(messages);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue