-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOwnerModule.cs
More file actions
32 lines (28 loc) · 898 Bytes
/
Copy pathOwnerModule.cs
File metadata and controls
32 lines (28 loc) · 898 Bytes
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Discord.Commands;
namespace DabBot_
{
public class CommandModule : ModuleBase<SocketCommandContext>
{
[RequireOwner]
[Command("update")]
[Summary("Updates the phrases from the phrases.txt file")]
public async Task UpdateAsync()
{
Program.phrases = JsonHelper.DeserializePhrases(Program.pathPrefix);
string msg = "";
foreach (Phrase phrase in Program.phrases)
{
msg += "Listening to " + phrase.regex + " with " + phrase.links.Count + " links." + Environment.NewLine;
}
await ReplyAsync(msg);
}
[Command("ping")]
[Summary("Ping")]
public Task HelloAsync(string msg = "pong") => ReplyAsync(msg);
}
}