Fix bug with excessive hacks reaching embed limit. Fuck it mention users

This commit is contained in:
Joseph Ferano 2022-02-09 22:36:13 +07:00
parent a785ba3120
commit d311423ca2
2 changed files with 5 additions and 6 deletions

View File

@ -99,11 +99,7 @@ let responseCreatedShieldTrainer (shield : BattleItem) =
let eventSuccessfulHack (event : ComponentInteractionCreateEventArgs) target prize =
DiscordMessageBuilder()
.WithContent($"{event.User.Username} successfully hacked {target.Name} for a total of {prize} GoodBoyTokenz")
let eventFailedHack (event : ComponentInteractionCreateEventArgs) target prize =
DiscordMessageBuilder()
.WithContent($"{event.User.Username} successfully hacked {target.Name} for a total of {prize} GoodBoyTokenz")
.WithContent($"{event.User.Username} successfully hacked <@{target.DiscordId}> for a total of {prize} GoodBoyTokenz")
let getGoodAgainst = function
| BattleClass.Network -> ( ShieldId.Firewall , HackId.Virus )

View File

@ -38,7 +38,10 @@ let actionFormat (actions : Action array) =
match actions with
| [||] -> "None"
| _ ->
actions
let hacks , defenses = actions |> Array.partition (fun act -> match act.Type with Attack _ -> true | Defense -> false)
let hacks = hacks |> Array.take (min hacks.Length 10)
hacks
|> Array.append defenses
|> Array.map (fun act ->
let item = Armory.getItem act.ActionId
match act.Type with