diff --git a/DiscordBot/Program.cs b/DiscordBot/Program.cs
index 1ddccd8..94d9975 100644
--- a/DiscordBot/Program.cs
+++ b/DiscordBot/Program.cs
@@ -23,7 +23,7 @@ public class Program
{
///
/// This is the Discord token from the bot
- ///
+ ///
private string? _discordToken;
///
@@ -46,7 +46,7 @@ public class Program
///
/// Init Program
///
- public static Task Main(string[] args)
+ public static Task Main()
{
return new Program().MainAsync();
}
diff --git a/DiscordBot/Services/SlashCommandsService.cs b/DiscordBot/Services/SlashCommandsService.cs
index 6d7b071..38f6f99 100644
--- a/DiscordBot/Services/SlashCommandsService.cs
+++ b/DiscordBot/Services/SlashCommandsService.cs
@@ -271,7 +271,7 @@ public async Task WeatherSlashCommandAsync(IInteractionContextWrapper ctx, strin
Program.Log("Message: " + message);
if (success) {
- DiscordEmbedBuilder embedMessage = new DiscordEmbedBuilder
+ DiscordEmbedBuilder embedMessage = new()
{
Title = $"{symbol} - {physicalCurrency} | ${message}",
Description = $"Price of {symbol} - {physicalCurrency} is ${message}",
diff --git a/DiscordBot/SlashCommands.cs b/DiscordBot/SlashCommands.cs
index 0653983..5eb2829 100644
--- a/DiscordBot/SlashCommands.cs
+++ b/DiscordBot/SlashCommands.cs
@@ -61,7 +61,7 @@ public async Task PingSlashCommand(InteractionContext ctx)
[Option("PhysicalCurrency", "The physical currency to compare against, e.g., USDT")]
string physicalCurrency = "USDT")
{
- InteractionContextWrapper context = new InteractionContextWrapper(ctx);
+ InteractionContextWrapper context = new(ctx);
await slashCommandsService.CryptoSlashCommandAsync(context, symbol, physicalCurrency);
}
}
diff --git a/DiscordBotTests/ServiceTests/CryptoServiceTests.cs b/DiscordBotTests/ServiceTests/CryptoServiceTests.cs
index bbbdba6..c4eaa35 100644
--- a/DiscordBotTests/ServiceTests/CryptoServiceTests.cs
+++ b/DiscordBotTests/ServiceTests/CryptoServiceTests.cs
@@ -31,8 +31,8 @@ public void Setup()
public async Task GetCurrentCryptoPriceAsync_ReturnsCurrentPrice()
{
// Arrange
- string symbol = "BTC";
- string physicalCurrency = "USDT";
+ const string symbol = "BTC";
+ const string physicalCurrency = "USDT";
const string jsonResponse = "{\"result\": [{\"last_price\": \"50000\"}]}";
const string expectedPrice = "50000";
_mockHttpService.Setup(x => x.GetResponseFromUrl(It.IsAny(), It.IsAny(), It.IsAny(),
@@ -51,8 +51,8 @@ public async Task GetCurrentCryptoPriceAsync_ReturnsCurrentPrice()
public async Task GetCurrentCryptoPriceAsync_ApiError_ReturnsErrorMessage()
{
// Arrange
- string symbol = "BTC";
- string physicalCurrency = "USDT";
+ const string symbol = "BTC";
+ const string physicalCurrency = "USDT";
const string expectedErrorMessage = "API Error";
_mockHttpService.Setup(x => x.GetResponseFromUrl(It.IsAny(), It.IsAny(), It.IsAny(),
It.IsAny>>(), It.IsAny