forked from RPCS3/discord-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEvents.cs
61 lines (50 loc) · 2.49 KB
/
Events.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
using System.Threading.Tasks;
using CompatBot.Commands.Attributes;
using DSharpPlus.CommandsNext;
using DSharpPlus.CommandsNext.Attributes;
namespace CompatBot.Commands;
[Group("event"), Aliases("events", "e")]
[Description("Provides information about the various events in the game industry")]
internal sealed class Events: EventsBaseCommand
{
[GroupCommand]
public Task NearestGenericEvent(CommandContext ctx, [Description("Optional event name"), RemainingText] string? eventName = null)
=> NearestEvent(ctx, eventName);
[Command("add"), RequiresBotModRole]
[Description("Adds a new entry to the schedule")]
public Task AddGeneric(CommandContext ctx)
=> Add(ctx);
[Command("remove"), Aliases("delete", "del"), RequiresBotModRole]
[Description("Removes schedule entries with the specified IDs")]
public Task RemoveGeneric(CommandContext ctx, [Description("Event IDs to remove separated with space")] params int[] ids)
=> Remove(ctx, ids);
[Command("clean"), Aliases("cleanup", "Clear"), RequiresBotModRole]
[Description("Removes past events")]
public Task ClearGeneric(CommandContext ctx, [Description("Optional year to remove, by default everything before current year")] int? year = null)
=> Clear(ctx, year);
[Command("edit"), Aliases("adjust", "change", "modify", "update"), RequiresBotModRole]
[Description("Updates the event entry properties")]
public Task AdjustGeneric(CommandContext ctx, [Description("Event ID")] int id)
=> Update(ctx, id);
[Command("schedule"), Aliases("show", "list")]
[Description("Outputs current schedule")]
public Task ListGeneric(CommandContext ctx)
=> List(ctx);
[Command("schedule")]
public Task ListGeneric(CommandContext ctx,
[Description("Optional year to list")] int year)
=> List(ctx, null, year);
[Command("schedule")]
public Task ListGeneric(CommandContext ctx,
[Description("Optional event name to list schedule for")] string eventName)
=> List(ctx, eventName);
[Command("schedule")]
public Task ListGeneric(CommandContext ctx,
[Description("Optional event name to list schedule for")] string eventName,
[Description("Optional year to list")] int year)
=> List(ctx, eventName, year);
[Command("countdown")]
[Description("Provides countdown for the nearest known event")]
public Task Countdown(CommandContext ctx, string? eventName = null)
=> NearestEvent(ctx, eventName);
}