So I'm making a giveaway bot and I implemented the sub luck option. But now I don't know how could the bot write the users name in the text file X times.

Would this work?
Code:
timer %subluck 1 write Giveaway.txt $nick