Fix bug with excessive hacks reaching embed limit. Fuck it mention users
This commit is contained in:
parent
a785ba3120
commit
d311423ca2
@ -99,11 +99,7 @@ let responseCreatedShieldTrainer (shield : BattleItem) =
|
|||||||
|
|
||||||
let eventSuccessfulHack (event : ComponentInteractionCreateEventArgs) target prize =
|
let eventSuccessfulHack (event : ComponentInteractionCreateEventArgs) target prize =
|
||||||
DiscordMessageBuilder()
|
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 eventFailedHack (event : ComponentInteractionCreateEventArgs) target prize =
|
|
||||||
DiscordMessageBuilder()
|
|
||||||
.WithContent($"{event.User.Username} successfully hacked {target.Name} for a total of {prize} GoodBoyTokenz")
|
|
||||||
|
|
||||||
let getGoodAgainst = function
|
let getGoodAgainst = function
|
||||||
| BattleClass.Network -> ( ShieldId.Firewall , HackId.Virus )
|
| BattleClass.Network -> ( ShieldId.Firewall , HackId.Virus )
|
||||||
|
@ -38,7 +38,10 @@ let actionFormat (actions : Action array) =
|
|||||||
match actions with
|
match actions with
|
||||||
| [||] -> "None"
|
| [||] -> "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 ->
|
|> Array.map (fun act ->
|
||||||
let item = Armory.getItem act.ActionId
|
let item = Armory.getItem act.ActionId
|
||||||
match act.Type with
|
match act.Type with
|
||||||
|
Loading…
x
Reference in New Issue
Block a user