Skip to content

Commit

Permalink
Remove unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
arnavb committed Jul 15, 2024
1 parent 3f442fd commit 08e8b41
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions JimBroBot/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
open dotenv.net
open dotenv.net.Utilities
open Discord
open Discord.Interactions
open Discord.WebSocket
open System.Threading.Tasks
open System
Expand Down Expand Up @@ -33,7 +32,7 @@ let loadBotConfig () =
TestGuildId = None }
| false, _ -> Error NoEnvBotToken

let buildCommands (client: DiscordSocketClient) =
let buildCommands =
commands
|> List.map (fun (name, (commandBuilder, _)) -> name |> commandBuilder)
|> List.map _.Build()
Expand All @@ -54,7 +53,7 @@ let log (message: LogMessage) =
let ready (client: DiscordSocketClient) testGuildId () =
task {
let! _ =
buildCommands client
buildCommands
|> List.map (fun builtCommand ->
client.Rest.CreateGuildCommand(builtCommand, testGuildId) |> Async.AwaitTask)
|> Async.Parallel
Expand All @@ -77,8 +76,6 @@ let createAndStartClient botConfig =
use client =
new DiscordSocketClient(DiscordSocketConfig(GatewayIntents = GatewayIntents.GuildMessageReactions))

use interactionService = new InteractionService(client.Rest)

// Register event handlers
client.add_Log log
client.add_Ready (ready client (Option.defaultValue 3UL botConfig.TestGuildId))
Expand Down

0 comments on commit 08e8b41

Please sign in to comment.