Skip to content
This repository was archived by the owner on Jan 2, 2025. It is now read-only.

Commit 9a29d90

Browse files
committed
Update main.go
1 parent ea80b6e commit 9a29d90

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

go_spammer/main.go

+4-5
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,8 @@ func SendDirectMessages(userID *C.char, message *C.char) {
194194
func randomChannelID(channelIDs string) string {
195195

196196
splitChannels := strings.Split(channelIDs, ",")
197-
198-
rand.Seed(time.Now().UnixNano())
199197

198+
rand.Seed(time.Now().UnixNano())
200199
randomIndex := rand.Intn(len(splitChannels))
201200

202201
return splitChannels[randomIndex]
@@ -219,10 +218,10 @@ func SendChannelMessages(channelIDs *C.char, message *C.char, content *C.char) {
219218
go func(t string) {
220219
defer wg.Done()
221220
tools := &Tools{Token: t}
222-
randomChannel := randomChannelID(goChannelIDs)
223-
_, err := tools.sendMessageEmbed(randomChannel, goMessage, goContent)
221+
goRandomChannel := randomChannelID(goChannelIDs)
222+
_, err := tools.sendMessageEmbed(goRandomChannel, goMessage, goContent)
224223
if err != nil {
225-
fmt.Printf("There was an error sending message to %s with the token %s: %s\n", randomChannel, t, err)
224+
fmt.Printf("There was an error sending message to %s with the token %s: %s\n", goRandomChannel, t, err)
226225
}
227226

228227
}(token)

0 commit comments

Comments
 (0)