Grant hacker role

This commit is contained in:
Joseph Ferano 2022-03-28 23:19:51 +07:00
parent 08474d91ef
commit c3e5fafd59

View File

@ -177,6 +177,9 @@ type the `/arsenal` command NOW"""
let role = ctx.GetGuild().GetRole(GuildEnvironment.roleTrainee) let role = ctx.GetGuild().GetRole(GuildEnvironment.roleTrainee)
do! ctx.GetDiscordMember().RevokeRoleAsync(role) |> Async.AwaitTask do! ctx.GetDiscordMember().RevokeRoleAsync(role) |> Async.AwaitTask
let role = ctx.GetGuild().GetRole(GuildEnvironment.roleHacker)
do! ctx.GetDiscordMember().GrantRoleAsync(role) |> Async.AwaitTask
do! sendFollowUpMessage ctx ($"Your training is now complete. If you want to buy more **HACKS & SHIELDS**, go to the <#{GuildEnvironment.channelArmory}> and type the `/buy-hack` and `/buy-shield` commands!") do! sendFollowUpMessage ctx ($"Your training is now complete. If you want to buy more **HACKS & SHIELDS**, go to the <#{GuildEnvironment.channelArmory}> and type the `/buy-hack` and `/buy-shield` commands!")
}) })
@ -236,6 +239,9 @@ let handleArsenal (ctx : IDiscordContext) = PlayerInteractions.executePlayerActi
let role = ctx.GetGuild().GetRole(GuildEnvironment.roleTrainee) let role = ctx.GetGuild().GetRole(GuildEnvironment.roleTrainee)
do! ctx.GetDiscordMember().RevokeRoleAsync(role) |> Async.AwaitTask do! ctx.GetDiscordMember().RevokeRoleAsync(role) |> Async.AwaitTask
let role = ctx.GetGuild().GetRole(GuildEnvironment.roleHacker)
do! ctx.GetDiscordMember().GrantRoleAsync(role) |> Async.AwaitTask
do! sendFollowUpMessage ctx ($"Your training is now complete. If you want to buy more **HACKS & SHIELDS**, go to the <#{GuildEnvironment.channelArmory}> and type the `/buy-hack` and `/buy-shield` commands!") do! sendFollowUpMessage ctx ($"Your training is now complete. If you want to buy more **HACKS & SHIELDS**, go to the <#{GuildEnvironment.channelArmory}> and type the `/buy-hack` and `/buy-shield` commands!")
}) })