flakas / reconbot Goto Github PK
View Code? Open in Web Editor NEWA tool to post EVE Online notifications to Slack or Discord
License: MIT License
A tool to post EVE Online notifications to Slack or Discord
License: MIT License
Hi can you make Webhooks for Discord ?
Everytime I try to run run.py
using python run.py
I get the error below. (os: Linux Mint 18.1)
Error:
Traceback (most recent call last): File "run.py", line 5, in <module> from reconbot.tasks import esi_notification_task ImportError: No module named 'reconbot'
Commands:
source ven/bin/activate
python run.py
Hey, how do you normally support this bot? Hosted on a 24/7 VM?
Have you explored putting this in a container?
edit
I have the bot setup and running with only a single ESI account posting mostly structure notifications to Discord. It's posting everything pretty much three times on whatever cache value is set in the config. I tried raising it as high as 20 minutes to see if there was just some kind of weird issue with it thinking the message didn't go through, but no joy.
Ever run into this before? The only thing I changed were the settings in order to run it. At the moment I'm running on Ubuntu 17.10 with Python 3.6.
Traceback (most recent call last):
File "/home/reconbot/tasks.py", line 28, in esi_notification_task
notifier.notify(message)
File "/home/reconbot/notifiers/caching.py", line 14, in notify
self.notifier.notify(text, options)
File "/home/reconbot/notifiers/splitter.py", line 7, in notify
notifier.notify(text, options)
File "/home/reconbot/notifiers/discord.py", line 17, in notify
loop.run_until_complete(self._send_message(channel_id, text))
File "/usr/lib64/python3.6/asyncio/base_events.py", line 468, in run_until_complete
return future.result()
File "/home/reconbot/notifiers/discord.py", line 24, in _send_message
await self.client.send_message(c, message)
File "/home/reconbot/venv/reconbot/lib64/python3.6/site-packages/discord/client.py", line 1152, in send_message
data = yield from self.http.send_message(channel_id, content, guild_id=guild_id, tts=tts, embed=embed)
File "/home/reconbot/venv/reconbot/lib64/python3.6/site-packages/discord/http.py", line 200, in request
raise HTTPException(r, data)
discord.errors.HTTPException: BAD REQUEST (status code: 400): Unauthorized
BAD REQUEST (status code: 400): Unauthorized
Traceback (most recent call last):
File "run.py", line 198, in
schedule.run_pending()
File "/usr/lib/python3.6/site-packages/schedule/init.py", line 367, in run_pending
default_scheduler.run_pending()
File "/usr/lib/python3.6/site-packages/schedule/init.py", line 64, in run_pending
self._run_job(job)
File "/usr/lib/python3.6/site-packages/schedule/init.py", line 96, in _run_job
ret = job.run()
File "/usr/lib/python3.6/site-packages/schedule/init.py", line 293, in run
ret = self.job_func()
File "run.py", line 179, in notifications_job_logistics
eve_apis['example-group']['notifications'],
KeyError: 'example-group'
not sure what is going on. can someone explain?
Has this project been abandoned?
it seems that xinc got his issue fixed changing from python 3.5 to 3.6. #4
i am using python 3.6 and my issue isnt fixed. not working.
Traceback (most recent call last):
File "/reconbot/reconbot/tasks.py", line 28, in esi_notification_task
notifier.notify(message)
File "/reconbot/reconbot/notifiers/caching.py", line 14, in notify
self.notifier.notify(text, options)
File "/reconbot/reconbot/notifiers/splitter.py", line 7, in notify
notifier.notify(text, options)
File "/reconbot/reconbot/notifiers/discord.py", line 17, in notify
loop.run_until_complete(self._send_message(channel_id, text))
File "/usr/lib64/python3.6/asyncio/base_events.py", line 468, in run_until_complete
return future.result()
File "/reconbot/reconbot/notifiers/discord.py", line 24, in _send_message
await self.client.send_message(c, message)
File "/usr/lib/python3.6/site-packages/discord/client.py", line 1152, in send_message
data = yield from self.http.send_message(channel_id, content, guild_id=guild_id, tts=tts, embed=embed)
File "/usr/lib/python3.6/site-packages/discord/http.py", line 200, in request
raise HTTPException(r, data)
discord.errors.HTTPException: BAD REQUEST (status code: 400): Unauthorized
BAD REQUEST (status code: 400): Unauthorized
es per run.py i did whitelist the notification that i need but it still spits out everything that comes in to discord webhook. it is as if whitelist has no effect.
I found the below info on this website.
https://esi.evetech.net/ui/?version=latest#/Character/get_characters_character_id_notifications
AcceptedAlly,
AcceptedSurrender,
AllAnchoringMsg,
AllMaintenanceBillMsg,
AllStrucInvulnerableMsg,
AllStructVulnerableMsg,
AllWarCorpJoinedAllianceMsg,
AllWarDeclaredMsg,
AllWarInvalidatedMsg,
AllWarRetractedMsg,
AllWarSurrenderMsg,
AllianceCapitalChanged,
AllianceWarDeclaredV2,
AllyContractCancelled,
AllyJoinedWarAggressorMsg,
AllyJoinedWarAllyMsg,
AllyJoinedWarDefenderMsg,
BattlePunishFriendlyFire,
BillOutOfMoneyMsg,
BillPaidCorpAllMsg,
BountyClaimMsg,
BountyESSShared,
BountyESSTaken,
BountyPlacedAlliance,
BountyPlacedChar,
BountyPlacedCorp,
BountyYourBountyClaimed,
BuddyConnectContactAdd,
CharAppAcceptMsg,
CharAppRejectMsg,
CharAppWithdrawMsg,
CharLeftCorpMsg,
CharMedalMsg,
CharTerminationMsg,
CloneActivationMsg,
CloneActivationMsg2,
CloneMovedMsg,
CloneRevokedMsg1,
CloneRevokedMsg2,
CombatOperationFinished,
ContactAdd,
ContactEdit,
ContainerPasswordMsg,
CorpAllBillMsg,
CorpAppAcceptMsg,
CorpAppInvitedMsg,
CorpAppNewMsg,
CorpAppRejectCustomMsg,
CorpAppRejectMsg,
CorpBecameWarEligible,
CorpDividendMsg,
CorpFriendlyFireDisableTimerCompleted,
CorpFriendlyFireDisableTimerStarted,
CorpFriendlyFireEnableTimerCompleted,
CorpFriendlyFireEnableTimerStarted,
CorpKicked,
CorpLiquidationMsg,
CorpNewCEOMsg,
CorpNewsMsg,
CorpNoLongerWarEligible,
CorpOfficeExpirationMsg,
CorpStructLostMsg,
CorpTaxChangeMsg,
CorpVoteCEORevokedMsg,
CorpVoteMsg,
CorpWarDeclaredMsg,
CorpWarDeclaredV2,
CorpWarFightingLegalMsg,
CorpWarInvalidatedMsg,
CorpWarRetractedMsg,
CorpWarSurrenderMsg,
CustomsMsg,
DeclareWar,
DistrictAttacked,
DustAppAcceptedMsg,
EntosisCaptureStarted,
FWAllianceKickMsg,
FWAllianceWarningMsg,
FWCharKickMsg,
FWCharRankGainMsg,
FWCharRankLossMsg,
FWCharWarningMsg,
FWCorpJoinMsg,
FWCorpKickMsg,
FWCorpLeaveMsg,
FWCorpWarningMsg,
FacWarCorpJoinRequestMsg,
FacWarCorpJoinWithdrawMsg,
FacWarCorpLeaveRequestMsg,
FacWarCorpLeaveWithdrawMsg,
FacWarLPDisqualifiedEvent,
FacWarLPDisqualifiedKill,
FacWarLPPayoutEvent,
FacWarLPPayoutKill,
GameTimeAdded,
GameTimeReceived,
GameTimeSent,
GiftReceived,
IHubDestroyedByBillFailure,
IncursionCompletedMsg,
IndustryOperationFinished,
IndustryTeamAuctionLost,
IndustryTeamAuctionWon,
InfrastructureHubBillAboutToExpire,
InsuranceExpirationMsg,
InsuranceFirstShipMsg,
InsuranceInvalidatedMsg,
InsuranceIssuedMsg,
InsurancePayoutMsg,
InvasionSystemLogin,
JumpCloneDeletedMsg1,
JumpCloneDeletedMsg2,
KillReportFinalBlow,
KillReportVictim,
KillRightAvailable,
KillRightAvailableOpen,
KillRightEarned,
KillRightUnavailable,
KillRightUnavailableOpen,
KillRightUsed,
LocateCharMsg,
MadeWarMutual,
MercOfferRetractedMsg,
MercOfferedNegotiationMsg,
MissionOfferExpirationMsg,
MissionTimeoutMsg,
MoonminingAutomaticFracture,
MoonminingExtractionCancelled,
MoonminingExtractionFinished,
MoonminingExtractionStarted,
MoonminingLaserFired,
MutualWarExpired,
MutualWarInviteAccepted,
MutualWarInviteRejected,
MutualWarInviteSent,
NPCStandingsGained,
NPCStandingsLost,
OfferToAllyRetracted,
OfferedSurrender,
OfferedToAlly,
OldLscMessages,
OperationFinished,
OrbitalAttacked,
OrbitalReinforced,
OwnershipTransferred,
RaffleCreated,
RaffleExpired,
RaffleFinished,
ReimbursementMsg,
ResearchMissionAvailableMsg,
RetractsWar,
SeasonalChallengeCompleted,
SovAllClaimAquiredMsg,
SovAllClaimLostMsg,
SovCommandNodeEventStarted,
SovCorpBillLateMsg,
SovCorpClaimFailMsg,
SovDisruptorMsg,
SovStationEnteredFreeport,
SovStructureDestroyed,
SovStructureReinforced,
SovStructureSelfDestructCancel,
SovStructureSelfDestructFinished,
SovStructureSelfDestructRequested,
SovereigntyIHDamageMsg,
SovereigntySBUDamageMsg,
SovereigntyTCUDamageMsg,
StationAggressionMsg1,
StationAggressionMsg2,
StationConquerMsg,
StationServiceDisabled,
StationServiceEnabled,
StationStateChangeMsg,
StoryLineMissionAvailableMsg,
StructureAnchoring,
StructureCourierContractChanged,
StructureDestroyed,
StructureFuelAlert,
StructureImpendingAbandonmentAssetsAtRisk,
StructureItemsDelivered,
StructureItemsMovedToSafety,
StructureLostArmor,
StructureLostShields,
StructureOnline,
StructureServicesOffline,
StructureUnanchoring,
StructureUnderAttack,
StructureWentHighPower,
StructureWentLowPower,
StructuresJobsCancelled,
StructuresJobsPaused,
StructuresReinforcementChanged,
TowerAlertMsg,
TowerResourceAlertMsg,
TransactionReversalMsg,
TutorialMsg,
WarAdopted,
WarAllyInherited,
WarAllyOfferDeclinedMsg,
WarConcordInvalidates,
WarDeclared,
WarEndedHqSecurityDrop,
WarHQRemovedFromSpace,
WarInherited,
WarInvalid,
WarRetracted,
WarRetractedByConcord,
WarSurrenderDeclinedMsg,
WarSurrenderOfferMsg,
so i did everything according to the instructions.
i get this error.
Traceback (most recent call last):
File "/reconbot/reconbot/tasks.py", line 15, in esi_notification_task
notifications = esi.get_new_notifications(max_age=MAX_NOTIFICATION_AGE_IN_SECONDS)
File "/reconbot/reconbot/esi.py", line 32, in get_new_notifications
notifications = self.get_notifications()
File "/reconbot/reconbot/esi.py", line 29, in get_notifications
return self.esi_get(url)
File "/reconbot/reconbot/esi.py", line 87, in esi_get
query['token'] = self.sso.get_access_token()
File "/reconbot/reconbot/sso.py", line 18, in get_access_token
return self.fetch_access_token()
File "/reconbot/reconbot/sso.py", line 37, in fetch_access_token
r.raise_for_status()
File "/usr/lib/python3.6/site-packages/requests/models.py", line 844, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://login.eveonline.com/oauth/token
400 Client Error: Bad Request for url: https://login.eveonline.com/oauth/token
what does it mean?
I am wondering if this bot is able to post certain notifications into one channel and different notifications into another.
IE:
Being attacked can be posted in Channel 1
Structure going online can be posted in Channel 2
Thanks in advance!
Your installation documentation is 90% complete... You are missing what callback URL you are supposed to specify during ESI application creation.
Could you provide this information please?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.