Skip to content

Sniper Config

This is the config the sniper will create when you first run it:

JSON
{
    "license": {
        "key": "",
        "anonymous": false
    },
    "discord": {
        "apiVersion": "9",
        "hostSelection": 0,
        "webhooks": {
            "successful": "",
            "missed": "",
            "updates": "",
            "embedMedia": ""
        }
    },
    "sniper": {
        "snipeType": 1,
        "saveInvites": true,
        "snipeOnMain": false,
        "savePromoCodes": true,
        "threads": 10
    },
    "alts": {
        "status": "invisible",
        "forceStatus": false
    }
}

Config Explanation

JSON
{
    "license": {
        "key": "", // Here you put your license key which you get by doing /keys on our discord server.
        "anonymous": false // If you want your claims/misses to appear as "Anonymous" on the discord logs, put this "true"
    },
    "discord": {
        "apiVersion": "9", // The API Version the sniper will use when sniping. The most stable version is "9", but the current versions that can still be used for sniping are from 6 to 10. The most experimental version being "10", which may also be the fastest. The sniper works even if you leave this empty.
        "hostSelection": 0, // The discord endpoint the sniper will use when sniping. Read further to see a list of all the host selections.
        "webhooks": {
            "successful": "", // Discord Webhook integration: The sniper will trigger this webhook with an embed containing the discord gift claim data.
            "missed": "", // Discord Webhook integration: The sniper will trigger this webhook with an embed containing the discord gift miss data.
            "updates": "", // Discord Webhook integration: The sniper will trigger this webhook with an embed containing the sniper update data. This is only triggered when there is a sniper update, and it will `@everyone`.
            "embedMedia": "" // Direct link to an image: The image to use in the embed.
        }
    },
    "sniper": {
        "snipeType": 1, // There are three snipe types (0 to 2). Read below to see the differences.
        "saveInvites": true, // If set "true", the sniper will save any discord invite code received in a message to "data/invites.txt"
        "snipeOnMain": false, // If set "true", the sniper will snipe using the "claimToken" too. This is only taken care of when the sniper is started/restarted. For S4U (snipe for you) communities, we recommend to leave this "false"
        "savePromoCodes": true, // If set "true", the sniper will save any promo code sniped in a message to "data/promocodes.txt"
        "threads": 10 // How many threads should be ran to load the alts simultaneously. We recommend to leave this to 10.
    },
    "alts": {
        "status": "invisible", // Either "invisible", "idle", "dnd", "online", or "offline"
        "forceStatus": false // If true, will force the alt to have the status configured. If false, will search for an active status on the ALT or fallback to the configured status.
    }
}

Snipe Types

Snipe Type Status Information
0 Stable Normal HTTP requests.
1 Stable Slightly faster than snipeType 0, due to the use of HTTP2 when available.
2 Experimental Direct connection to discord's server. This is an experimental snipe type.

Host Selection

If no host selection is input, then the sniper uses canary.discord.com by default

Number Host
0 discord.com
1 discordapp.com
2 ptb.discord.com
3 ptb.discordapp.com
4 canary.discord.com
5 canary.discordapp.com
6 canary-api.discordapp.com

Webhooks

Although you can make all the webhooks on one single channel, we recommend splitting into three channels (you can change the name of the channels as you like):

  • fails - For the snipe fails (config->missed)
  • success - For the snipe successes (config->successful)
  • updates - For the sniper's updates (config->updates)

These are the steps to create the webhook integrations:

  1. Go either to Server settings, either to the channel's settings
  2. Go to Integrations->Webhooks
  3. Press the "New Webhook" button. Make sure it's on the right channel. Feel free to change the icon/name.
  4. Press the "Copy Webhook URL" button to copy the URL of the webhhok, and put it in the right place in sniper's config.

You can also use webhooks to your own API. But in this case you would have to check the X-IancuSniper-Data header which is a Base64 encode of:

JSON
{
    "api_key": "", // API key (this is the sniper's license key), recommended that you check it in your API
    "code": "", // The gift code
    "delay": 226740700, // Sniping delay in nanoseconds: type Duration int64
    "claimed": false, // Is the code claimed?
    "type": "Nitro Monthly", // The type of gift it was (only available when "claimed" is true)
    "response": "{\"message\": \"This gift has been redeemed already.\", \"code\": 50050}", // The response of the gift claim (only available when "claimed" is false)
    "sniper_token": "x33nQ", // Last 5 characters of the token of the sniper that saw the code
    "claimer_token": "x33nQ", // Last 5 characters of the token of the user who claimed the code
    "sender": "iancusniper", // The username of user who sent the gift
    "guild_id": "", // The ID of the guild where the gift was sent
    "guild_name": "Iancu Sniper" // The name of the guild where the gift was sent
}