Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webhooks not working? #79

Closed
xenoguy opened this issue Feb 3, 2017 · 5 comments
Closed

Webhooks not working? #79

xenoguy opened this issue Feb 3, 2017 · 5 comments

Comments

@xenoguy
Copy link

xenoguy commented Feb 3, 2017

I can't get the webhooks to work. I've tried adding a slack and a discord webhook to the config. the console output from scan.py says it's sent alerts, but nothing showed up in the channels I set the webhooks up for.

@Memurame
Copy link
Contributor

Memurame commented Feb 3, 2017

Please send us your webhook settings from the Config. Do you use PokeAlarm or what? Is the Bot running?

@xenoguy
Copy link
Author

xenoguy commented Feb 3, 2017

The bot is running, and in the console it does say it's sent notifications.

I don't use pokealarm. I'm trying to get it to send a webhook to either slack or discord. maybe it doesn't support those?

most of the settings are default from the example config.py. I've removed the specific part of the webhook url for slack, as i don't want the general public having it.


### OPTIONS BELOW THIS POINT ARE ONLY NECESSARY FOR NOTIFICATIONS ###
NOTIFY = True  # enable notifications

# create images with Pokémon stats for Tweets
# requires cairo and ENCOUNTER = 'notifying' or 'all'
TWEET_IMAGES = False

# As many hashtags as can fit will be included in your tweets, these will
# be combined with landmark-specific hashtags (if applicable).
HASHTAGS = {AREA_NAME, 'Monocle', 'PokemonGO'}
#TZ_OFFSET = 0  # UTC offset in hours (if different from system time)

# the required number of seconds remaining to notify about a Pokémon
TIME_REQUIRED = 600  # 10 minutes

### Only set either the NOTIFY_RANKING or NOTIFY_IDS, not both!
# The (x) rarest Pokémon will be eligible for notification. Whether a
# notification is sent or not depends on its score, as explained below.
NOTIFY_RANKING = 90

# Pokémon to potentially notify about, in order of preference.
# The first in the list will have a rarity score of 1, the last will be 0.
#NOTIFY_IDS = (130, 89, 131, 3, 9, 134, 62, 94, 91, 87, 71, 45, 85, 114, 80, 6)

# Sightings of the top (x) will always be notified about, even if below TIME_REQUIRED
# (ignored if using NOTIFY_IDS instead of NOTIFY_RANKING)
ALWAYS_NOTIFY = 14

# Always notify about the following Pokémon even if their time remaining or scores are not high enough
#ALWAYS_NOTIFY_IDS = {89, 130, 144, 145, 146, 150, 151}

# Never notify about the following Pokémon, even if they would otherwise be eligible
#NEVER_NOTIFY_IDS = TRASH_IDS

# Override the rarity score for particular Pokémon
# format is: {pokemon_id: rarity_score}
#RARITY_OVERRIDE = {148: 0.6, 149: 0.9}

# Ignore IV score and only base decision on rarity score (default if IVs not known)
#IGNORE_IVS = False

# Ignore rarity score and only base decision on IV score
#IGNORE_RARITY = False

# The Pokémon score required to notify goes on a sliding scale from INITIAL_SCORE
# to MINIMUM_SCORE over the course of FULL_TIME seconds following a notification
# Pokémon scores are an average of the Pokémon's rarity score and IV score (from 0 to 1)
# If NOTIFY_RANKING is 90, the 90th most common Pokémon will have a rarity of score 0, the rarest will be 1.
# IV score is the IV sum divided by 45 (perfect IVs).
FULL_TIME = 1800  # the number of seconds after a notification when only MINIMUM_SCORE will be required
INITIAL_SCORE = 0.7  # the required score immediately after a notification
MINIMUM_SCORE = 0.4  # the required score after FULL_TIME seconds have passed

# the number of encounter_ids to retain for duplicate checking. Should be at
# least as high as the highest number of notifications you'd send in an hour.
NOTIFICATION_CACHE = 100

### The following values are fake, replace them with your own keys to enable
### PushBullet notifications and/or tweeting, otherwise leave them out of your
### config or set them to None.
## you must provide keys for at least one service to use notifications

#PB_API_KEY = 'o.9187cb7d5b857c97bfcaa8d63eaa8494'
#PB_CHANNEL = 0  # set to the integer of your channel, or to None to push privately

#TWITTER_CONSUMER_KEY = '53d997264eb7f6452b7bf101d'
#TWITTER_CONSUMER_SECRET = '64b9ebf618829a51f8c0535b56cebc808eb3e80d3d18bf9e00'
#TWITTER_ACCESS_KEY = '1dfb143d4f29-6b007a5917df2b23d0f6db951c4227cdf768b'
#TWITTER_ACCESS_SECRET = 'e743ed1353b6e9a45589f061f7d08374db32229ec4a61'

WEBHOOKS = {'https://hooks.slack.com/services/XXX/XXXX'}

### FRONTEND CONFIGURATION
LOAD_CUSTOM_HTML_FILE = False # File path MUST be 'templates/custom.html'
LOAD_CUSTOM_CSS_FILE = False  # File path MUST be 'static/css/custom.css'
LOAD_CUSTOM_JS_FILE = False  # File path MUST be 'static/js/custom.js'

FB_PAGE_ID = None
TWITTER_SCREEN_NAME = None  # Username withouth '@' char
DISCORD_INVITE_ID = None
TELEGRAM_USERNAME = None

@Noctem
Copy link
Owner

Noctem commented Feb 4, 2017

Discord and Slack support has not been implemented yet. Their webhooks expect particular fields (like usernames and message contents), they won't interpret the raw Pokémon data that Monocle spits out. The webhooks feature is for applications or services that are expecting that kind of data.

@xenoguy
Copy link
Author

xenoguy commented Feb 4, 2017

ah, ok thanks for the clarification.

@Noctem Noctem closed this as completed Feb 5, 2017
@juancelis6
Copy link

pokealarm no me notifica se queda buscando el webhooks. aunque en localhost me dice: PokeAlarm Running!
aun asi no consigo que me notifique nada :(
alguien me puede ayudar gracias :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants