Skip to content

Ak-07/Loops-In-BDFD

Repository files navigation

Before you can use any type of loops, you need to learn how to escape code.

Running a code for each item in a list.

Imagine a list of numbers (1, 2, 3, ..., 10), and your goal is to get rid of every item that is bigger than 3. This should be done with a “For Each Loop” because you do something to each item in the list (check if it’s bigger than 3). I recommend the first method, and that’s the one I always use, but you’re welcome to use any method you want.

Here are 5 example methods, the first two are more complicated, but they prevent the execution of user provided scripts:

Running a code a specific amount of times.

Imagine you want to list all even numbers from X to Y. This should be done with this loop because you will be executing a code a specific amount of times. I recommend the first method because it’s easier, but I rarely use it, but you’re welcome to use any method you want.

Here are 2 example methods:

Running a code all the time.

An example use case of it would be a reminder command, or a giveaway command.
This loop executes a specified code every specified duration.
Click here to learn more.

My Discord is @ak.5.

  • Anything you couldn’t understand? DM me, and I’ll try my best to explain.
  • Any suggestions? I will be happy to recieve your suggestions.
  • Do you know more BDFD loops? Tell me, and I might add it here, and if I do add it, I will give you credit.

About

Loops in BDFD.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published