Skip to content

Commit

Permalink
FIX: rand seed deprecation fix for emoji reacts
Browse files Browse the repository at this point in the history
  • Loading branch information
get-got committed Feb 10, 2024
1 parent bd67feb commit e57796d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion downloads.go
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,7 @@ func (download downloadRequestStruct) tryDownload() (downloadStatusStruct, int64
emojis := guild.Emojis
if len(emojis) > 1 {
for {
rand.Seed(time.Now().UnixNano())
rand.New(rand.NewSource((time.Now().UnixNano())))
chosenEmoji := emojis[rand.Intn(len(emojis))]
formattedEmoji := chosenEmoji.APIName()
if !chosenEmoji.Animated && !stringInSlice(formattedEmoji,
Expand Down

0 comments on commit e57796d

Please sign in to comment.