Not sure if we're going to do it this way
This commit is contained in:
		
							parent
							
								
									e1e1b96543
								
							
						
					
					
						commit
						d2d18114ef
					
				
							
								
								
									
										21
									
								
								Bot/Admin.fs
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								Bot/Admin.fs
									
									
									
									
									
								
							| @ -45,6 +45,20 @@ let sendEmbed embed (ctx : IDiscordContext) = | ||||
|         do! Messaging.sendSimpleResponse ctx "Sent!" | ||||
|     } :> Task | ||||
| 
 | ||||
| let updateEmbed embed (ctx : IDiscordContext) = | ||||
|     task { | ||||
|         match embed with | ||||
|         | InitEmbeds.Dojo -> Trainer.sendInitialEmbed ctx | ||||
|         | InitEmbeds.Whitelist -> Whitelist.sendInitialEmbed ctx | ||||
|         | InitEmbeds.Recruit -> InviteTracker.sendInitialEmbed ctx | ||||
|         | InitEmbeds.Slots -> SlotMachine.sendInitialEmbedFromSlashCommand ctx | ||||
|         | InitEmbeds.JpegStore -> Store.sendBackalleyEmbed ctx | ||||
|         | InitEmbeds.Armory -> Store.sendArmoryEmbed ctx | ||||
|         | InitEmbeds.Wallet -> InviteTracker.sendSubmitEmbed ctx | ||||
|         | _ -> () | ||||
|         do! Messaging.sendSimpleResponse ctx "Sent!" | ||||
|     } :> Task | ||||
| 
 | ||||
| let getAllReactions (msg : DiscordMessage) (ctx : IDiscordContext) : Task<DiscordUser seq> = | ||||
|     task { | ||||
|         let mutable listOfUsers = ResizeArray<DiscordUser>(512) | ||||
| @ -157,10 +171,15 @@ type AdminBot() = | ||||
|         enforceAdmin (DiscordInteractionContext ctx) (Whitelist.setCurrentWhitelistStock (int amount * 1<GBT>)) | ||||
| 
 | ||||
|     [<SlashCommandPermissions(Permissions.Administrator)>] | ||||
|     [<SlashCommand("admin-send-embed", "Set whitelist stock", false)>] | ||||
|     [<SlashCommand("admin-embed-send", "Set whitelist stock", false)>] | ||||
|     member this.SendEmbedToChannel (ctx : InteractionContext, [<Option("embed", "Which embed to send")>] embed : InitEmbeds) = | ||||
|         enforceAdmin (DiscordInteractionContext ctx) (sendEmbed embed) | ||||
| 
 | ||||
|     [<SlashCommandPermissions(Permissions.Administrator)>] | ||||
|     [<SlashCommand("admin-embed-update", "Set whitelist stock", false)>] | ||||
|     member this.UpdateEmbedInChannel (ctx : InteractionContext, [<Option("embed", "Which embed to send")>] embed : InitEmbeds) = | ||||
|         enforceAdmin (DiscordInteractionContext ctx) (updateEmbed embed) | ||||
|          | ||||
|     [<SlashCommandPermissions(Permissions.Administrator)>] | ||||
|     [<SlashCommand("admin-get-msg-reactions", "Set whitelist stock", false)>] | ||||
|     member this.GetMessageReactions (ctx : InteractionContext, | ||||
|  | ||||
| @ -373,7 +373,14 @@ To confirm your **Whitelist** please submit it below: | ||||
|             let btn = DiscordButtonComponent(ButtonStyle.Success, "WalletStatus", "Check Status") :> DiscordComponent | ||||
|             builder.AddComponents [| btn |] |> ignore | ||||
| 
 | ||||
|             do! GuildEnvironment.botClientRecruit.Value.SendMessageAsync(channel, builder) | ||||
|             let! msgs = channel.GetMessagesAsync() |> Async.AwaitTask | ||||
|             let recruitBot = GuildEnvironment.botClientRecruit.Value | ||||
|             match msgs |> Seq.tryHead with | ||||
|             | Some msg -> | ||||
|                 if msg.Author.Id = recruitBot.CurrentUser.Id then | ||||
|                     do! msg.ModifyAsync(builder) |> Async.AwaitTask |> Async.Ignore | ||||
|             | None -> | ||||
|                 do! recruitBot.SendMessageAsync(channel, builder) | ||||
|                     |> Async.AwaitTask | ||||
|                     |> Async.Ignore | ||||
|         with e -> | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user