Skip to content

Commit

Permalink
Fix stagingmodule issues
Browse files Browse the repository at this point in the history
  • Loading branch information
svr333 committed Mar 1, 2024
1 parent 0f9fbe1 commit a4d183e
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions src/AdvancedBot.Core/Commands/Modules/StagingModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,47 +104,43 @@ public async Task ResetStagingUser(uint userId)
}

[SlashCommand("addchips", "Adds chips to a user")]
[RequireSemiprivateList]
public async Task AddChipsToUserAsync(uint userId, int amount)
{
var result = await ModService.AddChipsAsync(Context.User.Id, userId, amount, true);
await SendResponseMessage(result.Message, false);
}

[SlashCommand("additem", "Adds an item a user")]
[RequireSemiprivateList]
public async Task AddItemsToUserAsync(uint userId, string sku, int amount)
{
var result = await ModService.AddItemsAsync(Context.User.Id, userId, sku, amount, true);
await SendResponseMessage(result.Message, false);
}

[SlashCommand("addxp", "Adds xp to a user")]
[RequireSemiprivateList]
public async Task AddXpToUserAsync(uint userId, int amount)
{
var result = await ModService.AddXpAsync(Context.User.Id, userId, amount, true);
await SendResponseMessage(result.Message, false);
}

[SlashCommand("restart", "Restarts staging server")]
[RequireSemiprivateList]
public async Task RestartStagingAsync()
{
var result = await GLClient.Staging.RestartServer();

if (result)
if (!result)
{
var embed = new EmbedBuilder()
{
Title = $"Restarted Staging",
Color = Color.Blue
};

await ModifyOriginalResponseAsync(x => x.Embed = embed.Build() );
await ModifyOriginalResponseAsync(x => x.Content = "Failed lol");
}

await ModifyOriginalResponseAsync(x => x.Content = "Failed lol");
var embed = new EmbedBuilder()
{
Title = $"Restarted Staging",
Color = Color.Blue
};

await ModifyOriginalResponseAsync(x => x.Embed = embed.Build() );
}
}
}

0 comments on commit a4d183e

Please sign in to comment.