GithubHelp home page GithubHelp logo

flakas / reconbot Goto Github PK

View Code? Open in Web Editor NEW
21.0 21.0 19.0 102 KB

A tool to post EVE Online notifications to Slack or Discord

License: MIT License

Python 100.00%
discord esi eve-api eve-online notifications slack

reconbot's People

Contributors

flakas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reconbot's Issues

Posting to Discord multiple times

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.

bad request 400 client error

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?

esi notification task error

(venv) C:\Users\Administrator\Documents>python run.py
[2020-08-27 19:47:05.017017] Exception in esi_notification_task

Traceback (most recent call last):
File "C:\Users\Administrator\Documents\reconbot\tasks.py", line 15, in esi_notification_task
notifications = esi.get_new_notifications(max_age=MAX_NOTIFICATION_AGE_IN_SECONDS)
File "C:\Users\Administrator\Documents\reconbot\esi.py", line 32, in get_new_notifications
notifications = self.get_notifications()
File "C:\Users\Administrator\Documents\reconbot\esi.py", line 29, in get_notifications
return self.esi_get(url)
File "C:\Users\Administrator\Documents\reconbot\esi.py", line 87, in esi_get
query['token'] = self.sso.get_access_token()
File "C:\Users\Administrator\Documents\reconbot\sso.py", line 18, in get_access_token
return self.fetch_access_token()
File "C:\Users\Administrator\Documents\reconbot\sso.py", line 37, in fetch_access_token
r.raise_for_status()
File "C:\Users\Administrator\Documents\venv\lib\site-packages\requests\models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://login.eveonline.com/oauth/token
401 Client Error: Unauthorized for url: https://login.eveonline.com/oauth/token

ImportError: No module named 'reconbot'

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

Different messages to different channels

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!

bad request when sending message to discord

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.

[2018-05-07 03:16:29.153391] Exception in esi_notification_task

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

ESI Notifications

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,

Exception in esi_notification_task


[2018-04-30 15:26:51.103477] Exception in esi_notification_task

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

ESI Callback URL

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?

error

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.