Skip to content

Commit

Permalink
Add global sniper blacklist
Browse files Browse the repository at this point in the history
  • Loading branch information
Vedza committed Mar 31, 2021
1 parent e4b126c commit ff80362
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 29 deletions.
34 changes: 22 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Discord Nitro sniper and Giveaway joiner in Go.

![Screenshot](screenshot.png)

#### Features
#### Features

* Multiple accounts support to claim on one main account
* Optional Counter for max Nitro activations
* Optional main account sniper to only claim code from alts
Expand All @@ -37,6 +38,7 @@ Discord Nitro sniper and Giveaway joiner in Go.
#### Usage

Edit `settings.json`

``` json5
{
"tokens": {
Expand Down Expand Up @@ -86,16 +88,18 @@ Edit `settings.json`
"webhook": {
"url": "",
"good_only": false // Will trigger webhook only when you applied a Nitro code or won a giveaway
}
},
"blacklist_servers": [] // IDs of servers you don't want the sniper to work on

}
```

You have multiple choices to run the sniper :
You have multiple choices to run the sniper :

- [Deploy on Heroku](https://heroku.com/deploy?template=https://github.com/Vedza/NitroSniperGo/tree/heroku) (Free 24/7)
* Deploy
* Resources -> enable sniper
* See logs in More -> View logs
* Deploy
* Resources -> enable sniper
* See logs in More -> View logs

- Download the latest [release](https://github.com/Vedza/NitroSniperGo/releases)

Expand All @@ -105,21 +109,27 @@ You have multiple choices to run the sniper :
go build
./NitroSniperGo
```

<!-- - [Deploy on Repl.it](https://repl.it/github/Vedza/NitroSniperGo) -->


#### How to obtain your token

https://github.com/Tyrrrz/DiscordChatExporter/wiki/Obtaining-Token-and-Channel-IDs#how-to-get-a-user-token

#### Known issues

* `error unmarshalling READY event` is not a problem, it just happens because you're doing a self bot
* `Already purchased` happens when the gift is a Xbox game pass plan, so if you already activated a discord game pass code you can't activate it anymore
* It looks like Discord added a security feature where your token change every time but also expire with 2FA, that might be the reason why the sniper doesn't work after some time or if you get an unauthorized error when sniping Nitro
* `Already purchased` happens when the gift is a Xbox game pass plan, so if you already activated a discord game pass
code you can't activate it anymore
* It looks like Discord added a security feature where your token change every time but also expire with 2FA, that might
be the reason why the sniper doesn't work after some time or if you get an unauthorized error when sniping Nitro
* Some welcome bots mention giveaways that might cause a false positive
* Privnote sniper makes the program crash sometimes, disable it in settings if that happens to you until I find a solution
* Privnote sniper makes the program crash sometimes, disable it in settings if that happens to you until I find a
solution

#### Disclaimer
This is against TOS and can get your account banned, especially if you run multiple instance at the same time and/or claim too many Nitros in a too short amount of time. Use it at your own risks.

This is against TOS and can get your account banned, especially if you run multiple instance at the same time and/or
claim too many Nitros in a too short amount of time. Use it at your own risks.

> *If you like my sniper consider putting a star on this repo !*
3 changes: 2 additions & 1 deletion settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@
"webhook": {
"url": "",
"good_only": false
}
},
"blacklist_servers": []
}
38 changes: 22 additions & 16 deletions sniper.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ type Settings struct {
URL string `json:"url"`
GoodOnly bool `json:"good_only"`
} `json:"webhook"`
BlacklistServers []string `json:"blacklist_servers"`
}

type Response struct {
Expand Down Expand Up @@ -536,22 +537,6 @@ func deleteEmpty(s []string) []string {
}

func main() {
c := exec.Command("clear")

c.Stdout = os.Stdout
_ = c.Run()
color.Red(`
▓█████▄ ██▓ ██████ ▄████▄ ▒█████ ██▀███ ▓█████▄ ██████ ███▄ █ ██▓ ██▓███ ▓█████ ██▀███
▒██▀ ██▌▓██▒▒██ ▒ ▒██▀ ▀█ ▒██▒ ██▒▓██ ▒ ██▒▒██▀ ██▌ ▒██ ▒ ██ ▀█ █ ▓██▒▓██░ ██▒▓█ ▀ ▓██ ▒ ██▒
░██ █▌▒██▒░ ▓██▄ ▒▓█ ▄ ▒██░ ██▒▓██ ░▄█ ▒░██ █▌ ░ ▓██▄ ▓██ ▀█ ██▒▒██▒▓██░ ██▓▒▒███ ▓██ ░▄█ ▒
░▓█▄ ▌░██░ ▒ ██▒▒▓▓▄ ▄██▒▒██ ██░▒██▀▀█▄ ░▓█▄ ▌ ▒ ██▒▓██▒ ▐▌██▒░██░▒██▄█▓▒ ▒▒▓█ ▄ ▒██▀▀█▄
░▒████▓ ░██░▒██████▒▒▒ ▓███▀ ░░ ████▓▒░░██▓ ▒██▒░▒████▓ ▒██████▒▒▒██░ ▓██░░██░▒██▒ ░ ░░▒████▒░██▓ ▒██▒
▒▒▓ ▒ ░▓ ▒ ▒▓▒ ▒ ░░ ░▒ ▒ ░░ ▒░▒░▒░ ░ ▒▓ ░▒▓░ ▒▒▓ ▒ ▒ ▒▓▒ ▒ ░░ ▒░ ▒ ▒ ░▓ ▒▓▒░ ░ ░░░ ▒░ ░░ ▒▓ ░▒▓░
░ ▒ ▒ ▒ ░░ ░▒ ░ ░ ░ ▒ ░ ▒ ▒░ ░▒ ░ ▒░ ░ ▒ ▒ ░ ░▒ ░ ░░ ░░ ░ ▒░ ▒ ░░▒ ░ ░ ░ ░ ░▒ ░ ▒░
░ ░ ░ ▒ ░░ ░ ░ ░ ░ ░ ░ ▒ ░░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ▒ ░░░ ░ ░░ ░
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░
`)

if settings.Tokens.Main == "" {
_, _ = magenta.Print(time.Now().Format("15:04:05 "))
Expand Down Expand Up @@ -604,6 +589,23 @@ func main() {
<-finished
}

c := exec.Command("clear")

c.Stdout = os.Stdout
_ = c.Run()
color.Red(`
▓█████▄ ██▓ ██████ ▄████▄ ▒█████ ██▀███ ▓█████▄ ██████ ███▄ █ ██▓ ██▓███ ▓█████ ██▀███
▒██▀ ██▌▓██▒▒██ ▒ ▒██▀ ▀█ ▒██▒ ██▒▓██ ▒ ██▒▒██▀ ██▌ ▒██ ▒ ██ ▀█ █ ▓██▒▓██░ ██▒▓█ ▀ ▓██ ▒ ██▒
░██ █▌▒██▒░ ▓██▄ ▒▓█ ▄ ▒██░ ██▒▓██ ░▄█ ▒░██ █▌ ░ ▓██▄ ▓██ ▀█ ██▒▒██▒▓██░ ██▓▒▒███ ▓██ ░▄█ ▒
░▓█▄ ▌░██░ ▒ ██▒▒▓▓▄ ▄██▒▒██ ██░▒██▀▀█▄ ░▓█▄ ▌ ▒ ██▒▓██▒ ▐▌██▒░██░▒██▄█▓▒ ▒▒▓█ ▄ ▒██▀▀█▄
░▒████▓ ░██░▒██████▒▒▒ ▓███▀ ░░ ████▓▒░░██▓ ▒██▒░▒████▓ ▒██████▒▒▒██░ ▓██░░██░▒██▒ ░ ░░▒████▒░██▓ ▒██▒
▒▒▓ ▒ ░▓ ▒ ▒▓▒ ▒ ░░ ░▒ ▒ ░░ ▒░▒░▒░ ░ ▒▓ ░▒▓░ ▒▒▓ ▒ ▒ ▒▓▒ ▒ ░░ ▒░ ▒ ▒ ░▓ ▒▓▒░ ░ ░░░ ▒░ ░░ ▒▓ ░▒▓░
░ ▒ ▒ ▒ ░░ ░▒ ░ ░ ░ ▒ ░ ▒ ▒░ ░▒ ░ ▒░ ░ ▒ ▒ ░ ░▒ ░ ░░ ░░ ░ ▒░ ▒ ░░▒ ░ ░ ░ ░ ░▒ ░ ▒░
░ ░ ░ ▒ ░░ ░ ░ ░ ░ ░ ░ ▒ ░░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ▒ ░░░ ░ ░░ ░
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░
`)

getPaymentSourceId()

t := time.Now()
Expand Down Expand Up @@ -819,6 +821,10 @@ func findHost(s *discordgo.Session, m *discordgo.MessageCreate) string {

func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {

if contains(settings.BlacklistServers, m.GuildID) {
return
}

if reGiftLink.Match([]byte(m.Content)) && SniperRunning {
checkGiftLink(s, m, m.Content, time.Now())
} else if settings.Giveaway.Enable && !contains(settings.Giveaway.BlacklistServers, m.GuildID) && (strings.Contains(strings.ToLower(m.Content), "**giveaway**") || (strings.Contains(strings.ToLower(m.Content), "react with") && strings.Contains(strings.ToLower(m.Content), "giveaway"))) && m.Author.Bot {
Expand Down

0 comments on commit ff80362

Please sign in to comment.