huh why didn't i wrote a for loop
This commit is contained in:
		
							
								
								
									
										16
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								main.go
									
									
									
									
									
								
							| @@ -59,16 +59,12 @@ func ready(s *discordgo.Session, event *discordgo.Ready) { | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	for _, guild := range event.Guilds { | 	for _, guild := range event.Guilds { | ||||||
| 		_, err := s.ApplicationCommandCreate(s.State.User.ID, guild.ID, commands[0]) | 		for _, command := range commands { | ||||||
| 		if err != nil { | 			_, err := s.ApplicationCommandCreate(s.State.User.ID, guild.ID, command) | ||||||
| 			fmt.Println("error creating command,", err) | 			if err != nil { | ||||||
| 			continue // Continue to the next guild | 				fmt.Println("error creating command,", err) | ||||||
| 		} | 				continue // Continue to the next guild | ||||||
|  | 			} | ||||||
| 		_, err = s.ApplicationCommandCreate(s.State.User.ID, guild.ID, commands[1]) |  | ||||||
| 		if err != nil { |  | ||||||
| 			fmt.Println("error creating command,", err) |  | ||||||
| 			continue // Continue to the next guild |  | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user