-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCommands.cs
More file actions
20 lines (17 loc) · 1.1 KB
/
Commands.cs
File metadata and controls
20 lines (17 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using VampireCommandFramework;
namespace VampireWebhook;
public class Commands
{
[Command("reloadHook_", shortHand: "rlh_", description: "Attempts to reload the Discord webhook.", adminOnly: true)]
public async void ReloadDiscordHook(ChatCommandContext ctx)
{
bool issetup = await DiscordWebhook.LoadHook();
ctx.Reply(issetup ? "Discord Webhook loaded correctly!" : "Something went wrong loading the Discord Webhook. Check the logs or reset the file.");
}
[Command("testhook_", shortHand: "th_", description: "Sends a test message to the Discord webhook.", adminOnly: true)]
public void TestDiscordHook(ChatCommandContext ctx)
{
_ = DiscordWebhook.SendDiscordMessageAsync("The bats whisper in the night, and the wolves howl at the moon. The shadows dance, and the darkness calls. The night is alive with secrets, and the stars are our only witnesses. We are the children of the night, and we embrace the darkness.");
ctx.Reply("Test message sent to Discord webhook. Check the channel for a message about bat whispering in the night to confirm setup.");
}
}