Skip to content

Commit

Permalink
Update per-server features
Browse files Browse the repository at this point in the history
Also actually register per-server commands on prod, oops
  • Loading branch information
FloatingMilkshake committed Sep 8, 2024
1 parent b071d04 commit a6d5911
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ internal static async Task Main()
slash.RegisterCommands<ServerSpecificFeatures.RoleCommands>(HomeServer.Id);

Discord.Logger.LogInformation(BotEventId, "Slash commands registered globally");

// and CommandsNext commands
commands.RegisterCommands<ServerSpecificFeatures.MessageCommands>();
#endif

await Discord.ConnectAsync();
Expand Down
13 changes: 11 additions & 2 deletions ServerSpecificFeatures.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,17 @@ public async Task Poop(CommandContext ctx)

try
{
var chan = await Program.Discord.GetChannelAsync(892978015309557870);
var msg = await chan.GetMessageAsync(1085253151155830895);
// ReSharper disable JoinDeclarationAndInitializer
DiscordChannel chan;
DiscordMessage msg;
// ReSharper restore JoinDeclarationAndInitializer
#if DEBUG
chan = await Program.Discord.GetChannelAsync(893654247709741088);
msg = await chan.GetMessageAsync(1282187612844589168);
#else
chan = await Program.Discord.GetChannelAsync(892978015309557870);
msg = await chan.GetMessageAsync(1085253151155830895);
#endif

var phrases = msg.Content.Split("\n");

Expand Down

0 comments on commit a6d5911

Please sign in to comment.